From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754004AbdDCQ45 (ORCPT ); Mon, 3 Apr 2017 12:56:57 -0400 Received: from mail-pg0-f45.google.com ([74.125.83.45]:33946 "EHLO mail-pg0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751716AbdDCQ44 (ORCPT ); Mon, 3 Apr 2017 12:56:56 -0400 Date: Mon, 3 Apr 2017 09:56:53 -0700 From: Matthias Kaehlcke To: Joe Perches Cc: Alasdair Kergon , Mike Snitzer , dm-devel@redhat.com, Shaohua Li , linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org, Grant Grundler , Michael Davidson , Greg Hackmann Subject: Re: [PATCH] dm ioctl: Remove double parentheses Message-ID: <20170403165653.GB13986@google.com> References: <20170316164830.127026-1-mka@chromium.org> <20170401015019.GA13986@google.com> <1491012453.27353.25.camel@perches.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1491012453.27353.25.camel@perches.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Joe, El Fri, Mar 31, 2017 at 07:07:33PM -0700 Joe Perches ha dit: > On Fri, 2017-03-31 at 18:50 -0700, Matthias Kaehlcke wrote: > > El Thu, Mar 16, 2017 at 09:48:30AM -0700 Matthias Kaehlcke ha dit: > > > > > The extra pair of parantheses is not needed and causes clang to generate > > > the following warning: > > > > > > drivers/md/dm-ioctl.c:1776:11: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality] > > > if ((cmd == DM_DEV_CREATE_CMD)) { > > > ~~~~^~~~~~~~~~~~~~~~~~~~ > > > drivers/md/dm-ioctl.c:1776:11: note: remove extraneous parentheses around the comparison to silence this warning > > > if ((cmd == DM_DEV_CREATE_CMD)) { > > > ~ ^ ~ > > > drivers/md/dm-ioctl.c:1776:11: note: use '=' to turn this equality comparison into an assignment > > > if ((cmd == DM_DEV_CREATE_CMD)) { > > There are dozens of these comparisons in the kernel. > Are you fixing them all or just this one? For now I focus on occurrences that pop up in my builds. So far there have been two more: https://patchwork.kernel.org/patch/9626833/ https://patchwork.kernel.org/patch/9631591/ Thanks Matthias