* Patch "net: tg3: avoid uninitialized variable warning" has been added to the 3.18-stable tree
@ 2017-05-03 3:54 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-05-03 3:54 UTC (permalink / raw)
To: arnd, davem, gregkh; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
net: tg3: avoid uninitialized variable warning
to the 3.18-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:
net-tg3-avoid-uninitialized-variable-warning.patch
and it can be found in the queue-3.18 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 e434e04110704eb91acfecbd0fb8ca8e2da9c29b Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <arnd@arndb.de>
Date: Fri, 29 Jan 2016 12:39:15 +0100
Subject: net: tg3: avoid uninitialized variable warning
From: Arnd Bergmann <arnd@arndb.de>
commit e434e04110704eb91acfecbd0fb8ca8e2da9c29b upstream.
The tg3_set_eeprom() function correctly initializes the 'start' variable,
but gcc generates a false warning:
drivers/net/ethernet/broadcom/tg3.c: In function 'tg3_set_eeprom':
drivers/net/ethernet/broadcom/tg3.c:12057:4: warning: 'start' may be used uninitialized in this function [-Wmaybe-uninitialized]
I have not come up with a way to restructure the code in a way that
avoids the warning without making it less readable, so this adds an
initialization for the declaration to shut up that warning.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/ethernet/broadcom/tg3.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/net/ethernet/broadcom/tg3.c
+++ b/drivers/net/ethernet/broadcom/tg3.c
@@ -12021,7 +12021,7 @@ static int tg3_set_eeprom(struct net_dev
int ret;
u32 offset, len, b_offset, odd_len;
u8 *buf;
- __be32 start, end;
+ __be32 start = 0, end;
if (tg3_flag(tp, NO_NVRAM) ||
eeprom->magic != TG3_EEPROM_MAGIC)
Patches currently in stable-queue which might be from arnd@arndb.de are
queue-3.18/ib-iser-fix-sparse-warnings.patch
queue-3.18/cred-userns-define-current_user_ns-as-a-function.patch
queue-3.18/pci-xilinx-fix-harmless-format-string-warning.patch
queue-3.18/alsa-ppc-awacs-shut-up-maybe-uninitialized-warning.patch
queue-3.18/net-tg3-avoid-uninitialized-variable-warning.patch
queue-3.18/mtd-avoid-stack-overflow-in-mtd-cfi-code.patch
queue-3.18/powerpc-ptrace-fix-out-of-bounds-array-access-warning.patch
queue-3.18/mlx5-avoid-build-warnings-on-32-bit.patch
queue-3.18/drbd-avoid-redefinition-of-bits_per_page.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-05-03 3:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-03 3:54 Patch "net: tg3: avoid uninitialized variable warning" has been added to the 3.18-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.