Skip to contentSkip to conversation

staging: comedi: drivers: fix condition with no effect

PATCH In review Saurav Girepunje 2 participants 2 messages Jan 25, 2020 – Jan 27, 2020 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: comedi: drivers: fix condition with no effect

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

---
 drivers/staging/comedi/drivers/das1800.c | 6 ------
 1 file changed, 6 deletions(-)
drivers/staging/comedi/drivers/das1800.c +0 -6
index f16aa7e9..7ab72e8 100644
@@ -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;
 	}
Signature · 1 line
1.9.1
#1 lore raw
Quoted 14 lines · Saurav Girepunje

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

---
 drivers/staging/comedi/drivers/das1800.c | 6 ------
 1 file changed, 6 deletions(-)
drivers/staging/comedi/drivers/das1800.c +0 -0
index f16aa7e9..7ab72e8 100644
@@ -1299,12 +1299,6 @@ static int das1800_attach(struct comedi_device *dev,
 			outb(DAC(i), dev->iobase + DAS1800_SELECT);

drivers/staging/comedi/drivers/das1800.c static int das1800_attach(struct comedi_device *dev, · line 1303

Quoted 10 lines
drivers/staging/comedi/drivers/das1800.c +0 -6
 			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