Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3698697ybi; Sun, 14 Jul 2019 20:20:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqyWGG4HnsSqgNN8ysXA+BuZBX5Y66vXHIYhKi7Ru3wXR8oHIQFeil5rDkc3rXKpnRXvxm+s X-Received: by 2002:a17:90a:970a:: with SMTP id x10mr27139863pjo.12.1563160817966; Sun, 14 Jul 2019 20:20:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563160817; cv=none; d=google.com; s=arc-20160816; b=kS+fGQkdJB7dHOd+Cujd4LhblzYke/PRqPCvcWvAF0GCudDOKEsH2x4A/txGESwQAD VcUe8tMMkP/I+A+diWvDATlpuN6qaoY2BjzH3zrGHQP0j2Pa5qmBNhtMEpfX66ZXLfnV AEizI/MTPOOFEpIWnfMp5E+rgq7361aEQs8XZK51CH/0jV7BlKTwqPj873CArPkRAi5y e5FudX3K+Gy5UALcPSCsstsfkF2kv+RSIEMnQ/G6LM1u6DeEtQ9p9OhNzk2+HQS79/5t y63tjNRF0Cc2NtmbEiLiFBaEFSfUxZCC3M/x3izgP1qZH/e4Y1CQTy7Syo1olKoinXfm 4fVw== 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=OHd9Gj1NXZziz3dxXYZkOlR2we6FjZ7KaJ1LbxYLKIQ=; b=Kb9n/f9RZm4kAZo0bJylbHQStAXdP6uIcLlKg3JDq90FNdjKo0ksupMCegdMEGl7F+ K2yxGa1+Aakp8CJcCJU4oDnkZuMqLvd7U0exiz52gjg+ncO7O+gO+3YGZj2EZVqyoM/W +D1EcOc5WnzO40odjg2Wo+MuzLz4TrVo0h78tJiCYO9PRl6mITCVxcV5s4zzRi/c3x3i 4D0WU3sFrV5sru71UMXyqlLKCXU5qZLRDpX5a8ieiuELWuRc+Bs6ijp1rKljCtLgJdgq Ja4CUCoOY3Eyq7nptgDhnE3U8PbbWHCsjPrBZeOCy4FPgukNOO9Ec/OHyD7vOR3GcMeE aNVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=VTWUsO+y; 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 h63si14678606pjb.106.2019.07.14.20.20.01; Sun, 14 Jul 2019 20:20: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=VTWUsO+y; 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 S1729163AbfGODRw (ORCPT + 99 others); Sun, 14 Jul 2019 23:17:52 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:38638 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726074AbfGODRw (ORCPT ); Sun, 14 Jul 2019 23:17:52 -0400 Received: by mail-pf1-f194.google.com with SMTP id y15so6737624pfn.5; Sun, 14 Jul 2019 20:17:52 -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=OHd9Gj1NXZziz3dxXYZkOlR2we6FjZ7KaJ1LbxYLKIQ=; b=VTWUsO+yBwtBB7RQyLiHu1HrtZoePeRGZ2rQ1viBoc7EvixAYcbTQqb71HaJn6uU80 9n4luCtpd58rqt6PRNBLRu6FqVNGKZ7wKz1mj6OVx/rAtXZMbFkH099rlzbT3QvvFBXo hTIFi1y/2mwJV32WyPRi1S4hKl2wAxQ/yii+QeKzPJPRh6G2RwO69FBrO8PLENOpr59C LoIemjE0sw0ORIbCUeYDoaSff2GSCbCUHqm+ZL1gWuBh4GtzF9LCK0iQHkuCvJO2KCr+ 9fQtcT4CbcVNRO56qsXMN3zQzYSCKv+h4tx//r7w+NWjjV7LD1ibfuG/vU6e/1Bu5f/h QAFw== 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=OHd9Gj1NXZziz3dxXYZkOlR2we6FjZ7KaJ1LbxYLKIQ=; b=njrYKFXwFzjZzfmqGf68PoemIQzEiqM7jFBnhkDYwQic9QT7z9Pt6eiO+f9PBeSZyq pm+cViYcpA9Lz03cRHsE/GydHTPD/oYXhPwBvphqLnz7xcZNmOi9d0Um2TXPr2PCsGAK a/E+8H2srVMWYdXMepO+oYn8RrN3Gqd/QkThnsnpygb4S0a58qHH/9NECUsRaFW4DVUh Thy5ijwz88M9crn1hf7P0Xo8U+VyB7v66RlB1DBVI0D6HtrgMfPywkNy0ZwxfrQVdQ95 +Yyhv3C8j7Lu2FYDs5l+9bj2T17GxcW7U+N9u4ox7YPkxT3wUINp4pWR/ndyW/QwERM2 oLlw== X-Gm-Message-State: APjAAAUpv6Q29biEqj4GkFoc2flPn/pNNectd7wNEl4EmsFIBHT0amc+ JZ+8S7Prhb+NhKifTctZ5SQSMU719o8= X-Received: by 2002:a65:430a:: with SMTP id j10mr25272177pgq.374.1563160671841; Sun, 14 Jul 2019 20:17:51 -0700 (PDT) Received: from hfq-skylake.ipads-lab.se.sjtu.edu.cn ([202.120.40.82]) by smtp.googlemail.com with ESMTPSA id a15sm1926403pfg.102.2019.07.14.20.17.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 14 Jul 2019 20:17:51 -0700 (PDT) From: Fuqian Huang Cc: Potnuri Bharat Teja , Doug Ledford , Jason Gunthorpe , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, Fuqian Huang Subject: [PATCH v3 07/24] rdma/cxgb3: Remove call to memset after dma_alloc_coherent Date: Mon, 15 Jul 2019 11:17:46 +0800 Message-Id: <20190715031746.6514-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/cxgb3/cxio_hal.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/infiniband/hw/cxgb3/cxio_hal.c b/drivers/infiniband/hw/cxgb3/cxio_hal.c index 8ac72ac7cbac..0e37f55678f8 100644 --- a/drivers/infiniband/hw/cxgb3/cxio_hal.c +++ b/drivers/infiniband/hw/cxgb3/cxio_hal.c @@ -174,7 +174,6 @@ int cxio_create_cq(struct cxio_rdev *rdev_p, struct t3_cq *cq, int kernel) return -ENOMEM; } dma_unmap_addr_set(cq, mapping, cq->dma_addr); - memset(cq->queue, 0, size); setup.id = cq->cqid; setup.base_addr = (u64) (cq->dma_addr); setup.size = 1UL << cq->size_log2; @@ -538,8 +537,6 @@ static int cxio_hal_init_ctrl_qp(struct cxio_rdev *rdev_p) dma_unmap_addr_set(&rdev_p->ctrl_qp, mapping, rdev_p->ctrl_qp.dma_addr); rdev_p->ctrl_qp.doorbell = (void __iomem *)rdev_p->rnic_info.kdb_addr; - memset(rdev_p->ctrl_qp.workq, 0, - (1 << T3_CTRL_QP_SIZE_LOG2) * sizeof(union t3_wr)); mutex_init(&rdev_p->ctrl_qp.lock); init_waitqueue_head(&rdev_p->ctrl_qp.waitq); -- 2.11.0