[PATCH] net/pasemi: fix compiler warning

Subsystems: linux for powerpc (32-bit and 64-bit), networking drivers, the rest

STALE5241d

2 messages, 2 authors, 2012-05-03 · open the first message on its own page

[PATCH] net/pasemi: fix compiler warning

From: Stephen Rothwell <hidden>
Date: 2012-05-03 00:51:57

Fix this compiler warning (on PowerPC) by not marking a parameter as
const:

drivers/net/ethernet/pasemi/pasemi_mac.c: In function 'pasemi_mac_replenish_rx_ring':
drivers/net/ethernet/pasemi/pasemi_mac.c:646:3: warning: passing argument 1 of 'netdev_alloc_skb' discards qualifiers from pointer target type
include/linux/skbuff.h:1706:31: note: expected 'struct net_device *' but argument is of type 'const struct net_device *'

Cc: Olof Johansson <redacted>
Cc: Pradeep A. Dalvi <redacted>
Signed-off-by: Stephen Rothwell <redacted>
---
 drivers/net/ethernet/pasemi/pasemi_mac.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

The warning was introduced by commit dae2e9f430c4 ("netdev: ethernet
dev_alloc_skb to netdev_alloc_skb").
diff --git a/drivers/net/ethernet/pasemi/pasemi_mac.c b/drivers/net/ethernet/pasemi/pasemi_mac.c
index ddc95b0..e559dfa 100644
--- a/drivers/net/ethernet/pasemi/pasemi_mac.c
+++ b/drivers/net/ethernet/pasemi/pasemi_mac.c
@@ -623,7 +623,7 @@ static void pasemi_mac_free_rx_resources(struct pasemi_mac *mac)
 	mac->rx = NULL;
 }
 
-static void pasemi_mac_replenish_rx_ring(const struct net_device *dev,
+static void pasemi_mac_replenish_rx_ring(struct net_device *dev,
 					 const int limit)
 {
 	const struct pasemi_mac *mac = netdev_priv(dev);
-- 
1.7.10.280.gaa39

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

Re: [PATCH] net/pasemi: fix compiler warning

From: David Miller <davem@davemloft.net>
Date: 2012-05-03 00:57:21

From: Stephen Rothwell <redacted>
Date: Thu, 3 May 2012 10:51:46 +1000
Fix this compiler warning (on PowerPC) by not marking a parameter as
const:

drivers/net/ethernet/pasemi/pasemi_mac.c: In function 'pasemi_mac_replenish_rx_ring':
drivers/net/ethernet/pasemi/pasemi_mac.c:646:3: warning: passing argument 1 of 'netdev_alloc_skb' discards qualifiers from pointer target type
include/linux/skbuff.h:1706:31: note: expected 'struct net_device *' but argument is of type 'const struct net_device *'

Cc: Olof Johansson <redacted>
Cc: Pradeep A. Dalvi <redacted>
Signed-off-by: Stephen Rothwell <redacted>
Applied, thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help