Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3699500ybi; Sun, 14 Jul 2019 20:21:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqyG+AB21KFQqsD0ZQCZIBiSaH3XXmRmTrZZg824m3abRkOyfN0ZyeeAHROTj+Z6i9MVOgvx X-Received: by 2002:a17:902:aa09:: with SMTP id be9mr25161400plb.52.1563160877268; Sun, 14 Jul 2019 20:21:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563160877; cv=none; d=google.com; s=arc-20160816; b=HsKRTzwfo8gWGwGL8YvWFP1Inea2JMX5GlMWV6qcBGeT77SY4/CI+/nztU0tI9A1x9 F2m9JKl3ZNTEmTn04sgkHG1+GCUnx4xPySTCKfaKuTTkTs5ITevb9UcNV13lJboNSdE5 a8i7fvoCnx4u8djzwR9GMNCRwvWBQhCz03mHCDGnSNdYecc+vfEJU0pAjgNn9JrzZZOO Miqi4R27O97KGNj5cmcewjd4pMmRDfuA18cOPg2/HRNqFjV0mnzrsZMJ72n17g88IHki IEbt2PRgJT0LcgfQj3MXE2Cc35uJBWrQNG/5/tIR35QzaF4Fc9YqDAjmFzRZnXGrYOsx iQrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:message-id:date:subject:cc:from :dkim-signature; bh=KYF1ZTk0NtUB4/vGzgLc5BTvblesxGEYHhSa1UYpx1A=; b=qB3pp66KLsjYT8NAoGt2l2FVU2+XUHlUV5f3zz8KZOsSvwHwSVeSjtDoBJdtyUsBe4 2wq0UOYiLoNliPeJpll0EcT5s5heqjsm8n1LomoJciP3ZcH1VcprhGWydFFIK4kCdi/8 MczqrK4p4t8hqnhcWKEW6uFD2/y70FAelDmdTY6hsEfDrnInV0AL8h+8xIY2TZYkQlNp J0QbjCK+EKKnpz0Kij5yoI2l0O7eSUyrX9b+L58NZlKlRjRDS80laJedB/AsK898ehVS +Yv9jTasUOkQSTSg9LxGq7+DLdvLjPaKQGXlUYtq+pI8eiqj78CUfyxPiniyDeYMNb7r RvVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=P66gBr62; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 91si14418803plb.39.2019.07.14.20.20.59; Sun, 14 Jul 2019 20:21:17 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=P66gBr62; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729245AbfGODSi (ORCPT + 99 others); Sun, 14 Jul 2019 23:18:38 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:40761 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726074AbfGODSi (ORCPT ); Sun, 14 Jul 2019 23:18:38 -0400 Received: by mail-pg1-f193.google.com with SMTP id w10so6996994pgj.7; Sun, 14 Jul 2019 20:18:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=KYF1ZTk0NtUB4/vGzgLc5BTvblesxGEYHhSa1UYpx1A=; b=P66gBr622QmKRDowgoX4BM9N0pS3NaBB0HlkKMg9Qbi+FokZIv7jqR2Cj5DIJUBbLE 1s7qLPUuaFeCVJmHvUIxNNVGe64DUoXB3znCYuGRWzsXu0r2dbjqrwOcqjf42drkHZfJ XQNICUTDhmTTq78SUz38AraKqzAyqXpOkmMdftzSNWIgPB7IZbNDL8aeMpo8N7gD1Yz7 vaN9ePPYIn4QsUoIz3MqUNU4FnvsBK2RlocCvXk8KDc+pUSub9s7Ce5AmsvgUvRdx7Zc aJYKbujUKC0x4rmXHC/tQqAxmy5PLuN/f/lPcCFnifXAr8B2P8fn9GZxVTHuHrSdrYHW XQjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=KYF1ZTk0NtUB4/vGzgLc5BTvblesxGEYHhSa1UYpx1A=; b=FC3CKWYHiqFp++7mDAvimHV7OYn88Va5pjgQWVYsUEzjS2qhlbBIj7YkNk73yiHWZ+ ox68e3DM44wusgmny0TzH0HWyGvYOOhNrW1Lbbu37n+K1ffXKKmNHq7Ush3OFINqAjdd KdtFSDX/FQq4N6Rxwz6A9F7Al74lClLl0SX21YhYQbXEUrx/tuiLR4j3exVh2iDmpFWK dUu8thF+4Rzvew6Hu8KweHqhBAFJqx8orngTHl01gKykwTpArbR0WMyPzzhknnkZkALd GPJZvhWkwoC9k0cRUsJnpfPhRLD8O0vGOhxE0VCkao0v0jZyPQ5xctURLM156tJ5GtfX GVXA== X-Gm-Message-State: APjAAAWP/Jj/wPoPfOmjT0I8tja9t32EWlItc0L7B41AyVrxf9l3exdh HtxrCaDtJ8UlnR4/m9GQ/EA= X-Received: by 2002:a65:5a42:: with SMTP id z2mr25060649pgs.421.1563160717077; Sun, 14 Jul 2019 20:18:37 -0700 (PDT) Received: from hfq-skylake.ipads-lab.se.sjtu.edu.cn ([202.120.40.82]) by smtp.googlemail.com with ESMTPSA id t17sm17812964pgg.48.2019.07.14.20.18.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 14 Jul 2019 20:18:36 -0700 (PDT) From: Fuqian Huang Cc: Selvin Xavier , Devesh Sharma , Doug Ledford , Jason Gunthorpe , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, Fuqian Huang Subject: [PATCH v3 12/24] RDMA/ocrdma: Remove call to memset after dma_alloc_coherent Date: Mon, 15 Jul 2019 11:18:31 +0800 Message-Id: <20190715031831.6751-1-huangfq.daxian@gmail.com> X-Mailer: git-send-email 2.11.0 To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In commit 518a2f1925c3 ("dma-mapping: zero memory returned from dma_alloc_*"), dma_alloc_coherent has already zeroed the memory. So memset is not needed. Signed-off-by: Fuqian Huang --- Changes in v3: - Use actual commit rather than the merge commit in the commit message drivers/infiniband/hw/ocrdma/ocrdma_hw.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c index 5127e2ea4bdd..6e07712eb3ed 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c @@ -1351,7 +1351,6 @@ static int ocrdma_mbx_get_ctrl_attribs(struct ocrdma_dev *dev) mqe->u.nonemb_req.sge[0].pa_hi = (u32) upper_32_bits(dma.pa); mqe->u.nonemb_req.sge[0].len = dma.size; - memset(dma.va, 0, dma.size); ocrdma_init_mch((struct ocrdma_mbx_hdr *)dma.va, OCRDMA_CMD_GET_CTRL_ATTRIBUTES, OCRDMA_SUBSYS_COMMON, @@ -1690,7 +1689,6 @@ static int ocrdma_mbx_create_ah_tbl(struct ocrdma_dev *dev) goto mem_err_ah; dev->av_tbl.pa = pa; dev->av_tbl.num_ah = max_ah; - memset(dev->av_tbl.va, 0, dev->av_tbl.size); pbes = (struct ocrdma_pbe *)dev->av_tbl.pbl.va; for (i = 0; i < dev->av_tbl.size / OCRDMA_MIN_Q_PAGE_SIZE; i++) { @@ -2905,7 +2903,6 @@ static int ocrdma_mbx_get_dcbx_config(struct ocrdma_dev *dev, u32 ptype, mqe_sge->pa_hi = (u32) upper_32_bits(pa); mqe_sge->len = cmd.hdr.pyld_len; - memset(req, 0, sizeof(struct ocrdma_get_dcbx_cfg_req)); ocrdma_init_mch(&req->hdr, OCRDMA_CMD_GET_DCBX_CONFIG, OCRDMA_SUBSYS_DCBX, cmd.hdr.pyld_len); req->param_type = ptype; -- 2.11.0