public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: &&/|| typo
@ 2009-02-15 19:28 Roel Kluin
  2009-02-15 19:36 ` Roland Dreier
  0 siblings, 1 reply; 3+ messages in thread
From: Roel Kluin @ 2009-02-15 19:28 UTC (permalink / raw)
  To: Greg KH; +Cc: lkml, Andrew Morton

Only error out on unexpected fifo size.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
diff --git a/drivers/staging/comedi/drivers/rtd520.c b/drivers/staging/comedi/drivers/rtd520.c
index 65d5242..6c7d543 100644
--- a/drivers/staging/comedi/drivers/rtd520.c
+++ b/drivers/staging/comedi/drivers/rtd520.c
@@ -1234,7 +1234,7 @@ static int rtd520_probe_fifo_depth(comedi_device *dev)
 		return -EIO;
 	}
 	RtdAdcClearFifo(dev);
-	if(fifo_size != 0x400 || fifo_size != 0x2000)
+	if(fifo_size != 0x400 && fifo_size != 0x2000)
 	{
 		rt_printk("\ncomedi: %s: unexpected fifo size of %i, expected 1024 or 8192.\n",
 			DRV_NAME, fifo_size);

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

* Re: [PATCH] staging: &&/|| typo
  2009-02-15 19:28 [PATCH] staging: &&/|| typo Roel Kluin
@ 2009-02-15 19:36 ` Roland Dreier
  2009-02-18  1:44   ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Roland Dreier @ 2009-02-15 19:36 UTC (permalink / raw)
  To: Roel Kluin; +Cc: Greg KH, lkml, Andrew Morton

 > -	if(fifo_size != 0x400 || fifo_size != 0x2000)
 > +	if(fifo_size != 0x400 && fifo_size != 0x2000)

What does the presence of this bug say about the probability that this
code has ever been used for anything real?

 - R.

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

* Re: [PATCH] staging: &&/|| typo
  2009-02-15 19:36 ` Roland Dreier
@ 2009-02-18  1:44   ` Greg KH
  0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2009-02-18  1:44 UTC (permalink / raw)
  To: Roland Dreier; +Cc: Roel Kluin, Greg KH, lkml, Andrew Morton

On Sun, Feb 15, 2009 at 11:36:54AM -0800, Roland Dreier wrote:
>  > -	if(fifo_size != 0x400 || fifo_size != 0x2000)
>  > +	if(fifo_size != 0x400 && fifo_size != 0x2000)
> 
> What does the presence of this bug say about the probability that this
> code has ever been used for anything real?

With the comedi drivers, I really don't know, they have not had that
much wide exposure before, despite being around for a very long time.

thanks,

greg k-h

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

end of thread, other threads:[~2009-02-18  2:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-15 19:28 [PATCH] staging: &&/|| typo Roel Kluin
2009-02-15 19:36 ` Roland Dreier
2009-02-18  1:44   ` Greg KH

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