Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp913596pxb; Tue, 8 Feb 2022 05:28:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJxGSyeReLbSknuTOenr8bb/z/JZ9aSSvX6s2CaBmdF8gU8JHZ76fP33T775XvwnGZyXSw/E X-Received: by 2002:a17:90b:3ec8:: with SMTP id rm8mr1357501pjb.207.1644326896405; Tue, 08 Feb 2022 05:28:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644326896; cv=none; d=google.com; s=arc-20160816; b=LyIWyZGGeIInFdu5MNaPIopCZl1xCo6aKSPt4bjIktO9pJdRF1/NkWjdMm3jU2jSkt s4SAQpvQnJy55rY1XDmPLkRnMw0nTigi8aa/gxdPbv0Zk3ZPZU3MMmnn8ZFpCwrb3z5I sERAWqLgmX7FcjzSZDL8BjWslW09rSV1adruyIkqucZJ/yZh6EkhWBpQvQ9ZVMHi5Mf6 9JLTjJOKWnWlPQwLXrkz/bFVky+V3hhG2mIfsqCd48pLoV+62b2srE5BIaVasj+uk+5W KJ3PWkOa+Y6TDwEBpBz7bPKjd98BGcSi4ttsXGnSGrvVFFNo0LStD6zQ6FvksTWko9N4 yPgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=pbZJ8GVE6aZJf61331JivAwRQHUVNpzfRBxZLglKKlY=; b=fUX5YrRXi4U3Og9AA+Wsi+l4OuK+lzoe68eZWVrlmO86lJX4urvRVQOmECIUjH1mSq c1vnm6eTDeGXXsqRD2Wp1yImo6QGKGMUPvBMVtynhQNsvN7RCaZQL1oiq5E74UCVwF5r IO4TyfGIbCRvOFxOQjM91rSIQC/AeShqJYMhOE7EKDtDB0UgCLlr27PFNCl7AVzXBMW8 LJG70fAsmP34ByLDlQLkUJXlVgLc/EoN7HPg+wcDuCKzCYX0eQlMdBMr115exWnIRn+E OYKoZZqkNy6keKbz6HLalUsyjzcI9OIi6SgyhIIQjc8WtbATExoJxrpxXunaDhb0tpF1 rd3A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c8si14619147pfv.132.2022.02.08.05.28.02; Tue, 08 Feb 2022 05:28:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350519AbiBGKjR (ORCPT + 99 others); Mon, 7 Feb 2022 05:39:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236643AbiBGKdO (ORCPT ); Mon, 7 Feb 2022 05:33:14 -0500 Received: from out30-42.freemail.mail.aliyun.com (out30-42.freemail.mail.aliyun.com [115.124.30.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83EE1C043181 for ; Mon, 7 Feb 2022 02:33:12 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R641e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04395;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---0V3oaIP1_1644229903; Received: from localhost(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0V3oaIP1_1644229903) by smtp.aliyun-inc.com(127.0.0.1); Mon, 07 Feb 2022 18:33:10 +0800 From: Jiapeng Chong To: abbotti@mev.co.uk Cc: hsweeten@visionengravers.com, linux-kernel@vger.kernel.org, Jiapeng Chong , Abaci Robot Subject: [PATCH] comedi: remove useless else if Date: Mon, 7 Feb 2022 18:31:41 +0800 Message-Id: <20220207103141.100004-1-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Eliminate the follow coccicheck warning: ./drivers/comedi/drivers/das1800.c:1300:8-10: WARNING: possible condition with no effect (if == else). Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- drivers/comedi/drivers/das1800.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/comedi/drivers/das1800.c b/drivers/comedi/drivers/das1800.c index f09608c0f4ff..c4b6c68f3551 100644 --- a/drivers/comedi/drivers/das1800.c +++ b/drivers/comedi/drivers/das1800.c @@ -1297,14 +1297,13 @@ 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) { + } else { /* + * the branch includes (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; } /* Digital Input subdevice */ -- 2.20.1.7.g153144c