net/mlx4_en: Use __force to fix a sparse warning in TX datapath
authorTariq Toukan <tariqt@mellanox.com>
Mon, 9 Oct 2017 13:59:50 +0000 (16:59 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 9 Oct 2017 17:33:05 +0000 (10:33 -0700)
In TX data-path, we intentionally do not byte-swap, as documented
in code and in the cited commit log.
This fixes sparse warning:
en_tx.c:720:23: warning: incorrect type in argument 1 (different base types)
en_tx.c:720:23:    expected unsigned int [unsigned] [usertype] <noident>
en_tx.c:720:23:    got restricted __be32 [usertype] doorbell_qpn

Fixes: 492f5add4be8 ("net/mlx4_en: Doorbell is byteswapped in Little Endian archs")
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/en_tx.c

index 8a32a8f7f9c0c7316665294b5342051b46f8b623..2cc82dc073974212f156583a5490dd26a54ddfef 100644 (file)
@@ -718,7 +718,7 @@ void mlx4_en_xmit_doorbell(struct mlx4_en_tx_ring *ring)
 #else
        iowrite32be(
 #endif
-                 ring->doorbell_qpn,
+                 (__force u32)ring->doorbell_qpn,
                  ring->bf.uar->map + MLX4_SEND_DOORBELL);
 }