From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH v3 2/7] drivers/net/e1000: Suppress misleading indentation warning Date: Wed, 30 Mar 2016 09:36:53 -0700 Message-ID: <20160330093653.0d7e1847@xeon-e3> References: <1458682638-28378-1-git-send-email-aconole@redhat.com> <6A0DE07E22DDAD4C9103DF62FEBC09090343E973@shsmsx102.ccr.corp.intel.com> <56F38F26.1030707@redhat.com> <2113478.WYverkV2By@xps13> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Thomas Monjalon , Panu Matilainen , "Lu\, Wenzhuo" , dev@dpdk.org, "Richardson\, Bruce" To: Aaron Conole Return-path: Received: from mail-pa0-f49.google.com (mail-pa0-f49.google.com [209.85.220.49]) by dpdk.org (Postfix) with ESMTP id 84F462C4B for ; Wed, 30 Mar 2016 18:36:41 +0200 (CEST) Received: by mail-pa0-f49.google.com with SMTP id fe3so44952430pab.1 for ; Wed, 30 Mar 2016 09:36:41 -0700 (PDT) In-Reply-To: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Wed, 30 Mar 2016 10:06:36 -0400 Aaron Conole 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 > Signed-off-by: Aaron Conole > --- > 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.