From patchwork Thu Sep 5 09:53:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 11132511 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6F46A17EF for ; Thu, 5 Sep 2019 09:35:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 595A521743 for ; Thu, 5 Sep 2019 09:35:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731390AbfIEJfl (ORCPT ); Thu, 5 Sep 2019 05:35:41 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:54584 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730839AbfIEJfl (ORCPT ); Thu, 5 Sep 2019 05:35:41 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id ADB7A41D25BC6B19D5FB; Thu, 5 Sep 2019 17:35:39 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.439.0; Thu, 5 Sep 2019 17:35:32 +0800 From: Wei Yongjun To: Saeed Mahameed , Leon Romanovsky , Mark Bloch , Alex Vesker , "Erez Shitrit" CC: Wei Yongjun , , , Subject: [PATCH net-next] net/mlx5: DR, Remove useless set memory to zero use memset() Date: Thu, 5 Sep 2019 09:53:26 +0000 Message-ID: <20190905095326.127277-1-weiyongjun1@huawei.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org The memory return by kzalloc() has already be set to zero, so remove useless memset(0). Signed-off-by: Wei Yongjun --- drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c index ef0dea44f3b3..5df8436b2ae3 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c @@ -899,7 +899,6 @@ int mlx5dr_send_ring_alloc(struct mlx5dr_domain *dmn) goto clean_qp; } - memset(dmn->send_ring->buf, 0, size); dmn->send_ring->buf_size = size; dmn->send_ring->mr = dr_reg_mr(dmn->mdev,