Thread (21 messages) 21 messages, 5 authors, 2016-04-01
STALE3743d

[PATCH v3 2/7] drivers/net/e1000: Suppress misleading indentation warning

From: Aaron Conole <aconole@redhat.com>
Date: 2016-03-30 14:06:38
Subsystem: networking drivers, the rest · Maintainers: Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

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 <redacted>
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
 
 #
-- 
2.5.5
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help