mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [Patch] Dead code in drivers/isdn/avm/avmcard.h
@ 2006-03-07 19:48 Eric Sesterhenn
       [not found] ` <20060307203059.GB705@ds20.borg.net>
  2006-03-07 21:17 ` Olaf Titz
  0 siblings, 2 replies; 3+ messages in thread
From: Eric Sesterhenn @ 2006-03-07 19:48 UTC (permalink / raw)
  To: linux-kernel; +Cc: kkeil, kai.germaschewski

hi,

this fixes coverity id #2. the if (i==0) is pretty useless,
since we assing i=0, just the line before.
Just compile tested.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>

--- linux-2.6.16-rc5-mm1/drivers/isdn/hardware/avm/avmcard.h.orig	2006-03-07 20:44:33.000000000 +0100
+++ linux-2.6.16-rc5-mm1/drivers/isdn/hardware/avm/avmcard.h	2006-03-07 20:44:38.000000000 +0100
@@ -437,8 +437,7 @@ static inline unsigned int t1_get_slice(
 #endif
 					dp += i;
 					i = 0;
-					if (i == 0)
-						break;
+					break;
 					/* fall through */
 				default:
 					*dp++ = b1_get_byte(base);



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

* Re: [Patch] Dead code in drivers/isdn/avm/avmcard.h
       [not found] ` <20060307203059.GB705@ds20.borg.net>
@ 2006-03-07 20:38   ` Eric Sesterhenn
  0 siblings, 0 replies; 3+ messages in thread
From: Eric Sesterhenn @ 2006-03-07 20:38 UTC (permalink / raw)
  To: linux-kernel

On Tue, 2006-03-07 at 20:30 +0000, Thorsten Kranzkowski wrote:
> On Tue, Mar 07, 2006 at 08:48:20PM +0100, Eric Sesterhenn wrote:
> > hi,
> > 
> > this fixes coverity id #2. the if (i==0) is pretty useless,
> > since we assing i=0, just the line before.
> > Just compile tested.
> 
> Iff this is the right fix the comment should be removed as well, no?

updated patch below.

Signed-off-by: Eric Sesterhenn

--- linux-2.6.16-rc5-mm1/drivers/isdn/hardware/avm/avmcard.h.orig	2006-03-07 20:44:33.000000000 +0100
+++ linux-2.6.16-rc5-mm1/drivers/isdn/hardware/avm/avmcard.h	2006-03-07 21:34:31.000000000 +0100
@@ -437,9 +437,7 @@ static inline unsigned int t1_get_slice(
 #endif
 					dp += i;
 					i = 0;
-					if (i == 0)
-						break;
-					/* fall through */
+					break;
 				default:
 					*dp++ = b1_get_byte(base);
 					i--;



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

* Re: [Patch] Dead code in drivers/isdn/avm/avmcard.h
  2006-03-07 19:48 [Patch] Dead code in drivers/isdn/avm/avmcard.h Eric Sesterhenn
       [not found] ` <20060307203059.GB705@ds20.borg.net>
@ 2006-03-07 21:17 ` Olaf Titz
  1 sibling, 0 replies; 3+ messages in thread
From: Olaf Titz @ 2006-03-07 21:17 UTC (permalink / raw)
  To: linux-kernel

>  					i = 0;
> -					if (i == 0)
> -						break;
> +					break;
>  					/* fall through */
>  				default:

This leaves the "fall through" comment as bogus, remove that too.

Olaf


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

end of thread, other threads:[~2006-03-07 21:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-07 19:48 [Patch] Dead code in drivers/isdn/avm/avmcard.h Eric Sesterhenn
     [not found] ` <20060307203059.GB705@ds20.borg.net>
2006-03-07 20:38   ` Eric Sesterhenn
2006-03-07 21:17 ` Olaf Titz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome