Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3991957imu; Mon, 12 Nov 2018 04:07:11 -0800 (PST) X-Google-Smtp-Source: AJdET5dwVez8mFKEX23Ej+lz6mJqD1YoIaL00RG9iqaDxaJTQa5+xaIKKkVn/SykUr1NDAFj4pm5 X-Received: by 2002:a63:9041:: with SMTP id a62mr574185pge.163.1542024431300; Mon, 12 Nov 2018 04:07:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542024431; cv=none; d=google.com; s=arc-20160816; b=NZ8Dsw10FiiGEyH6sS72WWh3ejfcIrzS5naE+OpCtXkk4oetLg/SSMtwrxDJXUwZF7 3D5gqQpz5L/l+KM2CYjoGPPnJ3GA01JXWrhq5HGVAe8ioUFbSNEo2MA3yHaYcbz/HE8J SfHNhlgmd6iPeURQAkuZSkyu/KGUuLoK+Vpaanbw1UxZc/8RC5tJqWdaave0deAcXhPp m7510JBUSG8Rp8rTQJfR/n0spdHD2KgtRkWpxMkSfTeFnEcjLxoxPmt2H4wWyIAbO153 suYGyqiCGqGwipno6s6oWnbg/VMiyqBxnto/+HkQvJTHBZmn4Ye/qXJ8QtiiF0/eLp0/ Jjyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=kYTMYFv1zxbnhoEXHeIKXqmQk06ZJTc50NB4EXspyPk=; b=yGb4ZLP3fBO0hn4UhxM3ghZDd5bblKwS56Lg9rzafuX1ak/pmdE6pFT4QuWpHbdczn Vvvs+DOIVCv4mbu5x+ZIV9La4IRVq3lwWxJFMjOYZFdIT1Awt5TZPq2mR1rA3jFKvEIt jkkjTLoxi1H4S+inmi20QqJYgZNcooXo79j4h5ER0WLMTPyJx2+Yq4sxnIp+EsAaeqse UP2KiPhq+6S5PQr+IXFJCsVwNf0kKaqKNPUoI0gywCXWnGffoQL9fam8jLkDNWIDbLDT FE20iZ97ispPQQxdHFLmtx1jZIx94hW2BcUD+V14dVzwz6Wpc2Z/WO3iIYoPtZew2aH9 0QtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=eEuYIoCQ; 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=pass (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 b2si16254556pgq.275.2018.11.12.04.06.44; Mon, 12 Nov 2018 04:07:11 -0800 (PST) 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=pass header.i=@gmail.com header.s=20161025 header.b=eEuYIoCQ; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729448AbeKLV5y (ORCPT + 99 others); Mon, 12 Nov 2018 16:57:54 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:41562 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728401AbeKLV5y (ORCPT ); Mon, 12 Nov 2018 16:57:54 -0500 Received: by mail-pl1-f196.google.com with SMTP id p16-v6so4266101plr.8; Mon, 12 Nov 2018 04:04:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=kYTMYFv1zxbnhoEXHeIKXqmQk06ZJTc50NB4EXspyPk=; b=eEuYIoCQWF7uedqRD1DOmH+qRQfQFcmt6zJuNETxzySYFnt4Gl0Waqnqx/HK5cOeV3 bsaRy5sFsWOIwg/GpWemMndf5WlXX2vgrBfaBhFn3/DE5n7BrNJJvscjkpAaTLpt6Zzx tLtRtOAt6lMrkVB6WXl7fLxHQIVe9uOqrdaTitDKOE5cCviKwCiGMoPHvmpfJ1aqghoE BGA7CKSmvdIzGo7FZHXnU/0EvmQ4GSv3hbJYY3mP+HGlrAG4WnS6jQJWOq7xfeIPOk8C L3+uf+crjbWXRYAGaxWnnoe8OAyQMkt3AZHd1VMGCcNI7rCovVOMxzXegQq/oIEdw8h/ s8ZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=kYTMYFv1zxbnhoEXHeIKXqmQk06ZJTc50NB4EXspyPk=; b=PUWuJf5pZUSBmAFcTyrruZ26Mzr46fuqpJbuLBTvqHjk7W+MyKQaSI0wQxDsn8WaEc cVYJ539COuB9zy5YYWjZvBuHcreDWczQ7m171FmJEVYiySBlo4VM/Fq3sRDZ512/Cbbx Jm/OV7+FZe51+qbF0Rv41Xo/Af+aK1WS1gCwoT90vx8M9hFxI0psarMa+9Js60F26BsJ lSpaOyhNrT6nqo/lprod1ZmE9BOWguqpenLUerrXfKgzNH092CQwjHkPVD62/5Ocxj7G 2wCSrdb/PECRzduMI43jf1HXUbVk33KhT9Rd9vSdDoag54AYEVXPjLf9msfALY7DSdR+ W99A== X-Gm-Message-State: AGRZ1gJEKO8Yv1GflYKoYGDjVaebX1qmeOnSsy7K7DCSCsonsbcfRBVX VGcqi520XOa1Xr9ylbmKbLUnmCE9I9eU4rzVgXY= X-Received: by 2002:a17:902:7442:: with SMTP id e2mr655714plt.67.1542024294703; Mon, 12 Nov 2018 04:04:54 -0800 (PST) MIME-Version: 1.0 References: <5be59bf8.1c69fb81.a231.dcd6@mx.google.com> In-Reply-To: From: Sabyasachi Gupta Date: Mon, 12 Nov 2018 17:34:42 +0530 Message-ID: Subject: Re: [PATCH] infiniband/hw/hns/hns_roce_hw_v2.c: Use dma_zalloc_coherent To: Souptick Joarder Cc: oulijun@huawei.com, xavier.huwei@huawei.com, dledford@redhat.com, jgg@ziepe.ca, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, Brajeswar Ghosh Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Nov 10, 2018 at 11:57 AM Souptick Joarder wrote: > > On Fri, Nov 9, 2018 at 8:08 PM Sabyasachi Gupta > wrote: > > > > Replaced dma_alloc_coherent + memset with dma_zalloc_coherent > > There are few other places in this file where same is applicable. > Can we get those changes in same patch ? > > as all the changes are now in linux-next I am going to drop this patch > > Signed-off-by: Sabyasachi Gupta > > --- > > drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 3 +-- > > 1 file changed, 1 insertion(+), 2 deletions(-) > > > > diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c > > index a4c62ae..c9966ec 100644 > > --- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c > > +++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c > > @@ -4972,13 +4972,12 @@ static int hns_roce_mhop_alloc_eq(struct hns_roce_dev *hr_dev, > > eqe_alloc = i * (buf_chk_sz / eq->eqe_size); > > size = (eq->entries - eqe_alloc) * eq->eqe_size; > > } > > - eq->buf[i] = dma_alloc_coherent(dev, size, > > + eq->buf[i] = dma_zalloc_coherent(dev, size, > > &(eq->buf_dma[i]), > > GFP_KERNEL); > > if (!eq->buf[i]) > > goto err_dma_alloc_buf; > > > > - memset(eq->buf[i], 0, size); > > *(eq->bt_l0 + i) = eq->buf_dma[i]; > > > > eq_buf_cnt++; > > -- > > 2.7.4 > >