* [PATCH] staging: &&/|| typo
@ 2009-02-15 19:51 Roel Kluin
2009-02-16 9:40 ` Takashi Iwai
0 siblings, 1 reply; 5+ messages in thread
From: Roel Kluin @ 2009-02-15 19:51 UTC (permalink / raw)
To: tiwai; +Cc: alsa-devel, Andrew Morton
&&/|| typo
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
// vi sound/oss/ad1848.c +83
#define MD_1845 4
...
#define MD_1845_SSCAPE 9 /* Ensoniq Soundscape PNP*/
diff --git a/sound/oss/ad1848.c b/sound/oss/ad1848.c
index 7cf9913..a5b8356 100644
--- a/sound/oss/ad1848.c
+++ b/sound/oss/ad1848.c
@@ -2107,7 +2107,7 @@ int ad1848_control(int cmd, int arg)
switch (cmd)
{
case AD1848_SET_XTAL: /* Change clock frequency of AD1845 (only ) */
- if (devc->model != MD_1845 || devc->model != MD_1845_SSCAPE)
+ if (devc->model != MD_1845 && devc->model != MD_1845_SSCAPE)
return -EINVAL;
spin_lock_irqsave(&devc->lock,flags);
ad_enter_MCE(devc);
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] staging: &&/|| typo
2009-02-15 19:51 [PATCH] staging: &&/|| typo Roel Kluin
@ 2009-02-16 9:40 ` Takashi Iwai
0 siblings, 0 replies; 5+ messages in thread
From: Takashi Iwai @ 2009-02-16 9:40 UTC (permalink / raw)
To: Roel Kluin; +Cc: alsa-devel, Andrew Morton
At Sun, 15 Feb 2009 20:51:19 +0100,
Roel Kluin wrote:
>
> &&/|| typo
>
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Thanks, applied now.
Though, this change wasn't really tested by any hardware and it's
no urgent issue, I'll put it for the next kernel.
Takashi
> ---
> // vi sound/oss/ad1848.c +83
> #define MD_1845 4
> ...
> #define MD_1845_SSCAPE 9 /* Ensoniq Soundscape PNP*/
>
> diff --git a/sound/oss/ad1848.c b/sound/oss/ad1848.c
> index 7cf9913..a5b8356 100644
> --- a/sound/oss/ad1848.c
> +++ b/sound/oss/ad1848.c
> @@ -2107,7 +2107,7 @@ int ad1848_control(int cmd, int arg)
> switch (cmd)
> {
> case AD1848_SET_XTAL: /* Change clock frequency of AD1845 (only ) */
> - if (devc->model != MD_1845 || devc->model != MD_1845_SSCAPE)
> + if (devc->model != MD_1845 && devc->model != MD_1845_SSCAPE)
> return -EINVAL;
> spin_lock_irqsave(&devc->lock,flags);
> ad_enter_MCE(devc);
>
^ permalink raw reply [flat|nested] 5+ 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; 5+ 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] 5+ messages in thread
* Re: [PATCH] staging: &&/|| typo
2009-02-15 19:28 Roel Kluin
@ 2009-02-15 19:36 ` Roland Dreier
2009-02-18 1:44 ` Greg KH
0 siblings, 1 reply; 5+ 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] 5+ messages in thread
* [PATCH] staging: &&/|| typo
@ 2009-02-15 19:28 Roel Kluin
2009-02-15 19:36 ` Roland Dreier
0 siblings, 1 reply; 5+ 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] 5+ messages in thread
end of thread, other threads:[~2009-02-18 2:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-15 19:51 [PATCH] staging: &&/|| typo Roel Kluin
2009-02-16 9:40 ` Takashi Iwai
-- strict thread matches above, loose matches on Subject: below --
2009-02-15 19:28 Roel Kluin
2009-02-15 19:36 ` Roland Dreier
2009-02-18 1:44 ` Greg KH
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.