From: Jani Nikula <jani.nikula@linux.intel.com>
To: "Albert Esteve" <aesteve@redhat.com>,
"Harry Wentland" <harry.wentland@amd.com>,
"Leo Li" <sunpeng.li@amd.com>,
"Rodrigo Siqueira" <siqueira@igalia.com>,
"Alex Deucher" <alexander.deucher@amd.com>,
"Christian König" <christian.koenig@amd.com>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Jonathan Corbet" <corbet@lwn.net>,
"Shuah Khan" <skhan@linuxfoundation.org>,
"Randy Dunlap" <rdunlap@infradead.org>
Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
Maxime Ripard <mripard@kernel.org>,
Albert Esteve <aesteve@redhat.com>
Subject: Re: [PATCH 3/3] drm/amd/display: drop INLINE_IFN_KUNIT
Date: Mon, 07 Sep 2026 18:39:50 +0300 [thread overview]
Message-ID: <6f3ee86ab60ed16348dc0ac252ba27596829dc19@intel.com> (raw)
In-Reply-To: <20260907-visibility-unification-v1-3-6a962e5b3351@redhat.com>
On Mon, 07 Sep 2026, Albert Esteve <aesteve@redhat.com> wrote:
> This helper was originally static inline. INLINE_IFN_KUNIT only added
> inline for KUnit builds, which dropped that hint from production.
>
> There is no equivalent in kunit/visibility.h, and tests do not need
> one: they call the exported symbol from another translation unit.
> Use an unconditional inline with VISIBLE_IF_KUNIT instead so
> production stays static inline.
FWIW, using inline in a .c file is pointless in most cases, and the
compiler usually does the right thing. It might inline at a better
granularity than the manual one. (You could see what difference having
the inline makes, if any.)
BR,
Jani.
>
> kernel-doc already strips inline, so the dedicated xform can go too.
>
> Signed-off-by: Albert Esteve <aesteve@redhat.com>
> ---
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c | 2 +-
> drivers/gpu/drm/amd/display/dc/dm_helpers.h | 7 -------
> tools/lib/python/kdoc/xforms_lists.py | 1 -
> 3 files changed, 1 insertion(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c
> index e3f4ee6e8380..eea7e7dcfa30 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c
> @@ -173,7 +173,7 @@ void amdgpu_dm_init_color_mod(void)
> }
> EXPORT_SYMBOL_IF_KUNIT(amdgpu_dm_init_color_mod);
>
> -VISIBLE_IF_KUNIT INLINE_IFN_KUNIT
> +VISIBLE_IF_KUNIT inline
> struct fixed31_32 amdgpu_dm_fixpt_from_s3132(__u64 x)
> {
> struct fixed31_32 val;
> diff --git a/drivers/gpu/drm/amd/display/dc/dm_helpers.h b/drivers/gpu/drm/amd/display/dc/dm_helpers.h
> index 6d7cdab1006f..cabcbc2599e6 100644
> --- a/drivers/gpu/drm/amd/display/dc/dm_helpers.h
> +++ b/drivers/gpu/drm/amd/display/dc/dm_helpers.h
> @@ -194,13 +194,6 @@ void dm_helpers_mccs_vcp_set(
> struct dc_link *link,
> struct dc_sink *sink);
>
> -#if IS_ENABLED(CONFIG_DRM_AMD_DC_KUNIT_TEST)
> -#define INLINE_IFN_KUNIT inline
> -
> -#else
> -#define INLINE_IFN_KUNIT
> -#endif
> -
> bool dm_helpers_submit_i2c_over_aux(
> struct ddc_service *ddc,
> uint32_t address,
> diff --git a/tools/lib/python/kdoc/xforms_lists.py b/tools/lib/python/kdoc/xforms_lists.py
> index b49b81da74d9..cab4a49e4fc4 100644
> --- a/tools/lib/python/kdoc/xforms_lists.py
> +++ b/tools/lib/python/kdoc/xforms_lists.py
> @@ -105,7 +105,6 @@ class CTransforms:
> (CMatch("__attribute_const__"), ""),
> (CMatch("__attribute__"), ""),
> (CMatch("VISIBLE_IF_KUNIT"), ""),
> - (CMatch("INLINE_IFN_KUNIT"), ""),
>
> #
> # HACK: this is similar to process_export() hack. It is meant to
--
Jani Nikula, Intel
next prev parent reply other threads:[~2026-09-07 15:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-07 13:28 [PATCH 0/3] drm/amd/display: use kunit/visibility.h for test helpers Albert Esteve
2026-09-07 13:28 ` [PATCH 1/3] drm/amd/display: replace STATIC_IFN_KUNIT with VISIBLE_IF_KUNIT Albert Esteve
2026-09-07 13:50 ` sashiko-bot
2026-09-07 13:28 ` [PATCH 2/3] drm/amd/display: replace EXPORT_IF_KUNIT with EXPORT_SYMBOL_IF_KUNIT Albert Esteve
2026-09-07 13:28 ` [PATCH 3/3] drm/amd/display: drop INLINE_IFN_KUNIT Albert Esteve
2026-09-07 15:39 ` Jani Nikula [this message]
2026-09-07 15:24 ` [PATCH 0/3] drm/amd/display: use kunit/visibility.h for test helpers Maxime Ripard
2026-09-11 20:50 ` Alex Hung
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=6f3ee86ab60ed16348dc0ac252ba27596829dc19@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=aesteve@redhat.com \
--cc=airlied@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=corbet@lwn.net \
--cc=dri-devel@lists.freedesktop.org \
--cc=harry.wentland@amd.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mripard@kernel.org \
--cc=rdunlap@infradead.org \
--cc=simona@ffwll.ch \
--cc=siqueira@igalia.com \
--cc=skhan@linuxfoundation.org \
--cc=sunpeng.li@amd.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 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.