All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: comedi: drivers: fix condition with no effect
@ 2020-01-25 13:15 ` Saurav Girepunje
  0 siblings, 0 replies; 4+ messages in thread
From: Saurav Girepunje @ 2020-01-25 13:15 UTC (permalink / raw)
  To: hsweeten, gregkh, saurav.girepunje, devel, linux-kernel; +Cc: saurav.girepunje

fix warning reorted by coccicheck
WARNING: possible condition with no effect (if == else)

Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com>
---
  drivers/staging/comedi/drivers/das1800.c | 6 ------
  1 file changed, 6 deletions(-)

diff --git a/drivers/staging/comedi/drivers/das1800.c b/drivers/staging/comedi/drivers/das1800.c
index f16aa7e9..7ab72e8 100644
--- a/drivers/staging/comedi/drivers/das1800.c
+++ b/drivers/staging/comedi/drivers/das1800.c
@@ -1299,12 +1299,6 @@ static int das1800_attach(struct comedi_device *dev,
  			outb(DAC(i), dev->iobase + DAS1800_SELECT);
  			outw(0, dev->iobase + DAS1800_DAC);
  		}
-	} else if (board->id == DAS1800_ID_AO) {
-		/*
-		 * 'ao' boards have waveform analog outputs that are not
-		 * currently supported.
-		 */
-		s->type		= COMEDI_SUBD_UNUSED;
  	} else {
  		s->type		= COMEDI_SUBD_UNUSED;
  	}
-- 
1.9.1


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

* [PATCH] staging: comedi: drivers: fix condition with no effect
@ 2020-01-25 13:15 ` Saurav Girepunje
  0 siblings, 0 replies; 4+ messages in thread
From: Saurav Girepunje @ 2020-01-25 13:15 UTC (permalink / raw)
  To: hsweeten, gregkh, saurav.girepunje, devel, linux-kernel; +Cc: saurav.girepunje

fix warning reorted by coccicheck
WARNING: possible condition with no effect (if == else)

Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com>
---
  drivers/staging/comedi/drivers/das1800.c | 6 ------
  1 file changed, 6 deletions(-)

diff --git a/drivers/staging/comedi/drivers/das1800.c b/drivers/staging/comedi/drivers/das1800.c
index f16aa7e9..7ab72e8 100644
--- a/drivers/staging/comedi/drivers/das1800.c
+++ b/drivers/staging/comedi/drivers/das1800.c
@@ -1299,12 +1299,6 @@ static int das1800_attach(struct comedi_device *dev,
  			outb(DAC(i), dev->iobase + DAS1800_SELECT);
  			outw(0, dev->iobase + DAS1800_DAC);
  		}
-	} else if (board->id == DAS1800_ID_AO) {
-		/*
-		 * 'ao' boards have waveform analog outputs that are not
-		 * currently supported.
-		 */
-		s->type		= COMEDI_SUBD_UNUSED;
  	} else {
  		s->type		= COMEDI_SUBD_UNUSED;
  	}
-- 
1.9.1

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH] staging: comedi: drivers: fix condition with no effect
  2020-01-25 13:15 ` Saurav Girepunje
@ 2020-01-27  8:13   ` Dan Carpenter
  -1 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2020-01-27  8:13 UTC (permalink / raw)
  To: Saurav Girepunje; +Cc: hsweeten, gregkh, devel, linux-kernel, saurav.girepunje

On Sat, Jan 25, 2020 at 06:45:35PM +0530, Saurav Girepunje wrote:
> fix warning reorted by coccicheck
> WARNING: possible condition with no effect (if == else)
> 
> Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com>
> ---
>  drivers/staging/comedi/drivers/das1800.c | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/drivers/staging/comedi/drivers/das1800.c b/drivers/staging/comedi/drivers/das1800.c
> index f16aa7e9..7ab72e8 100644
> --- a/drivers/staging/comedi/drivers/das1800.c
> +++ b/drivers/staging/comedi/drivers/das1800.c
> @@ -1299,12 +1299,6 @@ static int das1800_attach(struct comedi_device *dev,
>  			outb(DAC(i), dev->iobase + DAS1800_SELECT);
>  			outw(0, dev->iobase + DAS1800_DAC);
>  		}
> -	} else if (board->id == DAS1800_ID_AO) {
> -		/*
> -		 * 'ao' boards have waveform analog outputs that are not
> -		 * currently supported.
> -		 */
> -		s->type		= COMEDI_SUBD_UNUSED;
>  	} else {
>  		s->type		= COMEDI_SUBD_UNUSED;

This is for documentation.  Just leave it as-is.

regards,
dan carpenter


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

* Re: [PATCH] staging: comedi: drivers: fix condition with no effect
@ 2020-01-27  8:13   ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2020-01-27  8:13 UTC (permalink / raw)
  To: Saurav Girepunje; +Cc: devel, saurav.girepunje, linux-kernel, gregkh

On Sat, Jan 25, 2020 at 06:45:35PM +0530, Saurav Girepunje wrote:
> fix warning reorted by coccicheck
> WARNING: possible condition with no effect (if == else)
> 
> Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com>
> ---
>  drivers/staging/comedi/drivers/das1800.c | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/drivers/staging/comedi/drivers/das1800.c b/drivers/staging/comedi/drivers/das1800.c
> index f16aa7e9..7ab72e8 100644
> --- a/drivers/staging/comedi/drivers/das1800.c
> +++ b/drivers/staging/comedi/drivers/das1800.c
> @@ -1299,12 +1299,6 @@ static int das1800_attach(struct comedi_device *dev,
>  			outb(DAC(i), dev->iobase + DAS1800_SELECT);
>  			outw(0, dev->iobase + DAS1800_DAC);
>  		}
> -	} else if (board->id == DAS1800_ID_AO) {
> -		/*
> -		 * 'ao' boards have waveform analog outputs that are not
> -		 * currently supported.
> -		 */
> -		s->type		= COMEDI_SUBD_UNUSED;
>  	} else {
>  		s->type		= COMEDI_SUBD_UNUSED;

This is for documentation.  Just leave it as-is.

regards,
dan carpenter

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

end of thread, other threads:[~2020-01-27  8:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-25 13:15 [PATCH] staging: comedi: drivers: fix condition with no effect Saurav Girepunje
2020-01-25 13:15 ` Saurav Girepunje
2020-01-27  8:13 ` Dan Carpenter
2020-01-27  8:13   ` Dan Carpenter

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.