HID: rmi: replace ternary operator with min()
authorJiangshan Yi <yijiangshan@kylinos.cn>
Wed, 13 Jul 2022 03:20:47 +0000 (11:20 +0800)
committerJiri Kosina <jkosina@suse.cz>
Thu, 25 Aug 2022 09:29:58 +0000 (11:29 +0200)
commit486da113c698a748bd8d75a0d10a2eee8ef8d416
treefc23463886d36def71d300046b7206d5a4138267
parent8d9420ca9bd9bceddcfab3d0263d6a8e073396fe
HID: rmi: replace ternary operator with min()

Fix the following coccicheck warning:

drivers/hid/hid-rmi.c:240: WARNING opportunity for min().
drivers/hid/hid-rmi.c:350: 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: Jiangshan Yi <yijiangshan@kylinos.cn>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-rmi.c