From: sashiko-bot@kernel.org
To: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>
Cc: intel-xe@lists.freedesktop.org
Subject: Re: [PATCH] drm/xe: Make p2pdma distance check verbose via dynamic debug
Date: Mon, 14 Sep 2026 09:56:16 +0000 [thread overview]
Message-ID: <20260914095616.BD02E1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260914094641.8779-1-thomas.hellstrom@linux.intel.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Unconditional use of the internal `_dynamic_func_call` macro causes a build failure when `CONFIG_DYNAMIC_DEBUG` is disabled.
--
commit 6e70a101effbf7ae91a2873e2642ceaadc4900a3
Author: Thomas Hellström <thomas.hellstrom@linux.intel.com>
drm/xe: Make p2pdma distance check verbose via dynamic debug
pci_p2pdma_distance() can optionally print details about how it computed
the ACS/PCIe topology distance between the two devices. Tie the verbose
argument to a dedicated dynamic-debug callsite tagged "xe dma-buf p2p
debug" so the extra p2pdma distance logging can be switched on without a
recompile.
> diff --git a/drivers/gpu/drm/xe/xe_dma_buf.c b/drivers/gpu/drm/xe/xe_dma_buf.c
> index 5d9f1cd24b7f3..b63fd70fb4de9 100644
> --- a/drivers/gpu/drm/xe/xe_dma_buf.c
> +++ b/drivers/gpu/drm/xe/xe_dma_buf.c
> @@ -22,13 +22,21 @@
>
> MODULE_IMPORT_NS("DMA_BUF");
>
> +static void xe_ddebug_flip_bool(const struct _ddebug *desc, bool *flag)
> +{
> + *flag = true;
> +}
> +
> static int xe_dma_buf_attach(struct dma_buf *dmabuf,
> struct dma_buf_attachment *attach)
> {
> struct drm_gem_object *obj = attach->dmabuf->priv;
> + bool verbose_p2p_dist = drm_debug_enabled(DRM_UT_DRIVER);
> +
> + _dynamic_func_call("xe dma-buf p2p debug", xe_ddebug_flip_bool, &verbose_p2p_dist);
^^^^^^^^^^^^^^^^^^
[Severity: Low]
Does this unconditional use of the internal _dynamic_func_call macro cause a
build failure when CONFIG_DYNAMIC_DEBUG is disabled?
Since _dynamic_func_call has no stub definition in the #else block of
include/linux/dynamic_debug.h, compiling the xe driver with CONFIG_DRM_XE
enabled but CONFIG_DYNAMIC_DEBUG disabled results in an implicit function
declaration error.
If the macro call is guarded by an ifdef, does xe_ddebug_flip_bool() also need
an ifdef guard or __maybe_unused to avoid a -Wunused-function warning?
>
> if (attach->peer2peer &&
> - pci_p2pdma_distance(to_pci_dev(obj->dev->dev), attach->dev, false) < 0)
> + pci_p2pdma_distance(to_pci_dev(obj->dev->dev), attach->dev, verbose_p2p_dist) < 0)
> attach->peer2peer = false;
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260914094641.8779-1-thomas.hellstrom@linux.intel.com?part=1
next prev parent reply other threads:[~2026-09-14 9:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-14 9:46 [PATCH] drm/xe: Make p2pdma distance check verbose via dynamic debug Thomas Hellström
2026-09-14 9:56 ` sashiko-bot [this message]
2026-09-14 11:34 ` Matthew Auld
2026-09-14 11:39 ` Thomas Hellström
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=20260914095616.BD02E1F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=thomas.hellstrom@linux.intel.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