diff options
author | Anton Vorontsov <avorontsov@ru.mvista.com> | 2009-11-04 07:53:00 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-08 03:43:17 -0500 |
commit | 18294ad1ecccffe6a91f6914dc1f4acd8995736a (patch) | |
tree | 4140786f1db45199ad26eeb2ab0922dd5e985c1a /drivers/net/gianfar.h | |
parent | 6748f60b948230684fe3f295220e76679c5efc52 (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.h')
-rw-r--r-- | drivers/net/gianfar.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/gianfar.h b/drivers/net/gianfar.h index 44b63daa7ff3..cbb451011cb5 100644 --- a/drivers/net/gianfar.h +++ b/drivers/net/gianfar.h | |||
@@ -986,10 +986,10 @@ struct gfar_priv_grp { | |||
986 | struct gfar_private *priv; | 986 | struct gfar_private *priv; |
987 | struct gfar __iomem *regs; | 987 | struct gfar __iomem *regs; |
988 | unsigned int grp_id; | 988 | unsigned int grp_id; |
989 | unsigned int rx_bit_map; | 989 | unsigned long rx_bit_map; |
990 | unsigned int tx_bit_map; | 990 | unsigned long tx_bit_map; |
991 | unsigned int num_tx_queues; | 991 | unsigned long num_tx_queues; |
992 | unsigned int num_rx_queues; | 992 | unsigned long num_rx_queues; |
993 | unsigned int rstat; | 993 | unsigned int rstat; |
994 | unsigned int tstat; | 994 | unsigned int tstat; |
995 | unsigned int imask; | 995 | unsigned int imask; |
@@ -1118,7 +1118,7 @@ extern void gfar_halt(struct net_device *dev); | |||
1118 | extern void gfar_phy_test(struct mii_bus *bus, struct phy_device *phydev, | 1118 | extern void gfar_phy_test(struct mii_bus *bus, struct phy_device *phydev, |
1119 | int enable, u32 regnum, u32 read); | 1119 | int enable, u32 regnum, u32 read); |
1120 | extern void gfar_configure_coalescing(struct gfar_private *priv, | 1120 | extern void gfar_configure_coalescing(struct gfar_private *priv, |
1121 | unsigned int tx_mask, unsigned int rx_mask); | 1121 | unsigned long tx_mask, unsigned long rx_mask); |
1122 | void gfar_init_sysfs(struct net_device *dev); | 1122 | void gfar_init_sysfs(struct net_device *dev); |
1123 | 1123 | ||
1124 | extern const struct ethtool_ops gfar_ethtool_ops; | 1124 | extern const struct ethtool_ops gfar_ethtool_ops; |