hp100: remove set but not used variable val
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH v2 1/1 hp100: remove set but not used variable val
From: Chenwandun <[email protected]>
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/staging/hp/hp100.c: In function hp100_start_xmit:drivers/staging/hp/hp100.c:1629:10: warning: variable val set but not used [-Wunused-but-set-variable]
--- drivers/staging/hp/hp100.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/staging/hp/hp100.c +4 -0
@@ -1626,7 +1626,9 @@ static netdev_tx_t hp100_start_xmit(struct sk_buff *skb,unsigned long flags;int i, ok_flag;int ioaddr = dev->base_addr; +#ifdef HP100_DEBUG_TX u_short val; +#endif struct hp100_private *lp =netdev_priv (dev);#ifdef HP100_DEBUG_B
@@ -1695,7 +1697,9 @@ static netdev_tx_t hp100_start_xmit(struct sk_buff *skb,spin_lock_irqsave (&lp->lock, flags);hp100_ints_off (); +#ifdef HP100_DEBUG_TX val =hp100_inw (IRQ_STATUS ); +#endif /* Ack / clear the interrupt TX_COMPLETE interrupt - this interrupt is set * when the current packet being transmitted on the wire is completed. */ hp100_outw (HP100_TX_COMPLETE ,IRQ_STATUS );
Signature · 1 line
2.7.4
Quoted 9 lines · Chen Wandun
From: Chenwandun <[email protected]>
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/staging/hp/hp100.c: In functionhp100_start_xmit:drivers/staging/hp/hp100.c:1629:10: warning: variable val set but not used [-Wunused-but-set-variable]Signed-off-by Chenwandun <[email protected]>---
You should explain why you are sending a v2 under the --- cut off line.
The v1 was the correct patch, but this driver is going to be deleted soon so I don't think we are accepting this sort of cleanup.
regards,
dan carpenter
Greg KH
maintainerQuoted 8 lines · Chen Wandun
From: Chenwandun <[email protected]>
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/staging/hp/hp100.c: In functionhp100_start_xmit:drivers/staging/hp/hp100.c:1629:10: warning: variable val set but not used [-Wunused-but-set-variable]Signed-off-by Chenwandun <[email protected]>
I need a "full" name here, like the one on your email "From:" line.
Quoted 9 lines
--- drivers/staging/hp/hp100.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/staging/hp/hp100.c +0
-0
drivers/staging/hp/hp100.c static netdev_tx_t hp100_start_xmit(struct sk_buff *skb, · line 1631
Quoted 6 lines
drivers/staging/hp/hp100.c +2
-0@@ -1626,7 +1626,9 @@ static netdev_tx_t hp100_start_xmit(struct sk_buff *skb,unsigned long flags;int i, ok_flag;int ioaddr = dev->base_addr; +#ifdef HP100_DEBUG_TX u_short val; +#endif
#ifdefs are not ok in .c code, sorry.
drivers/staging/hp/hp100.c static netdev_tx_t hp100_start_xmit(struct sk_buff *skb, · line 1701
Quoted 9 lines
drivers/staging/hp/hp100.c +1
-0struct hp100_private *lp =netdev_priv (dev);#ifdef HP100_DEBUG_B @@ -1695,7 +1697,9 @@ static netdev_tx_t hp100_start_xmit(struct sk_buff *skb,spin_lock_irqsave (&lp->lock, flags);hp100_ints_off (); +#ifdef HP100_DEBUG_TX val =hp100_inw (IRQ_STATUS );
Are you sure that this doesn't actually change the hardware in some way?
thanks,
greg k-h
Quoted 11 lines · Greg KH
Quoted 8 lines · Chen Wandun
From: Chenwandun <[email protected]>
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/staging/hp/hp100.c: In functionhp100_start_xmit:drivers/staging/hp/hp100.c:1629:10: warning: variable val set but not used [-Wunused-but-set-variable]Signed-off-by Chenwandun <[email protected]>I need a "full" name here, like the one on your email "From:" line.
You also need the submitter to run checkpatch on the patch and not just the file.
WARNING: drivers/staging/hp/hp100.c is marked as 'obsolete' in the MAINTAINERS hierarchy. No unnecessary modifications please.
WARNING: drivers/staging/hp/hp100.c is marked as 'obsolete' in the MAINTAINERS hierarchy. No unnecessary modifications please.
total: 0 errors, 2 warnings, 0 checks, 18 lines checked
Quoted 1 line
drivers/staging/hp/hp100.c
Quoted 1 line
drivers/staging/hp/hp100.c +0
-0
[]
Quoted 15 lines
drivers/staging/hp/hp100.c static netdev_tx_t hp100_start_xmit(struct sk_buff *skb, · line 1631
Quoted 7 lines
drivers/staging/hp/hp100.c +2
-0@@ -1626,7 +1626,9 @@ static netdev_tx_t hp100_start_xmit(struct sk_buff *skb,unsigned long flags;int i, ok_flag;int ioaddr = dev->base_addr; +#ifdef HP100_DEBUG_TX u_short val; +#endif #ifdefs are not ok in .c code, sorry.
Quoted 5 lines
drivers/staging/hp/hp100.c +0
-0struct hp100_private *lp =netdev_priv (dev);#ifdef HP100_DEBUG_B @@ -1695,7 +1697,9 @@ static netdev_tx_t hp100_start_xmit(struct sk_buff *skb,
Quoted 6 lines
drivers/staging/hp/hp100.c static netdev_tx_t hp100_start_xmit(struct sk_buff *skb, · line 1701
Quoted 4 lines
drivers/staging/hp/hp100.c +1
-0spin_lock_irqsave (&lp->lock, flags);hp100_ints_off (); +#ifdef HP100_DEBUG_TX val =hp100_inw (IRQ_STATUS );Are you sure that this doesn't actually change the hardware in some way?
If anyone still _has_ the hardware, please let me know.
I have the only VG test equipment I know of in a box somewhere in my basement and it's yours for the asking and the postage.
It hasn't been powered on in 25 years, no guarantees...