Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp1701831ybg; Wed, 29 Jul 2020 23:45:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwwCKygsD48XOUYAQynjWSTlfto4ygoKH8KlBausRacG9zendGaFtrY98v6chxfYSa8K23i X-Received: by 2002:a17:907:7255:: with SMTP id ds21mr1307149ejc.44.1596091532895; Wed, 29 Jul 2020 23:45:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596091532; cv=none; d=google.com; s=arc-20160816; b=S+DLvrQx/mzC5FjqU/YzEiBOJjMkOZKrOxejD3ebhdD8/9PhtXGBeYpYi0Ak31OVYN zq8E5QJwt5AJbg7+aLSpmMCspM7SYmFjB7vWfWvjRSRr2XrLPtFiO5jamNyFM31Oyaey 5AqT2d/KZ+tv6HukYupDzCPRpaaqQ93taUt62ZWvlMPjpI9uemz8nVrKOcqRgEPtBMjQ GjXtaRAJnrXZzEVQZywjcygMYRpBIViE9yaFQlCyN30o/ZUUVXdvkqpHDNOXPHQRe5CR I1B71LespoI1E+3bWb6/HCkVR78Sw4diayynWktMHDMoTY/ix6QS3Ljkf+HjW19vAaNV 69iA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=z+qs/2NKRZqJT9+cIjIMwXFtLzAbzUCDWaDtMJPI9P0=; b=GWu1UvXi/N0NpXmjI/fPatMJINO4H/6Hq7RgKWLhEIrNqMDkL4rQQdil8y/wqGFSVy f/n2IUXt7UTJKkb3lCkVL7PAIfvpjAAUy2Vo0jHS5YwFAjNaAA0WMap6OXs9Bzhyqq1q Uwu6YFrk8eauMKaxXIeXIrF33hjjg/DIyx/PnUz+FpuYml5x0oM7SAotdpXR/JiYsBtI LQDYKh0C+z4L2QRQFsyt1zEytm1BcIv27/6/kRF4Lc3xSJjf1s8zKD1ZOssPq9l/OTlv OEOgI94qdcKnsrr4sUxk9nNmbDcNFAdrcRekfpz1MrLXdYoUW7JWbOQig0JayIMZ1ZFK THuQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y22si2714995edv.326.2020.07.29.23.45.10; Wed, 29 Jul 2020 23:45:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728756AbgG3Gmi (ORCPT + 99 others); Thu, 30 Jul 2020 02:42:38 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:43904 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725892AbgG3Gmi (ORCPT ); Thu, 30 Jul 2020 02:42:38 -0400 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 840B94D43BBC68A5832C; Thu, 30 Jul 2020 14:42:32 +0800 (CST) Received: from huawei.com (10.175.104.57) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.487.0; Thu, 30 Jul 2020 14:42:27 +0800 From: Li Heng To: , , CC: , Subject: [PATCH -next] bnxt_en: Remove superfluous memset() Date: Thu, 30 Jul 2020 14:43:50 +0800 Message-ID: <1596091430-19486-1-git-send-email-liheng40@huawei.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.104.57] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fixes coccicheck warning: ./drivers/net/ethernet/broadcom/bnxt/bnxt.c:3730:19-37: WARNING: dma_alloc_coherent use in stats -> hw_stats already zeroes out memory, so memset is not needed dma_alloc_coherent use in status already zeroes out memory, so memset is not needed Reported-by: Hulk Robot Signed-off-by: Li Heng --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index 2622d3c..31fb5a2 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -3732,8 +3732,6 @@ static int bnxt_alloc_stats_mem(struct bnxt *bp, struct bnxt_stats_mem *stats, if (!stats->hw_stats) return -ENOMEM; - memset(stats->hw_stats, 0, stats->len); - stats->sw_stats = kzalloc(stats->len, GFP_KERNEL); if (!stats->sw_stats) goto stats_mem_err; -- 2.7.4