diff mbox series

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

Message ID 20230901-debugfs-fix-unused-function-warning-v1-1-161dd0902975@riseup.net (mailing list archive)
State New, archived
Headers show
Series drm/debugfs: Add inline to drm_debugfs_dev_init() to suppres -Wunused-function | expand

Commit Message

Arthur Grillo Sept. 1, 2023, 6:05 p.m. UTC
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(-)


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

Best regards,

Comments

Andi Shyti Sept. 2, 2023, 8:14 a.m. UTC | #1
Hi Arthur,

On Fri, Sep 01, 2023 at 03:05:50PM -0300, Arthur Grillo wrote:
> 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>

Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> 

Andi
Maíra Canal Sept. 4, 2023, 9:09 p.m. UTC | #2
On 9/1/23 15:05, Arthur Grillo wrote:
> 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>

Reviewed-by: Maíra Canal <mairacanal@riseup.net>

Best Regards,
- Maíra

> ---
>   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,
Maíra Canal Sept. 8, 2023, 8:45 p.m. UTC | #3
Hi Arthur,

On 9/1/23 15:05, Arthur Grillo wrote:
> 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>

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

Thanks!
- Maíra

> ---
>   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,
diff mbox series

Patch

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