Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3289838ybl; Mon, 27 Jan 2020 00:51:47 -0800 (PST) X-Google-Smtp-Source: APXvYqzYdPgs0CenctDTaSJ9ExEvNUbDIVzvI27G67gDyMqp21cibo8ebCTM6ZdcRqfHkclDKAPP X-Received: by 2002:a9d:7984:: with SMTP id h4mr12064210otm.297.1580115106763; Mon, 27 Jan 2020 00:51:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580115106; cv=none; d=google.com; s=arc-20160816; b=lUJc5K+mHI+bkkk/cgDfg3AL0Wmh/iutuEc6eFP9s2NtGn1AjXQ/2O2x0W80twbN/2 W2LAOo7rhS3HD++Ve/O+EfdkABaBNnJAz45iTOz+9Oykcql0Sd4jxdupJsFA3b/0xsfV wB8M7EhBRP8jiYvp8BGpnNQkXonDmz9PupGV2D7+OZgay623KIKUp05wRCLaLH8khfDK 6dyypH+8rc1NN1J2Mxya6w/5eVFk7Qnge2MzcsrKb7tJShhvMKScean443oTjgb30VxD YGN3YOqiKlW5cTmktRoce8OL2o06yuQR3gFuhZL1exLS5Xz3kMg1hvE77dQa4ihCJYCt r5vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=OYqVXvzT0Nxa/D8evGCzueyUqWEOXT8pRhxN0eHd0lQ=; b=Qyl9dpYiZ8iaVR4XksJIy5Q1Z6wUIfs2gmc7/EGM4JxEgKKSPwXwXQbJLuMqjdk31P yXnOxQT5XAPD6kWdV2cFdoeGZOwGaiTi/z1pLLJwc+sngHDwfjeEijFHzHLV1tZcnToR 7w/RETiK06UIWa6jQmPL2o2PtwYlHMFNXnRpC1l7bzpUlUNvvm8L5v9FQvEbgrDhHKEc kyMDhO6V7QcHoZVMfBTgN681nDxOSpsp4ib6FYfZsMkw3xLLNyqiYERlKop+SgZ712oQ NzscxabUTTwqAabiqBlHPZ7KgGfzmc6ozCsn74BcqB6lmNyQ+aMU2lR+CW8bslSmxaBt 4s+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2019-08-05 header.b=ghel7p+Q; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m11si2076819oim.223.2020.01.27.00.51.34; Mon, 27 Jan 2020 00:51:46 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2019-08-05 header.b=ghel7p+Q; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728853AbgA0IO3 (ORCPT + 99 others); Mon, 27 Jan 2020 03:14:29 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:39194 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725955AbgA0IO2 (ORCPT ); Mon, 27 Jan 2020 03:14:28 -0500 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id 00R8CxIJ046723; Mon, 27 Jan 2020 08:14:23 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2019-08-05; bh=OYqVXvzT0Nxa/D8evGCzueyUqWEOXT8pRhxN0eHd0lQ=; b=ghel7p+QFtmHH1/AqahRl2ODHODakwCAjHxWZz1HgpMQceDOChFX3/MBQ/F41muKNRSt 52Q1hUcAMcF3M3CCkRcvQTp0DSJ6yLIEbiH7M/nZuQYMIbcd7iKXbjRMT9W3b5GtnfOf ds+/SY0OsWL978oR/giTgTDqJ3CM1lYtzFEptrwC8i24ej6uDRD4fUPVSv2OTiLlfdqt z/3LaIshMtz2/aVnGkBlMj0kXJ/flmtfKi4vi7Sh+szf0QYGe73FqFFMs96vWoBR+N9Y OSSuOYDK4aG62AaMjEMwGRi7z1/Cty1K7imeHBVmbymDR+kj9G/fX6aBO1g/E3aRNBnH nw== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by userp2130.oracle.com with ESMTP id 2xrd3twr2u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 27 Jan 2020 08:14:23 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id 00R8EE6W009111; Mon, 27 Jan 2020 08:14:23 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserp3020.oracle.com with ESMTP id 2xry6rc5rj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 27 Jan 2020 08:14:22 +0000 Received: from abhmp0004.oracle.com (abhmp0004.oracle.com [141.146.116.10]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 00R8DvOT016606; Mon, 27 Jan 2020 08:13:57 GMT Received: from kadam (/129.205.23.165) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 27 Jan 2020 00:13:57 -0800 Date: Mon, 27 Jan 2020 11:13:49 +0300 From: Dan Carpenter To: Saurav Girepunje Cc: hsweeten@visionengravers.com, gregkh@linuxfoundation.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, saurav.girepunje@hotmail.com Subject: Re: [PATCH] staging: comedi: drivers: fix condition with no effect Message-ID: <20200127081349.GS1847@kadam> References: <20200125131535.GA4171@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200125131535.GA4171@google.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9512 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-2001270071 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9512 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-2001270071 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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