From: Joe Perches <joe@perches.com>
To: Suraj Upadhyay <usuraj35@gmail.com>,
dledford@redhat.com, jgg@ziepe.ca, galpress@amazon.com,
sleybo@amazon.com
Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 5/4] RDMA/efa : Remove pci-dma-compat wrapper APIs
Date: Sun, 09 Aug 2020 08:10:46 +0000 [thread overview]
Message-ID: <91159e176c090f2d7ada6957af342c4b6d787973.camel@perches.com> (raw)
In-Reply-To: <20200809074517.GA4419@blackclown>
On Sun, 2020-08-09 at 13:15 +0530, Suraj Upadhyay wrote:
> The legacy API wrappers in include/linux/pci-dma-compat.h
> should go away as it creates unnecessary midlayering
> for include/linux/dma-mapping.h APIs.
>
> Instead use dma-mapping.h APIs directly.
>
> The patch has been generated with the coccinelle script below
> and compile-tested.
[]
> diff --git a/drivers/infiniband/hw/efa/efa_main.c b/drivers/infiniband/hw/efa/efa_main.c
[]
> @@ -405,13 +405,13 @@ static int efa_device_init(struct efa_com_dev *edev, struct pci_dev *pdev)
> return err;
> }
>
> - err = pci_set_dma_mask(pdev, DMA_BIT_MASK(dma_width));
> + err = dma_set_mask(&pdev->dev, DMA_BIT_MASK(dma_width));
> if (err) {
> dev_err(&pdev->dev, "pci_set_dma_mask failed %d\n", err);
Coccinelle is great for some things, but not
necessarily for these sorts of changes in an
completely automated way.
The dev_err messages also need to be changed
as the format string contains the old name.
> - err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(dma_width));
> + err = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(dma_width));
> if (err) {
> dev_err(&pdev->dev,
> "err_pci_set_consistent_dma_mask failed %d\n",
next prev parent reply other threads:[~2020-08-09 8:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-09 7:36 [PATCH 0/4] Infiniband Subsystem: Remove pci-dma-compat wrapper APIs Suraj Upadhyay
2020-08-09 7:41 ` [PATCH 1/4] IB/hfi1: " Suraj Upadhyay
2020-08-09 7:43 ` [PATCH 2/4] IB/mthca: " Suraj Upadhyay
2020-08-09 7:44 ` [PATCH 3/4] RDMA/qib: " Suraj Upadhyay
2020-08-09 7:45 ` [PATCH 4/4] RDMA/pvrdma: " Suraj Upadhyay
2020-08-09 7:57 ` [PATCH 5/4] RDMA/efa : " Suraj Upadhyay
2020-08-09 8:10 ` Joe Perches [this message]
2020-08-09 8:35 ` [PATCH 0/4] Infiniband Subsystem: " Gal Pressman
2020-08-09 8:50 ` Suraj Upadhyay
2020-08-24 16:42 ` Jason Gunthorpe
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=91159e176c090f2d7ada6957af342c4b6d787973.camel@perches.com \
--to=joe@perches.com \
--cc=dledford@redhat.com \
--cc=galpress@amazon.com \
--cc=jgg@ziepe.ca \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=sleybo@amazon.com \
--cc=usuraj35@gmail.com \
/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).