Commit 486da11
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 <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>1 parent 8d9420c commit 486da11
1 file changed
+2
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
240 | | - | |
241 | | - | |
| 240 | + | |
242 | 241 | | |
243 | 242 | | |
244 | 243 | | |
| |||
347 | 346 | | |
348 | 347 | | |
349 | 348 | | |
350 | | - | |
351 | | - | |
| 349 | + | |
352 | 350 | | |
353 | 351 | | |
354 | 352 | | |
| |||
0 commit comments