Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4607294imm; Tue, 11 Sep 2018 14:51:23 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZcR911C7fxJnIvv8G/52C/jQXxYBKyyt1eRUswVnBIxTB6sGvbTXTx4x77nTSnrYXlfR3Y X-Received: by 2002:a62:8d84:: with SMTP id p4-v6mr31750116pfk.251.1536702683263; Tue, 11 Sep 2018 14:51:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536702683; cv=none; d=google.com; s=arc-20160816; b=bhob8Bl6cjRrBFBC1cVCmFDdLMH16Tt9YssDWiIbXO9vPNQ3RneVwTvazThd8KbrLs x2Zw56v+5QPdzzNEenaueck9WWvUNQHLemr0W4UXQMITIhEFkJ+0NxC8Sr4+ibSG7k6V 42+Ccq0/C0Rsd9ZtlZneiaZbBF+zW3Ykx7jFoLLMjbMyE17gx316ZBw6GhsKjQOjL/5Q 91oadAJpmsmtjED8LUhou3jznJbUHiMmhslo2+CYzHyDie84RxR8N7notPvKrYOHTS17 3BKw8ru7UPuiQaz/CJiFWXCtIHbPcohY8fonIIxWPmKeFMexeC1LxXGICjlvkiOHa6CK ccEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=mWi9SnShPRZpy1FMbV9GuTCF8B+/y5r/+9MkkEb6uks=; b=LBJUQS9oxpJUiayrX+lssQ1HIOUTftuRKqzPmJf964joORb9TJA0AZfxNckIi0mPYu Oo7YaFlnTzefxNiDvQoYTrwA64SfvM+cVwc5BLMoqvLe+0rNarfqOGemoNHjrmVVUFxb s3zPW6hLKOyesvnxCnyyKrqwshxgUkp2U5LKsL4kgoBMElLrBUvSrQEqC7vS7ghCBCra E+7uzUv5pJmgMT6N9uSaH+L1fpoyxc7vo45IeKJ1wM5/7gCb8Ba5majakyLKkZ05K7MW b6QrsQMlxOayqiFHUBL4iAerYiqhFQ2HSK74dDxSD+Lf93+1bJ1clJUk3RyY6/DhP/d2 wIoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=mNBcAUSE; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 5-v6si21156730plt.342.2018.09.11.14.51.08; Tue, 11 Sep 2018 14:51:23 -0700 (PDT) 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=@google.com header.s=20161025 header.b=mNBcAUSE; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728033AbeILCu5 (ORCPT + 99 others); Tue, 11 Sep 2018 22:50:57 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:40540 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727775AbeILCu5 (ORCPT ); Tue, 11 Sep 2018 22:50:57 -0400 Received: by mail-pl1-f194.google.com with SMTP id s17-v6so11927407plp.7 for ; Tue, 11 Sep 2018 14:49:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=mWi9SnShPRZpy1FMbV9GuTCF8B+/y5r/+9MkkEb6uks=; b=mNBcAUSERMEOQ8nFPVTJkrHifjrzwCn2G4eScTTfR4iH/Mixiy18a+9foF643iFsCi PUUeF8o8GBD4/ZbWaiUi2hkM6TERQ5p1t5ytMnaB/Ikw76GoohuZPI+PQzXvTf3wnoYN 6ABAoyftMLLs/9OfOmfqtJwxYfEQ0er0eTbT+BbbMboPDR3TzNZMce313YHadq8xyidM c6TDwjkHv7dtZPpQVbiZqpQt91K7VHuO97xPTcyQsn/Yo96PSJW6Nvf43thL5fiHoi4w xCIcWv/4IFXSbT0cpiaGdO4EcTcW2PBtD4+64TFkmdBQnLGajukaJZySArPX9Eswd9Cb ZviQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=mWi9SnShPRZpy1FMbV9GuTCF8B+/y5r/+9MkkEb6uks=; b=M9pXQ4ucnFR33g0dDUq4mJJcuhoo6KkZd5sLQYt+DAjqucda2R0VEIJeSSHnXh2ffe eZ0QnmmBUEksi2FkrpjCZ1IKCuIblTLp3+ypcwOiJ1fVsrsVzM5nE0nv/+tk61reQZAf OiUJLnMgY7sNmXLMLZbH4NPhBK4zfF2VwsqsfNJPDOlS7Jig6P9YzEJl50AFEpB2Q3ac 9h9Uww0ZbbwFrCGMkOTcraZ4XNHPdpzgfNIPlN062fhNvEnu43rJou96QXAjgH3jKNuZ 5nPg8mKzanFvn4Q9zS6PCCEzADVJaare7WtY8AJNxv4YsoUsptN/T16mxEmHH7E7Vvaw 1Shg== X-Gm-Message-State: APzg51CpbdyEhN1y5mk7Qf4JlhdivSdK45HWnXQk0MAJj/M2ctwpHgbg YUdK5PEWnvZLHAaW3zy+mP6uvPhdPsssyvbJQOw1tQ== X-Received: by 2002:a17:902:b7c3:: with SMTP id v3-v6mr29261901plz.238.1536702579353; Tue, 11 Sep 2018 14:49:39 -0700 (PDT) MIME-Version: 1.0 References: <20180911214338.1109-1-natechancellor@gmail.com> In-Reply-To: <20180911214338.1109-1-natechancellor@gmail.com> From: Nick Desaulniers Date: Tue, 11 Sep 2018 14:49:28 -0700 Message-ID: Subject: Re: [PATCH] pata_atiixp: Remove unnecessary parentheses To: Nathan Chancellor Cc: b.zolnierkie@samsung.com, axboe@kernel.dk, linux-ide@vger.kernel.org, LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 11, 2018 at 2:43 PM Nathan Chancellor wrote: > > Clang warns when more than one set of parentheses is used for a > single conditional statement: > > drivers/ata/pata_atiixp.c:282:19: warning: equality comparison with > extraneous parentheses [-Wparentheses-equality] > if((pdev->device == PCI_DEVICE_ID_ATI_IXP600_IDE)) > ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > drivers/ata/pata_atiixp.c:282:19: note: remove extraneous parentheses > around the comparison to silence this warning > if((pdev->device == PCI_DEVICE_ID_ATI_IXP600_IDE)) > ~ ^ ~ > drivers/ata/pata_atiixp.c:282:19: note: use '=' to turn this equality > comparison into an assignment > if((pdev->device == PCI_DEVICE_ID_ATI_IXP600_IDE)) > ^~ > = Yeah, I don't think assignment and conditional checking was implied here. Thanks for the simple fix. Reviewed-by: Nick Desaulniers > 1 warning generated. > > Reported-by: Nick Desaulniers > Signed-off-by: Nathan Chancellor > --- > drivers/ata/pata_atiixp.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/ata/pata_atiixp.c b/drivers/ata/pata_atiixp.c > index 4d49fd3c927b..843bb200a1ee 100644 > --- a/drivers/ata/pata_atiixp.c > +++ b/drivers/ata/pata_atiixp.c > @@ -279,7 +279,7 @@ static int atiixp_init_one(struct pci_dev *pdev, const struct pci_device_id *id) > const struct ata_port_info *ppi[] = { &info, &info }; > > /* SB600 doesn't have secondary port wired */ > - if((pdev->device == PCI_DEVICE_ID_ATI_IXP600_IDE)) > + if (pdev->device == PCI_DEVICE_ID_ATI_IXP600_IDE) > ppi[1] = &ata_dummy_port_info; > > return ata_pci_bmdma_init_one(pdev, ppi, &atiixp_sht, NULL, > -- > 2.18.0 > -- Thanks, ~Nick Desaulniers