]> git.baikalelectronics.ru Git - kernel.git/commit
spi: spi-au1550: replace ternary operator with min()
authorGuo Zhengkui <guozhengkui@vivo.com>
Fri, 13 May 2022 13:03:33 +0000 (21:03 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 16 May 2022 16:57:01 +0000 (17:57 +0100)
commitd3880bebf0d5ff59ba8368cc46598a9bcc177ed1
tree7bf08d08d772f2622cdb3cb84704ea0a9e3fa153
parent61bd043a51d9c3046d730cd26d9179c28da22f38
spi: spi-au1550: replace ternary operator with min()

Fix the following coccicheck warnings:

drivers/spi/spi-au1550.c:408:21-22: WARNING opportunity for min()
drivers/spi/spi-au1550.c:542:21-22: WARNING opportunity for min()

min() macro is defined in include/linux/minmax.h. It avoids multiple
evaluations of the arguments when non-constant and performs strict
type-checking.

Signed-off-by: Guo Zhengkui <guozhengkui@vivo.com>
Link: https://lore.kernel.org/r/20220513130333.58379-1-guozhengkui@vivo.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-au1550.c