dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/imagination: move update_logtype() into ifdef section
@ 2023-12-04  7:32 Arnd Bergmann
  2023-12-06 13:10 ` (subset) " Maxime Ripard
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2023-12-04  7:32 UTC (permalink / raw)
  To: Frank Binns, Donald Robson, Matt Coster, Maarten Lankhorst,
	Maxime Ripard, Sarah Walker
  Cc: Thomas Zimmermann, Arnd Bergmann, linux-kernel, dri-devel

From: Arnd Bergmann <arnd@arndb.de>

This function is only used when debugfs is enabled, and otherwise
causes a build warning:

drivers/gpu/drm/imagination/pvr_fw_trace.c:135:1: error: 'update_logtype' defined but not used [-Werror=unused-function]

Move the #ifdef check to include this function as well.

Fixes: cb56cd610866 ("drm/imagination: Add firmware trace to debugfs")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/gpu/drm/imagination/pvr_fw_trace.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/imagination/pvr_fw_trace.c b/drivers/gpu/drm/imagination/pvr_fw_trace.c
index 87a42fb6ace6..8261fa4f7f83 100644
--- a/drivers/gpu/drm/imagination/pvr_fw_trace.c
+++ b/drivers/gpu/drm/imagination/pvr_fw_trace.c
@@ -121,6 +121,8 @@ void pvr_fw_trace_fini(struct pvr_device *pvr_dev)
 	pvr_fw_object_unmap_and_destroy(fw_trace->tracebuf_ctrl_obj);
 }
 
+#if defined(CONFIG_DEBUG_FS)
+
 /**
  * update_logtype() - Send KCCB command to trigger FW to update logtype
  * @pvr_dev: Target PowerVR device
@@ -165,8 +167,6 @@ update_logtype(struct pvr_device *pvr_dev, u32 group_mask)
 	return err;
 }
 
-#if defined(CONFIG_DEBUG_FS)
-
 static int fw_trace_group_mask_show(struct seq_file *m, void *data)
 {
 	struct pvr_device *pvr_dev = m->private;
-- 
2.39.2


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

* Re: (subset) [PATCH] drm/imagination: move update_logtype() into ifdef section
  2023-12-04  7:32 [PATCH] drm/imagination: move update_logtype() into ifdef section Arnd Bergmann
@ 2023-12-06 13:10 ` Maxime Ripard
  0 siblings, 0 replies; 2+ messages in thread
From: Maxime Ripard @ 2023-12-06 13:10 UTC (permalink / raw)
  To: Frank Binns, Donald Robson, Matt Coster, Maarten Lankhorst,
	Sarah Walker, Arnd Bergmann
  Cc: Thomas Zimmermann, Arnd Bergmann, linux-kernel, dri-devel

On Mon, 04 Dec 2023 08:32:10 +0100, Arnd Bergmann wrote:
> This function is only used when debugfs is enabled, and otherwise
> causes a build warning:
> 
> drivers/gpu/drm/imagination/pvr_fw_trace.c:135:1: error: 'update_logtype' defined but not used [-Werror=unused-function]
> 
> Move the #ifdef check to include this function as well.
> 
> [...]

Applied to drm/drm-misc (drm-misc-next).

Thanks!
Maxime


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

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

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-04  7:32 [PATCH] drm/imagination: move update_logtype() into ifdef section Arnd Bergmann
2023-12-06 13:10 ` (subset) " Maxime Ripard

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).