From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jens Axboe Subject: Re: [PATCH] pata_atiixp: Remove unnecessary parentheses Date: Tue, 11 Sep 2018 16:57:21 -0600 Message-ID: References: <20180911214338.1109-1-natechancellor@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20180911214338.1109-1-natechancellor@gmail.com> Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org To: Nathan Chancellor , Bartlomiej Zolnierkiewicz Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, Nick Desaulniers List-Id: linux-ide@vger.kernel.org On 9/11/18 3: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)) > ^~ > = > 1 warning generated. Applied for 4.20, thanks. -- Jens Axboe