From: Julia Lawall <julia.lawall@lip6.fr>
To: Christoph Hellwig <hch@lst.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Luis Chamberlain <mcgrof@kernel.org>,
iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] cross-tree: phase out dma_zalloc_coherent() on headers
Date: Tue, 8 Jan 2019 15:30:41 +0100 (CET) [thread overview]
Message-ID: <alpine.DEB.2.20.1901081530070.6130@hadrien> (raw)
In-Reply-To: <20190108130701.14161-3-hch@lst.de>
On Tue, 8 Jan 2019, Christoph Hellwig wrote:
> From: Luis Chamberlain <mcgrof@kernel.org>
>
> 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 <hch@lst.de>
> Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
> 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
>
>
next prev parent reply other threads:[~2019-01-08 14:30 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-08 13:06 remove dma_zalloc_coherent Christoph Hellwig
2019-01-08 13:06 ` [PATCH 1/3] cross-tree: phase out dma_zalloc_coherent() Christoph Hellwig
2019-01-08 13:07 ` [PATCH 2/3] cross-tree: phase out dma_zalloc_coherent() on headers Christoph Hellwig
2019-01-08 14:30 ` Julia Lawall [this message]
2019-01-08 13:07 ` [PATCH 3/3] dma-mapping: remove dma_zalloc_coherent() Christoph Hellwig
2019-01-08 14:29 ` Julia Lawall
2019-01-08 13:55 ` remove dma_zalloc_coherent Julia Lawall
2019-01-08 13:56 ` Julia Lawall
2019-01-11 18:16 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.20.1901081530070.6130@hadrien \
--to=julia.lawall@lip6.fr \
--cc=hch@lst.de \
--cc=iommu@lists.linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).