Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4798766imu; Tue, 8 Jan 2019 06:32:45 -0800 (PST) X-Google-Smtp-Source: ALg8bN5sanrM7VydlY1vnozBm0drfqyOUDN1tiVIVguTrZ+GSia3xA/aQKCOh/knvrWHuR1IV4By X-Received: by 2002:a62:8add:: with SMTP id o90mr1960356pfk.210.1546957965462; Tue, 08 Jan 2019 06:32:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546957965; cv=none; d=google.com; s=arc-20160816; b=eSb3NTxgnA4M8T4mdeXPf1v5On0EhyP8efbnUUt6My+h1ZMIue5VfBXV1fA0+/T7JO yAxbYRdAK0vJTsjd/cIcwEUqmsjGzvvTRZ4RUkKydz0iBhnm2ljaxUAEmnRf5wfmHMCT rdgc0RLn8uWSDPhkcNKIwdqJXzGc73XZdjgT/VxPrCGL9HdOmyuJuQGBFaIXMWuxlYBP qhkyjjsmao6n6vKO6iovJ6S1OHsCuyEp4baXWI8kRF1DlW/z9MBZgr7Ipby5XdWrT0N0 Eq+0XTQ0AQaydGQ2/voIdmCkxUvASPTVtseHCZJ9ZkKpjWQVUOECKUDH2vtZIUDDHsDZ qnug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=zNPZKkejJD1SgXHSIUO8L14fVy4hKPowxSMfPZa9orY=; b=PfLPmjHv3IFtToJBC6fpnchYxklLSAXvFv1Kh1cSIaoneNyP/8LciKLo4LUSPQL/Ly slHsUb7O2T80KbwR5vN9Qq0bQIINmV9NDv1R8wnDLXCam3dv+ObiTLJrnLdJb/6oUFXv 4AcNSWercAGD1Z2XoTF/9KISU+YJjooCINxbB0cD3bYwoISZj09CYi7snF7LJYzrCFqq wZtTw27NBDeQERouQMFy8HWaCtAMH2oS3cHQkiiDA+ImgSjrApxLZ85dhpMHu3U/vp2f RdiuPdASb81fdyg/UK/22EzvQkYyOQqw0+j4mBr66qvuIelLI6NHAgR2AnZCNC9AtqBF qxPQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 80si32677288pfz.11.2019.01.08.06.32.29; Tue, 08 Jan 2019 06:32:45 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728811AbfAHOap (ORCPT + 99 others); Tue, 8 Jan 2019 09:30:45 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:46761 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728318AbfAHOap (ORCPT ); Tue, 8 Jan 2019 09:30:45 -0500 X-IronPort-AV: E=Sophos;i="5.56,454,1539640800"; d="scan'208";a="363106600" Received: from vaio-julia.rsr.lip6.fr ([132.227.76.33]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Jan 2019 15:30:43 +0100 Date: Tue, 8 Jan 2019 15:30:41 +0100 (CET) From: Julia Lawall X-X-Sender: jll@hadrien To: Christoph Hellwig cc: Linus Torvalds , Luis Chamberlain , iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/3] cross-tree: phase out dma_zalloc_coherent() on headers In-Reply-To: <20190108130701.14161-3-hch@lst.de> Message-ID: References: <20190108130701.14161-1-hch@lst.de> <20190108130701.14161-3-hch@lst.de> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 8 Jan 2019, Christoph Hellwig wrote: > From: Luis Chamberlain > > The last few stragglers coccinelle doesn't pick up are on driver > specific header files. Phase those out as well as dma_alloc_coherent() > zeroes out the memory as well now too. You can use the --include-headers option to also process the header files (just an information, no need to change). julia > > Suggested-by: Christoph Hellwig > Signed-off-by: Luis Chamberlain > Signed-off-by: Christoph Hellwig > --- > drivers/net/ethernet/broadcom/bnx2x/bnx2x.h | 2 +- > drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h | 2 +- > drivers/net/ethernet/marvell/octeontx2/af/common.h | 2 +- > 3 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h > index 5cd3135dfe30..03d131f777bc 100644 > --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h > +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h > @@ -2081,7 +2081,7 @@ void bnx2x_igu_clear_sb_gen(struct bnx2x *bp, u8 func, u8 idu_sb_id, > bool is_pf); > > #define BNX2X_ILT_ZALLOC(x, y, size) \ > - x = dma_zalloc_coherent(&bp->pdev->dev, size, y, GFP_KERNEL) > + x = dma_alloc_coherent(&bp->pdev->dev, size, y, GFP_KERNEL) > > #define BNX2X_ILT_FREE(x, y, size) \ > do { \ > diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h > index 142bc11b9fbb..2462e7aa0c5d 100644 > --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h > +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h > @@ -52,7 +52,7 @@ extern int bnx2x_num_queues; > > #define BNX2X_PCI_ALLOC(y, size) \ > ({ \ > - void *x = dma_zalloc_coherent(&bp->pdev->dev, size, y, GFP_KERNEL); \ > + void *x = dma_alloc_coherent(&bp->pdev->dev, size, y, GFP_KERNEL); \ > if (x) \ > DP(NETIF_MSG_HW, \ > "BNX2X_PCI_ALLOC: Physical %Lx Virtual %p\n", \ > diff --git a/drivers/net/ethernet/marvell/octeontx2/af/common.h b/drivers/net/ethernet/marvell/octeontx2/af/common.h > index ec50a21c5aaf..e332e82fc066 100644 > --- a/drivers/net/ethernet/marvell/octeontx2/af/common.h > +++ b/drivers/net/ethernet/marvell/octeontx2/af/common.h > @@ -64,7 +64,7 @@ static inline int qmem_alloc(struct device *dev, struct qmem **q, > > qmem->entry_sz = entry_sz; > qmem->alloc_sz = (qsize * entry_sz) + OTX2_ALIGN; > - qmem->base = dma_zalloc_coherent(dev, qmem->alloc_sz, > + qmem->base = dma_alloc_coherent(dev, qmem->alloc_sz, > &qmem->iova, GFP_KERNEL); > if (!qmem->base) > return -ENOMEM; > -- > 2.20.1 > >