aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/gianfar.c
diff options
context:
space:
mode:
authorAnton Vorontsov <avorontsov@ru.mvista.com>2009-11-04 07:53:00 -0500
committerDavid S. Miller <davem@davemloft.net>2009-11-08 03:43:17 -0500
commit18294ad1ecccffe6a91f6914dc1f4acd8995736a (patch)
tree4140786f1db45199ad26eeb2ab0922dd5e985c1a /drivers/net/gianfar.c
parent6748f60b948230684fe3f295220e76679c5efc52 (diff)
gianfar: Fix compiler and sparse warnings
commit fba4ed030cfae7efdb6b79a57b0c5a9d72c9de83 ("gianfar: Add Multiple Queue Support") introduced the following warnings: CHECK gianfar.c gianfar.c:333:8: warning: incorrect type in assignment (different address spaces) gianfar.c:333:8: expected unsigned int [usertype] *baddr gianfar.c:333:8: got unsigned int [noderef] <asn:2>*<noident> [... 67 lines skipped ...] gianfar.c:2565:3: warning: incorrect type in argument 1 (different type sizes) gianfar.c:2565:3: expected unsigned long const *addr gianfar.c:2565:3: got unsigned int *<noident> CC gianfar.o gianfar.c: In function 'gfar_probe': gianfar.c:985: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type gianfar.c:985: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type gianfar.c:993: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type gianfar.c:993: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type gianfar.c: In function 'gfar_configure_coalescing': gianfar.c:1680: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type gianfar.c:1680: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type gianfar.c:1688: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type gianfar.c:1688: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type gianfar.c: In function 'gfar_poll': gianfar.c:2565: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type gianfar.c:2565: warning: passing argument 1 of 'find_next_bit' from incompatible pointer type gianfar.c:2566: warning: passing argument 2 of 'test_bit' from incompatible pointer type gianfar.c:2585: warning: passing argument 2 of 'set_bit' from incompatible pointer type Following warnings left unfixed (looks like sparse doesn't like locks in loops, so __acquires/__releases() doesn't help): gianfar.c:441:40: warning: context imbalance in 'lock_rx_qs': wrong count at exit gianfar.c:441:40: context '<noident>': wanted 0, got 1 gianfar.c:449:40: warning: context imbalance in 'lock_tx_qs': wrong count at exit gianfar.c:449:40: context '<noident>': wanted 0, got 1 gianfar.c:458:3: warning: context imbalance in 'unlock_rx_qs': __context__ statement expected different context gianfar.c:458:3: context '<noident>': wanted >= 0, got -1 gianfar.c:466:3: warning: context imbalance in 'unlock_tx_qs': __context__ statement expected different context gianfar.c:466:3: context '<noident>': wanted >= 0, got -1 Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/gianfar.c')
-rw-r--r--drivers/net/gianfar.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
index 086d40dd526d..197b358e6361 100644
--- a/drivers/net/gianfar.c
+++ b/drivers/net/gianfar.c
@@ -327,7 +327,7 @@ cleanup:
327static void gfar_init_tx_rx_base(struct gfar_private *priv) 327static void gfar_init_tx_rx_base(struct gfar_private *priv)
328{ 328{
329 struct gfar __iomem *regs = priv->gfargrp[0].regs; 329 struct gfar __iomem *regs = priv->gfargrp[0].regs;
330 u32 *baddr; 330 u32 __iomem *baddr;
331 int i; 331 int i;
332 332
333 baddr = &regs->tbase0; 333 baddr = &regs->tbase0;
@@ -770,7 +770,8 @@ static unsigned int reverse_bitmap(unsigned int bit_map, unsigned int max_qs)
770 return new_bit_map; 770 return new_bit_map;
771} 771}
772 772
773u32 cluster_entry_per_class(struct gfar_private *priv, u32 rqfar, u32 class) 773static u32 cluster_entry_per_class(struct gfar_private *priv, u32 rqfar,
774 u32 class)
774{ 775{
775 u32 rqfpr = FPR_FILER_MASK; 776 u32 rqfpr = FPR_FILER_MASK;
776 u32 rqfcr = 0x0; 777 u32 rqfcr = 0x0;
@@ -849,7 +850,7 @@ static int gfar_probe(struct of_device *ofdev,
849 int len_devname; 850 int len_devname;
850 u32 rstat = 0, tstat = 0, rqueue = 0, tqueue = 0; 851 u32 rstat = 0, tstat = 0, rqueue = 0, tqueue = 0;
851 u32 isrg = 0; 852 u32 isrg = 0;
852 u32 *baddr; 853 u32 __iomem *baddr;
853 854
854 err = gfar_of_init(ofdev, &dev); 855 err = gfar_of_init(ofdev, &dev);
855 856
@@ -1658,10 +1659,10 @@ void gfar_start(struct net_device *dev)
1658} 1659}
1659 1660
1660void gfar_configure_coalescing(struct gfar_private *priv, 1661void gfar_configure_coalescing(struct gfar_private *priv,
1661 unsigned int tx_mask, unsigned int rx_mask) 1662 unsigned long tx_mask, unsigned long rx_mask)
1662{ 1663{
1663 struct gfar __iomem *regs = priv->gfargrp[0].regs; 1664 struct gfar __iomem *regs = priv->gfargrp[0].regs;
1664 u32 *baddr; 1665 u32 __iomem *baddr;
1665 int i = 0; 1666 int i = 0;
1666 1667
1667 /* Backward compatible case ---- even if we enable 1668 /* Backward compatible case ---- even if we enable
@@ -2546,7 +2547,8 @@ static int gfar_poll(struct napi_struct *napi, int budget)
2546 struct gfar_priv_tx_q *tx_queue = NULL; 2547 struct gfar_priv_tx_q *tx_queue = NULL;
2547 struct gfar_priv_rx_q *rx_queue = NULL; 2548 struct gfar_priv_rx_q *rx_queue = NULL;
2548 int rx_cleaned = 0, budget_per_queue = 0, rx_cleaned_per_queue = 0; 2549 int rx_cleaned = 0, budget_per_queue = 0, rx_cleaned_per_queue = 0;
2549 int tx_cleaned = 0, i, left_over_budget = budget, serviced_queues = 0; 2550 int tx_cleaned = 0, i, left_over_budget = budget;
2551 unsigned long serviced_queues = 0;
2550 int num_queues = 0; 2552 int num_queues = 0;
2551 unsigned long flags; 2553 unsigned long flags;
2552 2554