staging: wfx: fix endianness of the field 'num_tx_confs'
authorJérôme Pouiller <jerome.pouiller@silabs.com>
Tue, 12 May 2020 15:04:12 +0000 (17:04 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 May 2020 11:49:45 +0000 (13:49 +0200)
commit8008b480e25b0c88e1d6768bd8a440babb787307
tree49253e8361ed41a8b25d2d20fb02ddd7a69fa505
parentecda229e7ce3224fe9937d23c41e5ef74d4e6db3
staging: wfx: fix endianness of the field 'num_tx_confs'

The field 'num_tx_confs' from the struct hif_cnf_multi_transmit is a
__le32. Sparse complains this field is not always correctly accessed:

    drivers/staging/wfx/hif_rx.c:82:9: warning: restricted __le32 degrades to integer
    drivers/staging/wfx/hif_rx.c:87:29: warning: restricted __le32 degrades to integer

However, the value of num_tx_confs cannot be greater than 15. So, we
only have to access to the least significant byte. It is finally easier
to declare it as an array of bytes and only access to the first one.

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