Skip to contentSkip to conversation

drm/debugfs: Add inline to drm_debugfs_dev_init() to suppres -Wunused-function

PATCH Applied Arthur Grillo 3 participants 4 messages Sep 1, 2023 – Sep 8, 2023

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

PATCH 1/1 drm/debugfs: Add inline to drm_debugfs_dev_init() to suppres -Wunused-function

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

---
 include/drm/drm_drv.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/drm/drm_drv.h +1 -1
index 9850fe73b739..e2640dc64e08 100644
@@ -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,

Signature · 1 line
Arthur Grillo <[email protected]>
Reviewed-by on v1 1/1
#1 lore raw

Hi Arthur,

Quoted 7 lines · Arthur Grillo

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

Andi

Reviewed-by on v1 1/1
#2 lore raw
In reply to Arthur Grillo
Quoted 7 lines · Arthur Grillo

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

Best Regards,
- Maíra

Quoted 23 lines
---
  include/drm/drm_drv.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
include/drm/drm_drv.h +1 -2
index 9850fe73b739..e2640dc64e08 100644
@@ -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,

Applied
#3 lore raw
In reply to Arthur Grillo

Hi Arthur,

Quoted 7 lines · Arthur Grillo

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

Applied to drm-misc/drm-misc-next!

Thanks!
- Maíra

Quoted 23 lines
---
  include/drm/drm_drv.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
include/drm/drm_drv.h +1 -2
index 9850fe73b739..e2640dc64e08 100644
@@ -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,