linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/armada: fix debugfs link error
@ 2019-06-28 10:33 Arnd Bergmann
  2019-06-28 12:48 ` Russell King - ARM Linux admin
  0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2019-06-28 10:33 UTC (permalink / raw)
  To: Russell King, David Airlie, Daniel Vetter
  Cc: Arnd Bergmann, Russell King, Sam Ravnborg, dri-devel, linux-kernel

Debugfs can be disabled at compile time, causing a link error
with the newly restructured code:

drivers/gpu/drm/armada/armada_crtc.o: In function `armada_drm_crtc_late_register':
armada_crtc.c:(.text+0x974): undefined reference to `armada_drm_crtc_debugfs_init'

Make the code into the debugfs init function conditional.

Fixes: 05ec8bd524ba ("drm/armada: redo CRTC debugfs files")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/gpu/drm/armada/armada_crtc.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/armada/armada_crtc.c b/drivers/gpu/drm/armada/armada_crtc.c
index e3a5964d8a65..03d3fd00fe00 100644
--- a/drivers/gpu/drm/armada/armada_crtc.c
+++ b/drivers/gpu/drm/armada/armada_crtc.c
@@ -773,7 +773,9 @@ static void armada_drm_crtc_destroy(struct drm_crtc *crtc)
 
 static int armada_drm_crtc_late_register(struct drm_crtc *crtc)
 {
-	armada_drm_crtc_debugfs_init(drm_to_armada_crtc(crtc));
+	if (IS_ENABLED(CONFIG_DEBUG_FS))
+		armada_drm_crtc_debugfs_init(drm_to_armada_crtc(crtc));
+
 	return 0;
 }
 
-- 
2.20.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/armada: fix debugfs link error
  2019-06-28 10:33 [PATCH] drm/armada: fix debugfs link error Arnd Bergmann
@ 2019-06-28 12:48 ` Russell King - ARM Linux admin
  2019-06-28 13:10   ` Arnd Bergmann
  0 siblings, 1 reply; 3+ messages in thread
From: Russell King - ARM Linux admin @ 2019-06-28 12:48 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: David Airlie, Daniel Vetter, Sam Ravnborg, dri-devel, linux-kernel

On Fri, Jun 28, 2019 at 12:33:40PM +0200, Arnd Bergmann wrote:
> Debugfs can be disabled at compile time, causing a link error
> with the newly restructured code:
> 
> drivers/gpu/drm/armada/armada_crtc.o: In function `armada_drm_crtc_late_register':
> armada_crtc.c:(.text+0x974): undefined reference to `armada_drm_crtc_debugfs_init'
> 
> Make the code into the debugfs init function conditional.

Thanks Arnd, mind if I roll this into the original commit?

> Fixes: 05ec8bd524ba ("drm/armada: redo CRTC debugfs files")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/gpu/drm/armada/armada_crtc.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/armada/armada_crtc.c b/drivers/gpu/drm/armada/armada_crtc.c
> index e3a5964d8a65..03d3fd00fe00 100644
> --- a/drivers/gpu/drm/armada/armada_crtc.c
> +++ b/drivers/gpu/drm/armada/armada_crtc.c
> @@ -773,7 +773,9 @@ static void armada_drm_crtc_destroy(struct drm_crtc *crtc)
>  
>  static int armada_drm_crtc_late_register(struct drm_crtc *crtc)
>  {
> -	armada_drm_crtc_debugfs_init(drm_to_armada_crtc(crtc));
> +	if (IS_ENABLED(CONFIG_DEBUG_FS))
> +		armada_drm_crtc_debugfs_init(drm_to_armada_crtc(crtc));
> +
>  	return 0;
>  }
>  
> -- 
> 2.20.0
> 
> 

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/armada: fix debugfs link error
  2019-06-28 12:48 ` Russell King - ARM Linux admin
@ 2019-06-28 13:10   ` Arnd Bergmann
  0 siblings, 0 replies; 3+ messages in thread
From: Arnd Bergmann @ 2019-06-28 13:10 UTC (permalink / raw)
  To: Russell King - ARM Linux admin
  Cc: David Airlie, Daniel Vetter, Sam Ravnborg, dri-devel,
	Linux Kernel Mailing List

On Fri, Jun 28, 2019 at 2:48 PM Russell King - ARM Linux admin
<linux@armlinux.org.uk> wrote:
>
> On Fri, Jun 28, 2019 at 12:33:40PM +0200, Arnd Bergmann wrote:
> > Debugfs can be disabled at compile time, causing a link error
> > with the newly restructured code:
> >
> > drivers/gpu/drm/armada/armada_crtc.o: In function `armada_drm_crtc_late_register':
> > armada_crtc.c:(.text+0x974): undefined reference to `armada_drm_crtc_debugfs_init'
> >
> > Make the code into the debugfs init function conditional.
>
> Thanks Arnd, mind if I roll this into the original commit?

That would be best, please do so.

      Arnd

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-06-28 13:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-28 10:33 [PATCH] drm/armada: fix debugfs link error Arnd Bergmann
2019-06-28 12:48 ` Russell King - ARM Linux admin
2019-06-28 13:10   ` Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).