Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp3566412ybl; Mon, 12 Aug 2019 02:41:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqznj/1a4oX+q2nbRHS0Bx/L4eQCKSVTsmACVeQNCTGsnXCQPb5PNmfmwUhWX97YuikUD04S X-Received: by 2002:a17:90a:ca11:: with SMTP id x17mr22701157pjt.107.1565602861310; Mon, 12 Aug 2019 02:41:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565602861; cv=none; d=google.com; s=arc-20160816; b=xE3eXY+R4o8TddqjiY9yFwFkD8MOf0sy+q7HUWpBCbF6WFCpAZP38YIirKgBQQjRqA V4vjrqepIC8LD1Tg9ept9jGLH8KfPLkNF7LJRe0XeJi+6vhO9zYJyUA1XplfaD7kmvbf rc30Zd6ntTeGny83oxwspLzB4rU9ONINr0NuW9ITCH3tp9G0wBBOmDtBTxEMEHXdppos P4T7A7zbSzKjk/ATxNBgmRHFoKdibZ8JHd1Q0mmEZx6JipTuORZsx9cM8GfwGERDXnzM VfdUc8rbVJUdP4qdUqQYnXJhAg7XpMCRxulCyrn2jExwGDofFvMhE38BmXTkFvpgn1tg cw7A== 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=Qi7yPFIlQ4heXGNtKm0amuuGw/a2k6qovHDF/yBEjeE=; b=A9q05XZfRSJnyogcYQ291cef8b3d4mR+VpkdDYvwVMMi3HRdB5gKEATTPgQofi3LSM Q8aCdtBGve5ORTRuqRiJfVG4hse3YTYVwi86+oDhmsY2uvOR6+8J39oxiRvDEdqjwtcV 9zTfT+umHmqolRWcI/2lCkTI/eWs/tSUP+2Mma66tkGO/VZjdw3CNUBa588Rztr78eFq OtpNtMafGMCowidjP1aPj27Igyhm4Chk1fyuB4TkMhPqjuAEW9gWB5fqhJD34jkXF2aD wFhkYktiBzxav4CPo9hK/OGatCjfy3csrI/tLtm8v16D5yL3ieX0hry5XqTafmP7Dk1h Fb9A== 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 f186si32763775pgc.438.2019.08.12.02.40.46; Mon, 12 Aug 2019 02:41:01 -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 S1727573AbfHLJjy (ORCPT + 99 others); Mon, 12 Aug 2019 05:39:54 -0400 Received: from inva020.nxp.com ([92.121.34.13]:49682 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727072AbfHLJjf (ORCPT ); Mon, 12 Aug 2019 05:39:35 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id DABB21A0665; Mon, 12 Aug 2019 11:39:34 +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 CE0A21A011B; Mon, 12 Aug 2019 11:39:34 +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 8DFD7205ED; Mon, 12 Aug 2019 11:39:34 +0200 (CEST) From: Ioana Ciornei To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org Cc: andrew@lunn.ch, ruxandra.radulescu@nxp.com, Ioana Ciornei Subject: [PATCH 06/10] staging: fsl-dpaa2/ethsw: remove unnecessary memset Date: Mon, 12 Aug 2019 12:39:14 +0300 Message-Id: <1565602758-14434-7-git-send-email-ioana.ciornei@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1565602758-14434-1-git-send-email-ioana.ciornei@nxp.com> References: <1565602758-14434-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. Signed-off-by: Ioana Ciornei --- 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