netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [KJ][Patch] remove dead code in bcm43xx_sysfs.c
@ 2006-09-07  7:27 Darren Jenkins\
  2006-09-07  7:33 ` Darren Jenkins\
  2006-09-07 10:07 ` [KJ][Patch][update] " Darren Jenkins\
  0 siblings, 2 replies; 3+ messages in thread
From: Darren Jenkins\ @ 2006-09-07  7:27 UTC (permalink / raw)
  To: kernel Janitors; +Cc: mb, NetDev

G'day people,

Coverity CID 1161

This is probably fixed in some external tree, but in case it isn't, here is a patch


Compile tested with allyesconfig


Remove some dead code from bcm43xx_sysfs.c in 2.6.18-rc6

Signed-off-by: Darren Jenkins <darrenrjenkins@gmail.com>
--- drivers/net/wireless/bcm43xx/bcm43xx_sysfs.c.orig	2006-09-07 15:40:33.000000000 +1000
+++ drivers/net/wireless/bcm43xx/bcm43xx_sysfs.c	2006-09-07 15:42:02.000000000 +1000
@@ -276,7 +276,6 @@ static ssize_t bcm43xx_attr_preamble_sto
 {
 	struct bcm43xx_private *bcm = dev_to_bcm(dev);
 	unsigned long flags;
-	int err;
 	int value;
 
 	if (!capable(CAP_NET_ADMIN))
@@ -289,10 +288,9 @@ static ssize_t bcm43xx_attr_preamble_sto
 
 	bcm->short_preamble = !!value;
 
-	err = 0;
 	bcm43xx_unlock_irqsafe(bcm, flags);
 
-	return err ? err : count;
+	return count;
 }
 
 static DEVICE_ATTR(shortpreamble, 0644,



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [KJ][Patch] remove dead code in bcm43xx_sysfs.c
  2006-09-07  7:27 [KJ][Patch] remove dead code in bcm43xx_sysfs.c Darren Jenkins\
@ 2006-09-07  7:33 ` Darren Jenkins\
  2006-09-07 10:07 ` [KJ][Patch][update] " Darren Jenkins\
  1 sibling, 0 replies; 3+ messages in thread
From: Darren Jenkins\ @ 2006-09-07  7:33 UTC (permalink / raw)
  To: kernel Janitors; +Cc: mb, NetDev

Sorry people I have done it again!

Both Coverity CID 1160 and 1161 are for the same file.

I will whip up a combined patch

Darren J.


On Thu, 2006-09-07 at 17:27 +1000, Darren Jenkins\ wrote:
> G'day people,
> 
> Coverity CID 1161
> 
> This is probably fixed in some external tree, but in case it isn't, here is a patch
> 
> 
> Compile tested with allyesconfig
> 
> 
> Remove some dead code from bcm43xx_sysfs.c in 2.6.18-rc6
> 
> Signed-off-by: Darren Jenkins <darrenrjenkins@gmail.com>
> --- drivers/net/wireless/bcm43xx/bcm43xx_sysfs.c.orig	2006-09-07 15:40:33.000000000 +1000
> +++ drivers/net/wireless/bcm43xx/bcm43xx_sysfs.c	2006-09-07 15:42:02.000000000 +1000
> @@ -276,7 +276,6 @@ static ssize_t bcm43xx_attr_preamble_sto
>  {
>  	struct bcm43xx_private *bcm = dev_to_bcm(dev);
>  	unsigned long flags;
> -	int err;
>  	int value;
>  
>  	if (!capable(CAP_NET_ADMIN))
> @@ -289,10 +288,9 @@ static ssize_t bcm43xx_attr_preamble_sto
>  
>  	bcm->short_preamble = !!value;
>  
> -	err = 0;
>  	bcm43xx_unlock_irqsafe(bcm, flags);
>  
> -	return err ? err : count;
> +	return count;
>  }
>  
>  static DEVICE_ATTR(shortpreamble, 0644,
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [KJ][Patch][update] remove dead code in bcm43xx_sysfs.c
  2006-09-07  7:27 [KJ][Patch] remove dead code in bcm43xx_sysfs.c Darren Jenkins\
  2006-09-07  7:33 ` Darren Jenkins\
@ 2006-09-07 10:07 ` Darren Jenkins\
  1 sibling, 0 replies; 3+ messages in thread
From: Darren Jenkins\ @ 2006-09-07 10:07 UTC (permalink / raw)
  To: kernel Janitors; +Cc: mb, NetDev

G'day people

Coverity CID 1160 & 1161

These are probably fixed in some external tree, but in case they are
not, here is a patch

Compile tested with allyesconfig

Remove some dead cose from bcm43xx_sysfs.c in 2.6.18-rc6

Signed-off-by: Darren Jenkins <darrenrjenkins@gmail.com>
--- drivers/net/wireless/bcm43xx/bcm43xx_sysfs.c.orig	2006-09-07 15:40:33.000000000 +1000
+++ drivers/net/wireless/bcm43xx/bcm43xx_sysfs.c	2006-09-07 17:35:18.000000000 +1000
@@ -251,7 +251,6 @@ static ssize_t bcm43xx_attr_preamble_sho
 					  char *buf)
 {
 	struct bcm43xx_private *bcm = dev_to_bcm(dev);
-	int err;
 	ssize_t count;
 
 	if (!capable(CAP_NET_ADMIN))
@@ -264,10 +263,9 @@ static ssize_t bcm43xx_attr_preamble_sho
 	else
 		count = snprintf(buf, PAGE_SIZE, "0 (Short Preamble disabled)\n");
 
-	err = 0;
 	bcm43xx_unlock_noirq(bcm);
 
-	return err ? err : count;
+	return count;
 }
 
 static ssize_t bcm43xx_attr_preamble_store(struct device *dev,
@@ -276,7 +274,6 @@ static ssize_t bcm43xx_attr_preamble_sto
 {
 	struct bcm43xx_private *bcm = dev_to_bcm(dev);
 	unsigned long flags;
-	int err;
 	int value;
 
 	if (!capable(CAP_NET_ADMIN))
@@ -289,10 +286,9 @@ static ssize_t bcm43xx_attr_preamble_sto
 
 	bcm->short_preamble = !!value;
 
-	err = 0;
 	bcm43xx_unlock_irqsafe(bcm, flags);
 
-	return err ? err : count;
+	return count;
 }
 
 static DEVICE_ATTR(shortpreamble, 0644,



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-09-07 10:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-07  7:27 [KJ][Patch] remove dead code in bcm43xx_sysfs.c Darren Jenkins\
2006-09-07  7:33 ` Darren Jenkins\
2006-09-07 10:07 ` [KJ][Patch][update] " Darren Jenkins\

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).