All of lore.kernel.org
 help / color / mirror / Atom feed
* Patch "Kbuild: disable 'maybe-uninitialized' warning for CONFIG_PROFILE_ALL_BRANCHES" has been added to the 4.4-stable tree
@ 2016-09-26  9:47 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-09-26  9:47 UTC (permalink / raw)
  To: arnd, gregkh, mmarek; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    Kbuild: disable 'maybe-uninitialized' warning for CONFIG_PROFILE_ALL_BRANCHES

to the 4.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     kbuild-disable-maybe-uninitialized-warning-for-config_profile_all_branches.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From 815eb71e7149ecce40db9dd0ad09c4dd9d33c60f Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <arnd@arndb.de>
Date: Mon, 25 Apr 2016 17:35:28 +0200
Subject: Kbuild: disable 'maybe-uninitialized' warning for CONFIG_PROFILE_ALL_BRANCHES

From: Arnd Bergmann <arnd@arndb.de>

commit 815eb71e7149ecce40db9dd0ad09c4dd9d33c60f upstream.

CONFIG_PROFILE_ALL_BRANCHES confuses gcc-5.x to the degree that it prints
incorrect warnings about a lot of variables that it thinks can be used
uninitialized, e.g.:

i2c/busses/i2c-diolan-u2c.c: In function 'diolan_usb_xfer':
i2c/busses/i2c-diolan-u2c.c:391:16: warning: 'byte' may be used uninitialized in this function
iio/gyro/itg3200_core.c: In function 'itg3200_probe':
iio/gyro/itg3200_core.c:213:6: warning: 'val' may be used uninitialized in this function
leds/leds-lp55xx-common.c: In function 'lp55xx_update_bits':
leds/leds-lp55xx-common.c:350:6: warning: 'tmp' may be used uninitialized in this function
misc/bmp085.c: In function 'show_pressure':
misc/bmp085.c:363:10: warning: 'pressure' may be used uninitialized in this function
power/ds2782_battery.c: In function 'ds2786_get_capacity':
power/ds2782_battery.c:214:17: warning: 'raw' may be used uninitialized in this function

These are all false positives that either rob someone's time when trying
to figure out whether they are real, or they get people to send wrong
patches to shut up the warnings.

Nobody normally wants to run a CONFIG_PROFILE_ALL_BRANCHES kernel in
production, so disabling the whole class of warnings for this configuration
has no serious downsides either.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Steven Rostedt <rostedtgoodmis.org>
Signed-off-by: Michal Marek <mmarek@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 Makefile |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

--- a/Makefile
+++ b/Makefile
@@ -620,7 +620,11 @@ KBUILD_CFLAGS	+= $(call cc-option,-fno-d
 ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
 KBUILD_CFLAGS	+= -Os $(call cc-disable-warning,maybe-uninitialized,)
 else
-KBUILD_CFLAGS	+= -O2
+ifdef CONFIG_PROFILE_ALL_BRANCHES
+KBUILD_CFLAGS	+= -O2 $(call cc-disable-warning,maybe-uninitialized,)
+else
+KBUILD_CFLAGS   += -O2
+endif
 endif
 
 # Tell gcc to never replace conditional load with a non-conditional one


Patches currently in stable-queue which might be from arnd@arndb.de are

queue-4.4/include-linux-kernel.h-change-abs-macro-so-it-uses-consistent-return-type.patch
queue-4.4/ath9k-fix-misleading-indentation.patch
queue-4.4/iwlegacy-avoid-warning-about-missing-braces.patch
queue-4.4/kbuild-disable-maybe-uninitialized-warning-for-config_profile_all_branches.patch
queue-4.4/net-caif-fix-misleading-indentation.patch
queue-4.4/nouveau-fix-nv40_perfctr_next-cleanup-regression.patch
queue-4.4/gcov-disable-wmaybe-uninitialized-warning.patch
queue-4.4/am437x-vfpe-fix-typo-in-vpfe_get_app_input_index.patch
queue-4.4/fix-build-warning-in-kernel-cpuset.c.patch
queue-4.4/reiserfs-fix-new_insert_key-may-be-used-uninitialized.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-09-26  9:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-26  9:47 Patch "Kbuild: disable 'maybe-uninitialized' warning for CONFIG_PROFILE_ALL_BRANCHES" has been added to the 4.4-stable tree gregkh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.