Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp981033ybl; Tue, 13 Aug 2019 05:44:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqyZc6hHhxloFe8Tjg3esim1gCJGbdKN6zHGsCDn/Xq60BzJOCnEb+KEB9/EAki82e1egsus X-Received: by 2002:a17:902:2bcb:: with SMTP id l69mr37851369plb.155.1565700276965; Tue, 13 Aug 2019 05:44:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565700276; cv=none; d=google.com; s=arc-20160816; b=NHkov81el4feegpxAQz1+S1IhUwj1eZaE3zKbbbassdzrjYMS0cxpcKLJlY6FrbdcE jZEoF79pYBTvUTxPehj4qnR6OTRb3DpI3pmWkbP52AMvJJWFKsa2c5HUqYlKy/XyKr2k paSEJXAiqNoy8XiY6NeGmg0Xvn378D92eKSwoXgRj9TSzQz911isPQalU93pnJ+0FidV LjRPkZD24/nOLR6UzpnGmHIX0OXjOxnWXkkSl6wZHz+Z1SCIEnWDY2+xd+hmICSi9Nge 4GhVItcvPy9rr1f80CVFW+5VHgRSGT7inKjkT0+Ol93rOJg1UKNvnkIJ0YcmOv7PTeSk 06FA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:reply-to:references:in-reply-to :message-id:date:subject:cc:to:from; bh=Guj7zxmfB1/PFjqpzpogqBBDeGC8H3BRxzM1QAZvaKA=; b=W/IvnnjVlvFPwypdwT8AJwN7/xLs0VLp5PW3YNAPjGuZFOTqBLkKuBe1IdsUl1Z7pc 6QXu50kT0hmwLc57LN1AAF/jWuCl9ZodgcbhoEtZZKuRXuSXFGkTltTmHtZX7jv63wag Yt7kUxX7OM2tyacameRNaErhfUvyU5H6Cva0GYB4Sb4C5pKzBCho2iVhHGW0+XcBKIe9 kP9regK8TLSTdFG/Io7wZOwQY4Ojz/JpNn7r8fEb3prDTK2Ih3b5sLUJTKP4Ny7PRpvR hod5OJLTjI9pPYzvw27X16Ldhzvkyxd6DNiCfvHeaVewo6odBVRSBTs8C65J1kEV2fHj 24iw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 92si60071455plc.217.2019.08.13.05.44.21; Tue, 13 Aug 2019 05:44:36 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728500AbfHMMnT (ORCPT + 99 others); Tue, 13 Aug 2019 08:43:19 -0400 Received: from inva020.nxp.com ([92.121.34.13]:59852 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728433AbfHMMnP (ORCPT ); Tue, 13 Aug 2019 08:43:15 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 175CE1A0234; Tue, 13 Aug 2019 14:43:14 +0200 (CEST) Received: from inva024.eu-rdc02.nxp.com (inva024.eu-rdc02.nxp.com [134.27.226.22]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 0B3D31A0132; Tue, 13 Aug 2019 14:43:14 +0200 (CEST) Received: from fsr-ub1464-137.ea.freescale.net (fsr-ub1464-137.ea.freescale.net [10.171.82.114]) by inva024.eu-rdc02.nxp.com (Postfix) with ESMTP id B68AC2060E; Tue, 13 Aug 2019 14:43:13 +0200 (CEST) From: Ioana Ciornei To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org Cc: joe@perches.com, andrew@lunn.ch, ruxandra.radulescu@nxp.com, Ioana Ciornei Subject: [PATCH v3 06/10] staging: fsl-dpaa2/ethsw: remove unnecessary memset Date: Tue, 13 Aug 2019 15:43:03 +0300 Message-Id: <1565700187-16048-7-git-send-email-ioana.ciornei@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1565700187-16048-1-git-send-email-ioana.ciornei@nxp.com> References: <1565700187-16048-1-git-send-email-ioana.ciornei@nxp.com> Reply-to: ioana.ciornei@nxp.com X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The ethtool core already zeroes the memory before calling .get_ethtool_stats() thus making the memset unnecessary. Remove it. Reported-by: Andrew Lunn Signed-off-by: Ioana Ciornei --- Changes in v2: - added Reported-by tag Changes in v3: - none drivers/staging/fsl-dpaa2/ethsw/ethsw-ethtool.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/fsl-dpaa2/ethsw/ethsw-ethtool.c b/drivers/staging/fsl-dpaa2/ethsw/ethsw-ethtool.c index 12e33a3a1bf1..0f9f8345e534 100644 --- a/drivers/staging/fsl-dpaa2/ethsw/ethsw-ethtool.c +++ b/drivers/staging/fsl-dpaa2/ethsw/ethsw-ethtool.c @@ -149,9 +149,6 @@ static void ethsw_ethtool_get_stats(struct net_device *netdev, struct ethsw_port_priv *port_priv = netdev_priv(netdev); int i, err; - memset(data, 0, - sizeof(u64) * ETHSW_NUM_COUNTERS); - for (i = 0; i < ETHSW_NUM_COUNTERS; i++) { err = dpsw_if_get_counter(port_priv->ethsw_data->mc_io, 0, port_priv->ethsw_data->dpsw_handle, -- 1.9.1