mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drm/debugfs: Add inline to drm_debugfs_dev_init() to suppres -Wunused-function
@ 2023-09-01 18:05 Arthur Grillo
  2023-09-02  8:14 ` Andi Shyti
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Arthur Grillo @ 2023-09-01 18:05 UTC (permalink / raw)
  To: dri-devel, linux-kernel
  Cc: tales.aparecida, andrealmeid, mairacanal, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Daniel Vetter,
	Andi Shyti, kernel test robot, Arthur Grillo

When CONFIG_DEBUG_FS is not set -Wunused-function warnings appear,
make the static function inline to suppress that.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202309012114.T8Vlfaf8-lkp@intel.com/
Closes: https://lore.kernel.org/oe-kbuild-all/202309012131.FeakBzEj-lkp@intel.com/
Signed-off-by: Arthur Grillo <arthurgrillo@riseup.net>
---
 include/drm/drm_drv.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/drm/drm_drv.h b/include/drm/drm_drv.h
index 9850fe73b739..e2640dc64e08 100644
--- a/include/drm/drm_drv.h
+++ b/include/drm/drm_drv.h
@@ -584,7 +584,7 @@ static inline bool drm_firmware_drivers_only(void)
 #if defined(CONFIG_DEBUG_FS)
 void drm_debugfs_dev_init(struct drm_device *dev, struct dentry *root);
 #else
-static void drm_debugfs_dev_init(struct drm_device *dev, struct dentry *root)
+static inline void drm_debugfs_dev_init(struct drm_device *dev, struct dentry *root)
 {
 }
 #endif

---
base-commit: 8e455145d8f163aefa6b9cc29478e0a9f82276e6
change-id: 20230901-debugfs-fix-unused-function-warning-9ebbecbd6a5a

Best regards,
-- 
Arthur Grillo <arthurgrillo@riseup.net>


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

end of thread, other threads:[~2023-09-08 20:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-01 18:05 [PATCH] drm/debugfs: Add inline to drm_debugfs_dev_init() to suppres -Wunused-function Arthur Grillo
2023-09-02  8:14 ` Andi Shyti
2023-09-04 21:09 ` Maira Canal
2023-09-08 20:45 ` Maira Canal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®