From: Leon Romanovsky <leon@kernel.org>
To: "Christian König" <ckoenig.leichtzumerken@gmail.com>
Cc: kevin.tian@intel.com, jgg@nvidia.com, nicolinc@nvidia.com,
dri-devel@lists.freedesktop.org,
"Christian König" <christian.koenig@amd.com>
Subject: Re: [PATCH] dma-buf: remove pci-p2pdma include from dma-buf.h v2
Date: Tue, 22 Sep 2026 15:36:13 +0300 [thread overview]
Message-ID: <20260922123613.GF563127@unreal> (raw)
In-Reply-To: <20260921123613.683042-1-christian.koenig@amd.com>
On Mon, Sep 21, 2026 at 02:36:13PM +0200, Christian König wrote:
> That is unecessary here and creates an unwanted dependency to the PCI
> subsystem.
>
> Use forward declare in dma-buf-mapping.h instead.
>
> v2: switch to forward declare
>
> Signed-off-by: Christian König <christian.koenig@amd.com>
> ---
It is better to put the changelog below the `---` line, as this information
does not add anything useful for readers of the Git log.
> include/linux/dma-buf-mapping.h | 2 ++
> include/linux/dma-buf.h | 1 -
> 2 files changed, 2 insertions(+), 1 deletion(-)
I would expect #include <linux/pci-p2pdma.h> to be in
drivers/dma-buf/dma-buf-mapping.c instead.
Thanks
>
> diff --git a/include/linux/dma-buf-mapping.h b/include/linux/dma-buf-mapping.h
> index 09bde3f748e4..64c03608cce7 100644
> --- a/include/linux/dma-buf-mapping.h
> +++ b/include/linux/dma-buf-mapping.h
> @@ -7,6 +7,8 @@
> #define __DMA_BUF_MAPPING_H__
> #include <linux/dma-buf.h>
>
> +struct p2pdma_provider;
> +
> struct sg_table *dma_buf_phys_vec_to_sgt(struct dma_buf_attachment *attach,
> struct p2pdma_provider *provider,
> struct phys_vec *phys_vec,
> diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h
> index d15b2b31d3c9..159271fcf3d2 100644
> --- a/include/linux/dma-buf.h
> +++ b/include/linux/dma-buf.h
> @@ -22,7 +22,6 @@
> #include <linux/fs.h>
> #include <linux/dma-fence.h>
> #include <linux/wait.h>
> -#include <linux/pci-p2pdma.h>
>
> struct device;
> struct dma_buf;
> --
> 2.43.0
>
prev parent reply other threads:[~2026-09-22 12:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-21 12:36 [PATCH] dma-buf: remove pci-p2pdma include from dma-buf.h v2 Christian König
2026-09-21 12:37 ` Jason Gunthorpe
2026-09-21 12:43 ` sashiko-bot
2026-09-22 12:36 ` Leon Romanovsky [this message]
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=20260922123613.GF563127@unreal \
--to=leon@kernel.org \
--cc=christian.koenig@amd.com \
--cc=ckoenig.leichtzumerken@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jgg@nvidia.com \
--cc=kevin.tian@intel.com \
--cc=nicolinc@nvidia.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