All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Christian König" <ckoenig.leichtzumerken@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] dma-buf: remove pci-p2pdma include from dma-buf.h
Date: Mon, 21 Sep 2026 09:58:56 +0000	[thread overview]
Message-ID: <20260921095856.A393E1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260921094452.679455-1-christian.koenig@amd.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] mlx5: compilation failure due to missing pci-p2pdma.h include
--

commit b5028b6ecc514cd51ffdd0df7d0570f15757e7f7
Author: Christian König <ckoenig.leichtzumerken@gmail.com>

dma-buf: remove pci-p2pdma include from dma-buf.h
    
That is unecessary here and creates an unwanted dependency to the PCI
subsystem. Move that into dma-buf-mapping.h instead.

> diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h
> index d15b2b31d3c91..159271fcf3d2e 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>

[Severity: Low]
Does removing this include break the compilation of the RDMA mlx5 driver?

It appears the mlx5 driver and ib_verbs.h implicitly relied on dma-buf.h
providing declarations for pcim_p2pdma_provider and pcim_p2pdma_init.

Compiling with CONFIG_MLX5_INFINIBAND enabled results in implicit function
declaration errors:

drivers/infiniband/hw/mlx5/main.c:mlx5_ib_mmap_get_pfns() {
    ...
    *provider = pcim_p2pdma_provider(pdev, bar);
    ...
}

drivers/infiniband/hw/mlx5/main.c:mlx5_ib_stage_init_init() {
    ...
    err = pcim_p2pdma_init(mdev->pdev);
    ...
}

It also causes a warning in include/rdma/ib_verbs.h where
struct p2pdma_provider is used without a forward declaration in
struct ib_device_ops:

include/rdma/ib_verbs.h:struct ib_device_ops {
    ...
    struct p2pdma_provider **provider);
    ...
}

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260921094452.679455-1-christian.koenig@amd.com?part=1

  reply	other threads:[~2026-09-21  9:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-21  9:44 [PATCH] dma-buf: remove pci-p2pdma include from dma-buf.h Christian König
2026-09-21  9:58 ` sashiko-bot [this message]
2026-09-21 12:25 ` 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=20260921095856.A393E1F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=ckoenig.leichtzumerken@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.