diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2006-03-08 06:49:31 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-03-11 20:32:17 -0500 |
commit | a4d4d5181d043ea835c15da6c85a5bbecbaded6e (patch) | |
tree | dcc0093113b8ae06eaa85e5e1b23fde22a34cb60 /drivers/net/sgiseeq.c | |
parent | 60a89ff6d2681029b3d46b5d23dccf2903a254b4 (diff) |
[PATCH] Sparse: Cleanup sgiseeq sparse warnings.
o Make sgiseeq_dump_rings static.
o Delete unused sgiseeq_my_reset.
o Move DEBUG define to beginning where it's easier to spot and will be
seen by <linux/kernel.h> as well.
o Use NULL for pointer initialization.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/sgiseeq.c')
-rw-r--r-- | drivers/net/sgiseeq.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/drivers/net/sgiseeq.c b/drivers/net/sgiseeq.c index a4614df38a90..f95a5b0223fb 100644 --- a/drivers/net/sgiseeq.c +++ b/drivers/net/sgiseeq.c | |||
@@ -3,6 +3,9 @@ | |||
3 | * | 3 | * |
4 | * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com) | 4 | * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com) |
5 | */ | 5 | */ |
6 | |||
7 | #undef DEBUG | ||
8 | |||
6 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
7 | #include <linux/module.h> | 10 | #include <linux/module.h> |
8 | #include <linux/errno.h> | 11 | #include <linux/errno.h> |
@@ -59,8 +62,6 @@ static char *sgiseeqstr = "SGI Seeq8003"; | |||
59 | sp->tx_old + (SEEQ_TX_BUFFERS - 1) - sp->tx_new : \ | 62 | sp->tx_old + (SEEQ_TX_BUFFERS - 1) - sp->tx_new : \ |
60 | sp->tx_old - sp->tx_new - 1) | 63 | sp->tx_old - sp->tx_new - 1) |
61 | 64 | ||
62 | #define DEBUG | ||
63 | |||
64 | struct sgiseeq_rx_desc { | 65 | struct sgiseeq_rx_desc { |
65 | volatile struct hpc_dma_desc rdma; | 66 | volatile struct hpc_dma_desc rdma; |
66 | volatile signed int buf_vaddr; | 67 | volatile signed int buf_vaddr; |
@@ -209,7 +210,7 @@ static int seeq_init_ring(struct net_device *dev) | |||
209 | static struct sgiseeq_private *gpriv; | 210 | static struct sgiseeq_private *gpriv; |
210 | static struct net_device *gdev; | 211 | static struct net_device *gdev; |
211 | 212 | ||
212 | void sgiseeq_dump_rings(void) | 213 | static void sgiseeq_dump_rings(void) |
213 | { | 214 | { |
214 | static int once; | 215 | static int once; |
215 | struct sgiseeq_rx_desc *r = gpriv->rx_desc; | 216 | struct sgiseeq_rx_desc *r = gpriv->rx_desc; |
@@ -311,9 +312,9 @@ static inline void sgiseeq_rx(struct net_device *dev, struct sgiseeq_private *sp | |||
311 | struct sgiseeq_regs *sregs) | 312 | struct sgiseeq_regs *sregs) |
312 | { | 313 | { |
313 | struct sgiseeq_rx_desc *rd; | 314 | struct sgiseeq_rx_desc *rd; |
314 | struct sk_buff *skb = 0; | 315 | struct sk_buff *skb = NULL; |
315 | unsigned char pkt_status; | 316 | unsigned char pkt_status; |
316 | unsigned char *pkt_pointer = 0; | 317 | unsigned char *pkt_pointer = NULL; |
317 | int len = 0; | 318 | int len = 0; |
318 | unsigned int orig_end = PREV_RX(sp->rx_new); | 319 | unsigned int orig_end = PREV_RX(sp->rx_new); |
319 | 320 | ||
@@ -515,12 +516,6 @@ static inline int sgiseeq_reset(struct net_device *dev) | |||
515 | return 0; | 516 | return 0; |
516 | } | 517 | } |
517 | 518 | ||
518 | void sgiseeq_my_reset(void) | ||
519 | { | ||
520 | printk("RESET!\n"); | ||
521 | sgiseeq_reset(gdev); | ||
522 | } | ||
523 | |||
524 | static int sgiseeq_start_xmit(struct sk_buff *skb, struct net_device *dev) | 519 | static int sgiseeq_start_xmit(struct sk_buff *skb, struct net_device *dev) |
525 | { | 520 | { |
526 | struct sgiseeq_private *sp = netdev_priv(dev); | 521 | struct sgiseeq_private *sp = netdev_priv(dev); |