Skip to contentSkip to conversation

Patch "p54: memset(0) whole array" has been added to the 4.9-stable tree

PATCH [email protected] 1 participant 1 message Aug 30, 2017

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

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

p54: memset(0) whole array

to the 4.9-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:

     p54-memset-0-whole-array.patch

and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 6f17581788206444cbbcdbc107498f85e9765e3d Mon Sep 17 00:00:00 2001

From: Jiri Slaby <[email protected]>
Date: Fri, 14 Oct 2016 11:23:09 +0200
Subject: p54: memset(0) whole array

From: Jiri Slaby <[email protected]>

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.

---
 drivers/net/wireless/intersil/p54/fwio.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/intersil/p54/fwio.c +1 -1
@@ -488,7 +488,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));

Patches currently in stable-queue which might be from [email protected] are

queue-4.9/p54-memset-0-whole-array.patch