public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Andi Shyti <andi.shyti@linux.intel.com>, Arnd Bergmann <arnd@kernel.org>
Cc: Jani Nikula <jani.nikula@linux.intel.com>,
	Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
	Rodrigo Vivi <rodrigo.vivi@intel.com>,
	David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
	Arnd Bergmann <arnd@arndb.de>,
	Matt Roper <matthew.d.roper@intel.com>,
	Lucas De Marchi <lucas.demarchi@intel.com>,
	Imre Deak <imre.deak@intel.com>,
	Alan Previn <alan.previn.teres.alexis@intel.com>,
	Anshuman Gupta <anshuman.gupta@intel.com>,
	intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/i915: make i915_drm_client_fdinfo() reference conditional again
Date: Fri, 16 Jun 2023 12:17:50 +0100	[thread overview]
Message-ID: <ef849277-10ef-90db-fd6c-3646599e32ba@linux.intel.com> (raw)
In-Reply-To: <ZIw2kdx9+DCmUZUV@ashyti-mobl2.lan>


On 16/06/2023 11:16, Andi Shyti wrote:
> Hi Arnd,
> 
> On Fri, Jun 16, 2023 at 11:31:47AM +0200, Arnd Bergmann wrote:
>> From: Arnd Bergmann <arnd@arndb.de>
>>
>> The function is only defined if CONFIG_PROC_FS is enabled:
>>
>> ld.lld: error: undefined symbol: i915_drm_client_fdinfo
>>>>> referenced by i915_driver.c
>>>>>                drivers/gpu/drm/i915/i915_driver.o:(i915_drm_driver) in archive vmlinux.a
>>
>> Use the PTR_IF() helper to make the reference NULL otherwise.
>>
>> Fixes: e894b724c316d ("drm/i915: Use the fdinfo helper")
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>> ---
>>   drivers/gpu/drm/i915/i915_driver.c     | 2 +-
>>   drivers/gpu/drm/i915/i915_drm_client.h | 2 --
>>   2 files changed, 1 insertion(+), 3 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c
>> index 75cbc43b326dd..0ad0c5885ec27 100644
>> --- a/drivers/gpu/drm/i915/i915_driver.c
>> +++ b/drivers/gpu/drm/i915/i915_driver.c
>> @@ -1816,7 +1816,7 @@ static const struct drm_driver i915_drm_driver = {
>>   	.open = i915_driver_open,
>>   	.lastclose = i915_driver_lastclose,
>>   	.postclose = i915_driver_postclose,
>> -	.show_fdinfo = i915_drm_client_fdinfo,
>> +	.show_fdinfo = PTR_IF(IS_ENABLED(CONFIG_PROC_FS), i915_drm_client_fdinfo),
>>   
>>   	.prime_handle_to_fd = drm_gem_prime_handle_to_fd,
>>   	.prime_fd_to_handle = drm_gem_prime_fd_to_handle,
>> diff --git a/drivers/gpu/drm/i915/i915_drm_client.h b/drivers/gpu/drm/i915/i915_drm_client.h
>> index 4c18b99e10a4e..67816c912bca1 100644
>> --- a/drivers/gpu/drm/i915/i915_drm_client.h
>> +++ b/drivers/gpu/drm/i915/i915_drm_client.h
>> @@ -47,8 +47,6 @@ static inline void i915_drm_client_put(struct i915_drm_client *client)
>>   
>>   struct i915_drm_client *i915_drm_client_alloc(void);
>>   
>> -#ifdef CONFIG_PROC_FS
>>   void i915_drm_client_fdinfo(struct drm_printer *p, struct drm_file *file);
>> -#endif
> 
> nice! This is becoming the new trend now.
> 
> Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>

Thanks for the fix and review! (And I got to learn about existence of 
PTR_IF too.)

Andi will you merge once green or should I?

Regards,

Tvrtko

  reply	other threads:[~2023-06-16 11:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-16  9:31 [PATCH] drm/i915: make i915_drm_client_fdinfo() reference conditional again Arnd Bergmann
2023-06-16 10:16 ` Andi Shyti
2023-06-16 11:17   ` Tvrtko Ursulin [this message]
2023-06-19  9:04     ` Andi Shyti
2023-06-19  9:11     ` Tvrtko Ursulin
2023-06-17  0:44 ` Randy Dunlap

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=ef849277-10ef-90db-fd6c-3646599e32ba@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=airlied@gmail.com \
    --cc=alan.previn.teres.alexis@intel.com \
    --cc=andi.shyti@linux.intel.com \
    --cc=anshuman.gupta@intel.com \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lucas.demarchi@intel.com \
    --cc=matthew.d.roper@intel.com \
    --cc=rodrigo.vivi@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