]> git.baikalelectronics.ru Git - kernel.git/commit
HID: logitech-hidpp: Use 'atomic_inc_return' instead of hand-writing it
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Fri, 23 Jul 2021 15:41:52 +0000 (17:41 +0200)
committerJiri Kosina <jkosina@suse.cz>
Fri, 20 Aug 2021 12:20:34 +0000 (14:20 +0200)
commit95b29802eb1de45fda63c8c2a1209b7c6f6d9f82
treebb01b4c683710cae8a5463a1ab62292f70647ed4
parentca7692f2f562ee4649c7ef45590ca3e34d834c55
HID: logitech-hidpp: Use 'atomic_inc_return' instead of hand-writing it

This function logs a warning if the workqueue gets too big.
In order to save a few cycles, use 'atomic_inc_return()' instead of an
'atomic_inc()/atomic_read()' sequence.

This axes a line of code and saves a 'atomic_read()' call.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-logitech-hidpp.c