Message ID | f7t60w412mr.fsf_-_@redhat.com (mailing list archive) |
---|---|
State | Accepted, archived |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 57B8B2BD7; Wed, 30 Mar 2016 16:06:40 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id C5BF22BA1 for <dev@dpdk.org>; Wed, 30 Mar 2016 16:06:38 +0200 (CEST) Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 4ACE27D0EF; Wed, 30 Mar 2016 14:06:38 +0000 (UTC) Received: from aconole-fed23 (dhcp-25-15.bos.redhat.com [10.18.25.15]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u2UE6a7c001928 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 30 Mar 2016 10:06:37 -0400 From: Aaron Conole <aconole@redhat.com> To: Thomas Monjalon <thomas.monjalon@6wind.com> Cc: Panu Matilainen <pmatilai@redhat.com>, "Lu\, Wenzhuo" <wenzhuo.lu@intel.com>, dev@dpdk.org, "Richardson\, Bruce" <bruce.richardson@intel.com> References: <1458682638-28378-1-git-send-email-aconole@redhat.com> <6A0DE07E22DDAD4C9103DF62FEBC09090343E973@shsmsx102.ccr.corp.intel.com> <56F38F26.1030707@redhat.com> <2113478.WYverkV2By@xps13> Date: Wed, 30 Mar 2016 10:06:36 -0400 In-Reply-To: <2113478.WYverkV2By@xps13> (Thomas Monjalon's message of "Wed, 30 Mar 2016 12:51:07 +0200") Message-ID: <f7t60w412mr.fsf_-_@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 Subject: [dpdk-dev] [PATCH v3 2/7] drivers/net/e1000: Suppress misleading indentation warning X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK <dev.dpdk.org> List-Unsubscribe: <http://dpdk.org/ml/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://dpdk.org/ml/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <http://dpdk.org/ml/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Commit Message
Aaron Conole
March 30, 2016, 2:06 p.m. UTC
The register read/write mphy functions have misleading whitespace around
the `locked` check. This cleanup merely preserves the existing functionality
and suppresses future gcc versions' "misleading indentation" warning.
Suggested-by: Panu Matilainen <pmatilai@redhat.com>
Signed-off-by: Aaron Conole <aconole@redhat.com>
---
v2:
* Changed from "whitespace-only" fix to a functional change
moving the phy writes into protection of the `if (locked)`
code
* Added "Fixes" line.
v3:
* Instead of changing the code, change to suppress the compiler warning
when using gcc6+. This was tested with both gcc6 and gcc5 using gnu
make 4.0 and gnu bash 4.3.42 on a fedora 23 system.
drivers/net/e1000/Makefile | 3 +++
1 file changed, 3 insertions(+)
Comments
On Wed, 30 Mar 2016 10:06:36 -0400 Aaron Conole <aconole@redhat.com> wrote: > The register read/write mphy functions have misleading whitespace around > the `locked` check. This cleanup merely preserves the existing functionality > and suppresses future gcc versions' "misleading indentation" warning. > > Suggested-by: Panu Matilainen <pmatilai@redhat.com> > Signed-off-by: Aaron Conole <aconole@redhat.com> > --- > v2: > * Changed from "whitespace-only" fix to a functional change > moving the phy writes into protection of the `if (locked)` > code > * Added "Fixes" line. > > v3: > * Instead of changing the code, change to suppress the compiler warning > when using gcc6+. This was tested with both gcc6 and gcc5 using gnu > make 4.0 and gnu bash 4.3.42 on a fedora 23 system. > > drivers/net/e1000/Makefile | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/net/e1000/Makefile b/drivers/net/e1000/Makefile > index ccd2b7b..f4879e6 100644 > --- a/drivers/net/e1000/Makefile > +++ b/drivers/net/e1000/Makefile > @@ -54,6 +54,9 @@ else > # > CFLAGS_BASE_DRIVER = -Wno-uninitialized -Wno-unused-parameter > CFLAGS_BASE_DRIVER += -Wno-unused-variable > +ifeq ($(shell test $(GCC_VERSION) -ge 60 && echo 1), 1) > +CFLAGS_BASE_DRIVER += -Wno-misleading-indentation > +endif > endif > > # NAK, don't do it to the whole file. Fix the code (best option) or use a pragma for the small area which is broken for other reasons.
2016-03-30 09:36, Stephen Hemminger: > On Wed, 30 Mar 2016 10:06:36 -0400 > Aaron Conole <aconole@redhat.com> wrote: > > --- a/drivers/net/e1000/Makefile > > +++ b/drivers/net/e1000/Makefile > > @@ -54,6 +54,9 @@ else > > # > > CFLAGS_BASE_DRIVER = -Wno-uninitialized -Wno-unused-parameter > > CFLAGS_BASE_DRIVER += -Wno-unused-variable > > +ifeq ($(shell test $(GCC_VERSION) -ge 60 && echo 1), 1) > > +CFLAGS_BASE_DRIVER += -Wno-misleading-indentation > > +endif > > endif > > NAK, don't do it to the whole file. > Fix the code (best option) > or use a pragma for the small area which is broken for other reasons. Stephen, your solutions do not work because Aaron has not been allowed to modify this file. As long as we are not allowed to modify the Intel base drivers, I don't see any problem to hide some warnings in them. The warnings could help us to clean the code or fix some bugs but we are not allowed to... It is the responsibility of the driver maintainer to keep this nasty code.
On Wed, 30 Mar 2016 19:12:39 +0200 Thomas Monjalon <thomas.monjalon@6wind.com> wrote: > 2016-03-30 09:36, Stephen Hemminger: > > On Wed, 30 Mar 2016 10:06:36 -0400 > > Aaron Conole <aconole@redhat.com> wrote: > > > --- a/drivers/net/e1000/Makefile > > > +++ b/drivers/net/e1000/Makefile > > > @@ -54,6 +54,9 @@ else > > > # > > > CFLAGS_BASE_DRIVER = -Wno-uninitialized -Wno-unused-parameter > > > CFLAGS_BASE_DRIVER += -Wno-unused-variable > > > +ifeq ($(shell test $(GCC_VERSION) -ge 60 && echo 1), 1) > > > +CFLAGS_BASE_DRIVER += -Wno-misleading-indentation > > > +endif > > > endif > > > > NAK, don't do it to the whole file. > > Fix the code (best option) > > or use a pragma for the small area which is broken for other reasons. > > Stephen, your solutions do not work because Aaron has not been allowed > to modify this file. > As long as we are not allowed to modify the Intel base drivers, > I don't see any problem to hide some warnings in them. > The warnings could help us to clean the code or fix some bugs but > we are not allowed to... > It is the responsibility of the driver maintainer to keep this nasty code. ok, but the policy of "base drivers are allowed to be unmaintainable" is an albatross around the neck of DPDK. There is a reason such a policy was rejected in Linux.
Hi, > -----Original Message----- > From: Aaron Conole [mailto:aconole@redhat.com] > Sent: Wednesday, March 30, 2016 10:07 PM > To: Thomas Monjalon > Cc: Panu Matilainen; Lu, Wenzhuo; dev@dpdk.org; Richardson, Bruce > Subject: [PATCH v3 2/7] drivers/net/e1000: Suppress misleading indentation > warning > > The register read/write mphy functions have misleading whitespace around the > `locked` check. This cleanup merely preserves the existing functionality and > suppresses future gcc versions' "misleading indentation" warning. > > Suggested-by: Panu Matilainen <pmatilai@redhat.com> > Signed-off-by: Aaron Conole <aconole@redhat.com> Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
diff --git a/drivers/net/e1000/Makefile b/drivers/net/e1000/Makefile index ccd2b7b..f4879e6 100644 --- a/drivers/net/e1000/Makefile +++ b/drivers/net/e1000/Makefile @@ -54,6 +54,9 @@ else # CFLAGS_BASE_DRIVER = -Wno-uninitialized -Wno-unused-parameter CFLAGS_BASE_DRIVER += -Wno-unused-variable +ifeq ($(shell test $(GCC_VERSION) -ge 60 && echo 1), 1) +CFLAGS_BASE_DRIVER += -Wno-misleading-indentation +endif endif #