Skip to contentSkip to conversation

drm/imagination: move update_logtype() into ifdef section

PATCH Applied Arnd Bergmann 2 participants 2 messages Dec 4, 2023 – Dec 6, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/imagination: move update_logtype() into ifdef section

From: Arnd Bergmann <[email protected]>

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")
---
 drivers/gpu/drm/imagination/pvr_fw_trace.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/imagination/pvr_fw_trace.c +2 -2
index 87a42fb6ace6..8261fa4f7f83 100644
@@ -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;
Signature · 1 line
2.39.2
maintainer Applied
#1 lore raw

Re: (subset) [PATCH] drm/imagination: move update_logtype() into ifdef section

Quoted 8 lines · Arnd Bergmann

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