]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.18-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 31 Aug 2017 04:41:08 +0000 (06:41 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 31 Aug 2017 04:41:08 +0000 (06:41 +0200)
added patches:
p54-memset-0-whole-array.patch

queue-3.18/p54-memset-0-whole-array.patch [new file with mode: 0644]
queue-3.18/series

diff --git a/queue-3.18/p54-memset-0-whole-array.patch b/queue-3.18/p54-memset-0-whole-array.patch
new file mode 100644 (file)
index 0000000..5317dea
--- /dev/null
@@ -0,0 +1,37 @@
+From 6f17581788206444cbbcdbc107498f85e9765e3d Mon Sep 17 00:00:00 2001
+From: Jiri Slaby <jslaby@suse.cz>
+Date: Fri, 14 Oct 2016 11:23:09 +0200
+Subject: p54: memset(0) whole array
+
+From: Jiri Slaby <jslaby@suse.cz>
+
+commit 6f17581788206444cbbcdbc107498f85e9765e3d upstream.
+
+gcc 7 complains:
+drivers/net/wireless/intersil/p54/fwio.c: In function 'p54_scan':
+drivers/net/wireless/intersil/p54/fwio.c:491:4: warning: 'memset' used with length equal to number of elements without multiplication by element size [-Wmemset-elt-size]
+
+Fix that by passing the correct size to memset.
+
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+Cc: Christian Lamparter <chunkeey@googlemail.com>
+Cc: Kalle Valo <kvalo@codeaurora.org>
+Acked-by: Christian Lamparter <chunkeey@googlemail.com>
+Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/wireless/p54/fwio.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/net/wireless/p54/fwio.c
++++ b/drivers/net/wireless/p54/fwio.c
+@@ -486,7 +486,7 @@ int p54_scan(struct p54_common *priv, u1
+                       entry += sizeof(__le16);
+                       chan->pa_points_per_curve = 8;
+-                      memset(chan->curve_data, 0, sizeof(*chan->curve_data));
++                      memset(chan->curve_data, 0, sizeof(chan->curve_data));
+                       memcpy(chan->curve_data, entry,
+                              sizeof(struct p54_pa_curve_data_sample) *
+                              min((u8)8, curve_data->points_per_channel));
index 6bb612a8eea03cf988d30b789f19422c3d8ac0d3..aef7592910d293a5c95341fcc317f6970d62ca97 100644 (file)
@@ -3,3 +3,4 @@ alsa-au88x0-fix-zero-clear-of-stream-resources.patch
 gcov-add-support-for-gcc-5.1.patch
 gcov-add-support-for-gcc-version-6.patch
 gcov-support-gcc-7.1.patch
+p54-memset-0-whole-array.patch