]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
spi: cadence-qspi: Remove an useless operation
authorMiquel Raynal (Schneider Electric) <miquel.raynal@bootlin.com>
Thu, 22 Jan 2026 15:13:31 +0000 (16:13 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 28 Jan 2026 20:41:22 +0000 (20:41 +0000)
commit453c5d60d896398c32854b683aff6d5b8386fa03
treecc98e6e99d0e2ca1fc95f91f4ab32cd59a2ccc6e
parentec2da8bb0bc518ca5458d36de9aeec493ed5a790
spi: cadence-qspi: Remove an useless operation

Right above writing the register value back based on 'div' value, there
is the following check:

    if (div > CQSPI_REG_CONFIG_BAUD_MASK)
            div = CQSPI_REG_CONFIG_BAUD_MASK;

which means div does not need to be AND'ed against the bitfield mask.

Remove this redundant operation.

Reviewed-by: Pratyush Yadav <pratyush@kernel.org>
Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Miquel Raynal (Schneider Electric) <miquel.raynal@bootlin.com>
Tested-by: Santhosh Kumar K <s-k6@ti.com>
Link: https://patch.msgid.link/20260122-schneider-6-19-rc1-qspi-v4-6-f9c21419a3e6@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-cadence-quadspi.c