drivers: comedi: replace ternary operator with min()
authorGuo Zhengkui <guozhengkui@vivo.com>
Fri, 13 May 2022 07:16:06 +0000 (15:16 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 May 2022 16:54:45 +0000 (18:54 +0200)
commit80ad54a63af3a3e2eb701fbf30242a922c4fac47
tree445d5cc17fb11ed1daef3909681f6f5022128420
parent7394d2ebb651a9f62e08c6ab864aac015d27c64d
drivers: comedi: replace ternary operator with min()

Fix the following coccicheck warning:

drivers/comedi/drivers.c:857:12-13: 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.

Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Guo Zhengkui <guozhengkui@vivo.com>
Link: https://lore.kernel.org/r/20220513071608.49047-1-guozhengkui@vivo.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/comedi/drivers.c