[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7653a794-d5ed-5d9f-95af-745a88769092@mev.co.uk>
Date: Mon, 13 Jul 2020 14:41:19 +0100
From: Ian Abbott <abbotti@....co.uk>
To: Greg KH <gregkh@...uxfoundation.org>,
Saurav Girepunje <saurav.girepunje@...il.com>
Cc: hsweeten@...ionengravers.com, devel@...verdev.osuosl.org,
linux-kernel@...r.kernel.org, saurav.girepunje@...mail.com
Subject: Re: [PATCH] Staging: comedi: driver: Remove condition with no effect
On 13/07/2020 14:34, Greg KH wrote:
> On Sun, Jul 12, 2020 at 12:36:28PM +0530, Saurav Girepunje wrote:
>> Remove below warning in das1800.c
>> WARNING: possible condition with no effect (if == else)
>>
>> Signed-off-by: Saurav Girepunje <saurav.girepunje@...il.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 f16aa7e9f4f3..7ab72e83d3d0 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;
>
> What gave that warning? The comment should show you why this is good to
> keep as-is, right?
One option is to move the comment into the '} else {' part that follows
this part.
--
-=( Ian Abbott <abbotti@....co.uk> || Web: www.mev.co.uk )=-
-=( MEV Ltd. is a company registered in England & Wales. )=-
-=( Registered number: 02862268. Registered address: )=-
-=( 15 West Park Road, Bramhall, STOCKPORT, SK7 3JZ, UK. )=-
Powered by blists - more mailing lists