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)
commit46dcd1cc2b2fa43bd99f39c7c236d5cdb80522f0
treebb01b4c683710cae8a5463a1ab62292f70647ed4
parentdf04fbe8680bfe07f3d7487eccff9f768bb02533
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