* [PATCH] drm/i915: make i915_drm_client_fdinfo() reference conditional again
@ 2023-06-16 9:31 Arnd Bergmann
2023-06-16 10:16 ` Andi Shyti
2023-06-17 0:44 ` Randy Dunlap
0 siblings, 2 replies; 6+ messages in thread
From: Arnd Bergmann @ 2023-06-16 9:31 UTC (permalink / raw)
To: Jani Nikula, Joonas Lahtinen, Rodrigo Vivi, Tvrtko Ursulin,
David Airlie, Daniel Vetter, Andi Shyti
Cc: Arnd Bergmann, Matt Roper, Lucas De Marchi, Imre Deak,
Alan Previn, Anshuman Gupta, intel-gfx, dri-devel, linux-kernel
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
#endif /* !__I915_DRM_CLIENT_H__ */
--
2.39.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/i915: make i915_drm_client_fdinfo() reference conditional again
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
2023-06-17 0:44 ` Randy Dunlap
1 sibling, 1 reply; 6+ messages in thread
From: Andi Shyti @ 2023-06-16 10:16 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Jani Nikula, Joonas Lahtinen, Rodrigo Vivi, Tvrtko Ursulin,
David Airlie, Daniel Vetter, Andi Shyti, Arnd Bergmann,
Matt Roper, Lucas De Marchi, Imre Deak, Alan Previn,
Anshuman Gupta, intel-gfx, dri-devel, linux-kernel
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>
Andi
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/i915: make i915_drm_client_fdinfo() reference conditional again
2023-06-16 10:16 ` Andi Shyti
@ 2023-06-16 11:17 ` Tvrtko Ursulin
2023-06-19 9:04 ` Andi Shyti
2023-06-19 9:11 ` Tvrtko Ursulin
0 siblings, 2 replies; 6+ messages in thread
From: Tvrtko Ursulin @ 2023-06-16 11:17 UTC (permalink / raw)
To: Andi Shyti, Arnd Bergmann
Cc: Jani Nikula, Joonas Lahtinen, Rodrigo Vivi, David Airlie,
Daniel Vetter, Arnd Bergmann, Matt Roper, Lucas De Marchi,
Imre Deak, Alan Previn, Anshuman Gupta, intel-gfx, dri-devel,
linux-kernel
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/i915: make i915_drm_client_fdinfo() reference conditional again
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-17 0:44 ` Randy Dunlap
1 sibling, 0 replies; 6+ messages in thread
From: Randy Dunlap @ 2023-06-17 0:44 UTC (permalink / raw)
To: Arnd Bergmann, Jani Nikula, Joonas Lahtinen, Rodrigo Vivi,
Tvrtko Ursulin, David Airlie, Daniel Vetter, Andi Shyti
Cc: Arnd Bergmann, Matt Roper, Lucas De Marchi, Imre Deak,
Alan Previn, Anshuman Gupta, intel-gfx, dri-devel, linux-kernel
On 6/16/23 02:31, 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>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
Thanks.
> ---
> 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
>
> #endif /* !__I915_DRM_CLIENT_H__ */
--
~Randy
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/i915: make i915_drm_client_fdinfo() reference conditional again
2023-06-16 11:17 ` Tvrtko Ursulin
@ 2023-06-19 9:04 ` Andi Shyti
2023-06-19 9:11 ` Tvrtko Ursulin
1 sibling, 0 replies; 6+ messages in thread
From: Andi Shyti @ 2023-06-19 9:04 UTC (permalink / raw)
To: Tvrtko Ursulin
Cc: Andi Shyti, Arnd Bergmann, Jani Nikula, Joonas Lahtinen,
Rodrigo Vivi, David Airlie, Daniel Vetter, Arnd Bergmann,
Matt Roper, Lucas De Marchi, Imre Deak, Alan Previn,
Anshuman Gupta, intel-gfx, dri-devel, linux-kernel
Hi Tvrtko,
On Fri, Jun 16, 2023 at 12:17:50PM +0100, Tvrtko Ursulin wrote:
>
> 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?
will do! Thanks!
Andi
> Regards,
>
> Tvrtko
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/i915: make i915_drm_client_fdinfo() reference conditional again
2023-06-16 11:17 ` Tvrtko Ursulin
2023-06-19 9:04 ` Andi Shyti
@ 2023-06-19 9:11 ` Tvrtko Ursulin
1 sibling, 0 replies; 6+ messages in thread
From: Tvrtko Ursulin @ 2023-06-19 9:11 UTC (permalink / raw)
To: Andi Shyti, Arnd Bergmann
Cc: Jani Nikula, Joonas Lahtinen, Rodrigo Vivi, David Airlie,
Daniel Vetter, Arnd Bergmann, Matt Roper, Lucas De Marchi,
Imre Deak, Alan Previn, Anshuman Gupta, intel-gfx, dri-devel,
linux-kernel
On 16/06/2023 12:17, Tvrtko Ursulin wrote:
>
> 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?
Pushed, thanks for the fixup and review!
Regards,
Tvrtko
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-06-19 9:12 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2023-06-19 9:04 ` Andi Shyti
2023-06-19 9:11 ` Tvrtko Ursulin
2023-06-17 0:44 ` Randy Dunlap
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox