Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3329391imu; Sun, 11 Nov 2018 12:30:19 -0800 (PST) X-Google-Smtp-Source: AJdET5f7E4gApEBvs6KtnnvA2p5x/o7Z8XGXWmy/eWT0xlnEVlR6COs/phipb3pIcS8fNrpKnXvR X-Received: by 2002:a17:902:187:: with SMTP id b7-v6mr17418301plb.150.1541968219574; Sun, 11 Nov 2018 12:30:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541968219; cv=none; d=google.com; s=arc-20160816; b=ICiApzK6/M+G3P64x7oXz2Pn+/ni0JciN8iL17jkZ8/QCUEnVtTT5PQbAKXGYHfGfD m3ilPrPUyXCmZ1KxLMiWUyCP2TSvPG3WjwP46O27TKGIR2N82M1l42fvacBgOHgi0cD8 R//udQY6GNw9fS1ShMrJuqW0OKLCCfX2V5X/UlRAdRix7GsUo3FKOAeSaMXyRl12JkcC fb2KMITN05JaP6icnjMxfxSNbSn5w2XMbI4gpDwlrEjAODKlVC+ZBFUk5D/UlzlSEv30 PFZL3Z7YFpuYDx42P6ItEuyGPLAsnPJYW8aSwClvZdMTNR4EIbZWWjdiXJWAaaEehXGT N+Aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition; bh=Wp75y/haiHsRnqtzL6bUUi6CwN8x5lbpLGYs4ZB/Rzo=; b=t//58m9m0vtcCWdnwPsQ21XjeEbIhk54PI8khn4q0ySXPnRZL6aNppHzxTBQ/XGcK0 r0AUj6uzTm1DaPjlVcusrDooy3uJTR55rvpavdCuTS2o8Nd/2ksvzDpRJVqFMOfaPsSa DDEkV8sC9RQu3Wm0Sf5B5gsL/oggtqN3cZst60fXfqJ6N/g72RUkrmirjQp+XnvnBxFy Rks1kMdG1b88OBd1tSb4xlIjln5+bTqyA+kiKhW8ukL8DhbyG/fE91ULu8mQCevzQsu2 YgOFhxtjctaAhW7r+4MSVKExLT3u3SaB4Nne6rYCk5OVp46Pqs24zQ+m+YaHtnNbKnm7 ncQA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i33-v6si9265774pld.185.2018.11.11.12.30.04; Sun, 11 Nov 2018 12:30:19 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731467AbeKLGTD (ORCPT + 99 others); Mon, 12 Nov 2018 01:19:03 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:50456 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730418AbeKLFsW (ORCPT ); Mon, 12 Nov 2018 00:48:22 -0500 Received: from [192.168.4.242] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gLvsg-0000oG-Pe; Sun, 11 Nov 2018 19:58:51 +0000 Received: from ben by deadeye with local (Exim 4.91) (envelope-from ) id 1gLvsa-0001sE-CD; Sun, 11 Nov 2018 19:58:44 +0000 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, "Jiri Slaby" , "Kalle Valo" , "Christian Lamparter" Date: Sun, 11 Nov 2018 19:49:05 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 345/366] p54: memset(0) whole array In-Reply-To: X-SA-Exim-Connect-IP: 192.168.4.242 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.61-rc1 review patch. If anyone has any objections, please let me know. ------------------ 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 Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Acked-by: Christian Lamparter Signed-off-by: Kalle Valo [bwh: Backported to 3.16: adjust filename] Signed-off-by: Ben Hutchings --- 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));