diff options
author | Jérôme Pouiller <jerome.pouiller@silabs.com> | 2020-05-12 17:04:11 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-05-13 13:49:45 +0200 |
commit | ecda229e7ce3224fe9937d23c41e5ef74d4e6db3 (patch) | |
tree | 6cb78ea3d18434771f135c64e5a5b7144b0516fd /drivers/staging/wfx/traces.h | |
parent | 808fcf2e976d0afd3279a2b85fa9dcb4a0c26d85 (diff) |
staging: wfx: fix endianness of the field 'status'
The field 'status' appears in most of structs returned by the hardware.
This field is encoded as little endian. Sparse complains this field is
not always correctly accessed:
drivers/staging/wfx/data_rx.c:53:16: warning: restricted __le32 degrades to integer
drivers/staging/wfx/data_rx.c:84:16: warning: restricted __le32 degrades to integer
drivers/staging/wfx/data_tx.c:526:24: warning: restricted __le32 degrades to integer
drivers/staging/wfx/data_tx.c:569:23: warning: restricted __le32 degrades to integer
drivers/staging/wfx/hif_rx.c:128:33: warning: restricted __le32 degrades to integer
drivers/staging/wfx/./traces.h:401:1: warning: restricted __le32 degrades to integer
drivers/staging/wfx/./traces.h:401:1: warning: restricted __le32 degrades to integer
In most of cases, this field is only compared with HIF_STATUS values.
Finally, it is more convenient to solve the problem by defining the
HIF_STATUS values directly in little endian.
It is also the right time to make some clean up in the HIF_STATUS names.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200512150414.267198-15-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wfx/traces.h')
-rw-r--r-- | drivers/staging/wfx/traces.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/wfx/traces.h b/drivers/staging/wfx/traces.h index 7298fb948f56..c10ac92b8eb3 100644 --- a/drivers/staging/wfx/traces.h +++ b/drivers/staging/wfx/traces.h @@ -414,7 +414,7 @@ TRACE_EVENT(tx_stats, __entry->flags |= 0x10; if (tx_cnf->status) __entry->flags |= 0x20; - if (tx_cnf->status == HIF_REQUEUE) + if (tx_cnf->status == HIF_STATUS_TX_FAIL_REQUEUE) __entry->flags |= 0x40; ), TP_printk("packet ID: %08x, rate policy: %s %d|%d %d|%d %d|%d %d|%d -> %d attempt, Delays media/queue/total: %4dus/%4dus/%4dus", |