Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp503903ybh; Sat, 18 Jul 2020 10:37:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw2IRqtHpx/6SjA5rbhNhQd5aADQVaSH9RMDJwCD8xh8vazGHF+TayCqcLZz+MaX3BHbxhv X-Received: by 2002:a05:6402:363:: with SMTP id s3mr14083888edw.238.1595093876829; Sat, 18 Jul 2020 10:37:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595093876; cv=none; d=google.com; s=arc-20160816; b=escdaAfdvah5BCsFzmR1ftoPsqu22IUdJOVHiQogMFAivRklP07hqDti043EcpRWCk DiOfhKUfqp91HrlOsyeoHZjoAS7SgUIiLUhGVYhP7FSJ3aURYjLQE8LDCd8W1RIR33h9 y2SDx6UFg6EVOYcbf6ayez2jb40DH+NAcfakA51KILIWgc4S5vA8FmivC4m9McyK8poX Jn/ovOpeU5qd28ntfpDHuptYmSU6SIL6JpKvkQwRkDNvUfp4aWbTYADLNdo9AJV9a/QP tL6iQqIK3+m0SQ1LHWfthFNa+zaLBAc/oKZ9/l9eUYMVpJmy5i01GEGXCGI+2iyzXajw tmhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=HcAfWAuJs7AnNRSRiy1oRmYmT0Pdkox9ao1uD5Mkx/Y=; b=G6YvgZ70TGbqmZi+Hx6d/ex2JgFlty8EcG7LmKgs8N4CMnUZE134Z4hO1MhPsVRc1w idOFa8wGBvdSB01yQVK95o6TRu3McXerljqkyaAGjg/l8pnO4z28ZhlIPNawVDAIaYL6 zmJVbDrzlgx2QfFQoB6yAxEjmxdLC/ZxSnsxgRaSWFuWd1+4UY6r2j4ali9yDzSkkr+/ NUi8BdyMwOmPYfgYaA5i4m3uKKRSWs3P/wxogs7ZORUBV42NJ/AB2z3FdEF7pWyZ5HzL f1ij4nYmxUioXWcUAYl7xEm02iCJ7QHxpiPLkRQlGXyS7mwnamT5B8y1wRityjb69zdC Mfvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=bPWyxXN1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a9si7525170ejx.271.2020.07.18.10.37.33; Sat, 18 Jul 2020 10:37:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=bPWyxXN1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728310AbgGRRXh (ORCPT + 99 others); Sat, 18 Jul 2020 13:23:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727926AbgGRRXh (ORCPT ); Sat, 18 Jul 2020 13:23:37 -0400 Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0EED9C0619D2 for ; Sat, 18 Jul 2020 10:23:37 -0700 (PDT) Received: by mail-pg1-x541.google.com with SMTP id s189so8219710pgc.13 for ; Sat, 18 Jul 2020 10:23:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=HcAfWAuJs7AnNRSRiy1oRmYmT0Pdkox9ao1uD5Mkx/Y=; b=bPWyxXN1h5W20gdA0xK4HiU6GdVqO7ebCxVKv/03F7Eslhe8nhI1NzX/aujdjP6Rox 5yvEoXivKhEiAbamNsQOJxUCMrZh9rTqqplKu8CcUo67FpJJDHI/dq99hxulvEKpOk/j UyOpIMZXhrQ/57rfjN0PS950oJWPNHKIjjqI5DIlK/kji2llpmjLZ83y40KbckMFnDq0 dnBLavB7dA5j0+LWh68SXr6moLXt6YvgIyDSMevXlgEuX2qIh2+KXcKXHSGD9Nqg6IMx 9Cd1Rm6DZoqrivpcrxjp8O/A8EXCIfFvq2l/wwk6ITipgFSFwjawn+TqD5ND5gOj78IG XqJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=HcAfWAuJs7AnNRSRiy1oRmYmT0Pdkox9ao1uD5Mkx/Y=; b=ntAnVpPoa93kLQY55FJEnIXYp0ntMGnki4bm9pNB8cY5cz+rIJ2SisbplP7tWDG2el PeI7n6V10/CB9H1AXr4qIWcMjrHOGbUgbIQowYqVqco6pHnJzz0YMpoIctUdbg5kgzPG lRcoSAC+BSIHEJ01IvxPMu5xM5C0FZ+TSrdNPC380mj4utonnRxNYMcCyZFhyKe1Gy7H YftgJK6W4rwDcw2LN4KIw3KcVK01vGNbzSdfKoNYdmogrSD4SxskT1wX7islbDnvMtdL +ePfG1lSL05xjFnga2w7AXkKJWx7GQXRsf2sWaQkscUHtVGFdaRU5Bitb8FGaf+4MFN0 BaEQ== X-Gm-Message-State: AOAM532ahrBiHgPa33C9Up2BFUv+biMcTEQgrbUgGxMb+CydJghQDjJ7 hlOVlSV7gherCeONGVM1Kf4m93usMuw= X-Received: by 2002:a63:7357:: with SMTP id d23mr13162695pgn.393.1595093016518; Sat, 18 Jul 2020 10:23:36 -0700 (PDT) Received: from saurav ([203.109.108.46]) by smtp.gmail.com with ESMTPSA id q20sm10903991pfn.111.2020.07.18.10.23.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Jul 2020 10:23:35 -0700 (PDT) Date: Sat, 18 Jul 2020 22:53:30 +0530 From: SAURAV GIREPUNJE To: Ian Abbott , gregkh@linuxfoundation.org Cc: hsweeten@visionengravers.com, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, saurav.girepunje@hotmail.com Subject: Re: [PATCH] Staging: comedi: driver: Remove condition with no effect Message-ID: <20200718172330.GA27103@saurav> References: <20200712070628.GA18340@saurav> <20200713133438.GA3122574@kroah.com> <7653a794-d5ed-5d9f-95af-745a88769092@mev.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7653a794-d5ed-5d9f-95af-745a88769092@mev.co.uk> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 13, 2020 at 02:41:19PM +0100, Ian Abbott wrote: > 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 > > > --- > > > 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 || 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. )=- @gregkh : Got the warning using coccinelle. @Ian: Yes, we can move comment to else part.