diff mbox series

drm/arm: make hdlcd_debugfs_init return 0

Message ID 20200218172821.18378-2-wambui.karugax@gmail.com (mailing list archive)
State New, archived
Headers show
Series drm/arm: make hdlcd_debugfs_init return 0 | expand

Commit Message

Wambui Karuga Feb. 18, 2020, 5:28 p.m. UTC
As drm_debugfs_create_files should return void, remove its use as a
return value in hdlcd_debugfs_init and have the latter function return 0
directly.

Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com>
---
 drivers/gpu/drm/arm/hdlcd_drv.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Liviu Dudau Feb. 24, 2020, 1:59 p.m. UTC | #1
Hi,

On Tue, Feb 18, 2020 at 08:28:13PM +0300, Wambui Karuga wrote:
> As drm_debugfs_create_files should return void, remove its use as a
> return value in hdlcd_debugfs_init and have the latter function return 0
> directly.
> 
> Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com>
> ---
>  drivers/gpu/drm/arm/hdlcd_drv.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/arm/hdlcd_drv.c b/drivers/gpu/drm/arm/hdlcd_drv.c
> index 2e053815b54a..bd0ad6f46a97 100644
> --- a/drivers/gpu/drm/arm/hdlcd_drv.c
> +++ b/drivers/gpu/drm/arm/hdlcd_drv.c
> @@ -226,8 +226,10 @@ static struct drm_info_list hdlcd_debugfs_list[] = {
>  
>  static int hdlcd_debugfs_init(struct drm_minor *minor)
>  {
> -	return drm_debugfs_create_files(hdlcd_debugfs_list,
> -		ARRAY_SIZE(hdlcd_debugfs_list),	minor->debugfs_root, minor);
> +	drm_debugfs_create_files(hdlcd_debugfs_list,
> +				 ARRAY_SIZE(hdlcd_debugfs_list),
> +				 minor->debugfs_root, minor);
> +	return 0;
>  }
>  #endif
>
> -- 
> 2.25.0
>

Thanks for your patch! I had to go into the ML and find out the series where this
patch belongs to and seen that you have already received some feedback, but I think
a summary is worth:

- you should look if it is possible to make .debugfs_init hook return void, it would
  simplify the cleanup in the drivers by not having to return 0.
- you should put in each driver patch a note that drm_debugfs_create_files() always
  returns 0 since 987d65d01356 (drm: debugfs: make drm_debugfs_create_files() never fail)
  so that people don't have to hunt in the git history for clues.
- Make all the changes into a series

With that, you can have my Acked-by: Liviu Dudau <liviu.dudau@arm.com>

Best regards,
Liviu
diff mbox series

Patch

diff --git a/drivers/gpu/drm/arm/hdlcd_drv.c b/drivers/gpu/drm/arm/hdlcd_drv.c
index 2e053815b54a..bd0ad6f46a97 100644
--- a/drivers/gpu/drm/arm/hdlcd_drv.c
+++ b/drivers/gpu/drm/arm/hdlcd_drv.c
@@ -226,8 +226,10 @@  static struct drm_info_list hdlcd_debugfs_list[] = {
 
 static int hdlcd_debugfs_init(struct drm_minor *minor)
 {
-	return drm_debugfs_create_files(hdlcd_debugfs_list,
-		ARRAY_SIZE(hdlcd_debugfs_list),	minor->debugfs_root, minor);
+	drm_debugfs_create_files(hdlcd_debugfs_list,
+				 ARRAY_SIZE(hdlcd_debugfs_list),
+				 minor->debugfs_root, minor);
+	return 0;
 }
 #endif