summaryrefslogtreecommitdiff
path: root/net/qrtr
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2021-09-28 16:15:13 +0200
committerDavid S. Miller <davem@davemloft.net>2021-09-28 15:24:36 +0100
commit1e0083bd0777e4a418a6710d9ee04b979cdbe5cc (patch)
tree5ce88f830d3513ffcd649677a85bfc73305bec11 /net/qrtr
parentaf3826db74d184bc9c2c9d3ff34548e5f317a6f3 (diff)
gve: DQO: avoid unused variable warnings
The use of dma_unmap_addr()/dma_unmap_len() in the driver causes multiple warnings when these macros are defined as empty, e.g. in an ARCH=i386 allmodconfig build: drivers/net/ethernet/google/gve/gve_tx_dqo.c: In function 'gve_tx_add_skb_no_copy_dqo': drivers/net/ethernet/google/gve/gve_tx_dqo.c:494:40: error: unused variable 'buf' [-Werror=unused-variable] 494 | struct gve_tx_dma_buf *buf = This is not how the NEED_DMA_MAP_STATE macros are meant to work, as they rely on never using local variables or a temporary structure like gve_tx_dma_buf. Remote the gve_tx_dma_buf definition and open-code the contents in all places to avoid the warning. This causes some rather long lines but otherwise ends up making the driver slightly smaller. Fixes: a57e5de476be ("gve: DQO: Add TX path") Link: https://lore.kernel.org/netdev/20210723231957.1113800-1-bcf@google.com/ Link: https://lore.kernel.org/netdev/20210721151100.2042139-1-arnd@kernel.org/ Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/qrtr')
0 files changed, 0 insertions, 0 deletions