OSDN Git Service

staging: wfx: simplify wfx_tx_queue_get_num_queued()
authorJérôme Pouiller <jerome.pouiller@silabs.com>
Wed, 15 Jan 2020 13:55:35 +0000 (13:55 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 16 Jan 2020 19:59:53 +0000 (20:59 +0100)
commit2f5fd8b07745838e590b61d5b136be8b9f94cc4c
tree64522d1e07d340d1eb08fc824f8b2d18525bed05
parent5244357961a422100b73a9da423532578579324a
staging: wfx: simplify wfx_tx_queue_get_num_queued()

wfx_tx_queue_get_num_queued() can take advantage of BIT() instead of
maintaining one variable for a counter and another for a mask.

In add, wfx_tx_queue_get_num_queued() has no real reason to return a
size_t instead of an int.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-64-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wfx/queue.c
drivers/staging/wfx/queue.h