From 4d8f10079212d34c4ef78f0578b59c6a91d1d2b7 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 31 Aug 2017 06:41:08 +0200 Subject: [PATCH] 3.18-stable patches added patches: p54-memset-0-whole-array.patch --- queue-3.18/p54-memset-0-whole-array.patch | 37 +++++++++++++++++++++++ queue-3.18/series | 1 + 2 files changed, 38 insertions(+) create mode 100644 queue-3.18/p54-memset-0-whole-array.patch 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 index 00000000000..5317dea9d49 --- /dev/null +++ b/queue-3.18/p54-memset-0-whole-array.patch @@ -0,0 +1,37 @@ +From 6f17581788206444cbbcdbc107498f85e9765e3d Mon Sep 17 00:00:00 2001 +From: Jiri Slaby +Date: Fri, 14 Oct 2016 11:23:09 +0200 +Subject: p54: memset(0) whole array + +From: Jiri Slaby + +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 +Cc: Christian Lamparter +Cc: Kalle Valo +Acked-by: Christian Lamparter +Signed-off-by: Kalle Valo +Signed-off-by: Greg Kroah-Hartman + +--- + 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)); diff --git a/queue-3.18/series b/queue-3.18/series index 6bb612a8eea..aef7592910d 100644 --- a/queue-3.18/series +++ b/queue-3.18/series @@ -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 -- 2.47.3