Re: [PATCH v2 14/17] drm/i915: have *_debugfs_init() functions return void.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 10 Mar 2020, Wambui Karuga <wambui.karugax@xxxxxxxxx> wrote:
> Since commit 987d65d01356 (drm: debugfs: make
> drm_debugfs_create_files() never fail), drm_debugfs_create_files() never
> fails and should return void. Therefore, remove its use as the
> return value of debugfs_init() functions and have the functions return
> void.
>
> v2: convert intel_display_debugfs_register() stub to return void too.
>
> Signed-off-by: Wambui Karuga <wambui.karugax@xxxxxxxxx>

Reviewed-by: Jani Nikula <jani.nikula@xxxxxxxxx>


> ---
>  drivers/gpu/drm/i915/display/intel_display_debugfs.c | 8 ++++----
>  drivers/gpu/drm/i915/display/intel_display_debugfs.h | 4 ++--
>  drivers/gpu/drm/i915/i915_debugfs.c                  | 8 ++++----
>  drivers/gpu/drm/i915/i915_debugfs.h                  | 4 ++--
>  4 files changed, 12 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display_debugfs.c b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> index 1e6eb7f2f72d..424f4e52f783 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> @@ -1927,7 +1927,7 @@ static const struct {
>  	{"i915_edp_psr_debug", &i915_edp_psr_debug_fops},
>  };
>  
> -int intel_display_debugfs_register(struct drm_i915_private *i915)
> +void intel_display_debugfs_register(struct drm_i915_private *i915)
>  {
>  	struct drm_minor *minor = i915->drm.primary;
>  	int i;
> @@ -1940,9 +1940,9 @@ int intel_display_debugfs_register(struct drm_i915_private *i915)
>  				    intel_display_debugfs_files[i].fops);
>  	}
>  
> -	return drm_debugfs_create_files(intel_display_debugfs_list,
> -					ARRAY_SIZE(intel_display_debugfs_list),
> -					minor->debugfs_root, minor);
> +	drm_debugfs_create_files(intel_display_debugfs_list,
> +				 ARRAY_SIZE(intel_display_debugfs_list),
> +				 minor->debugfs_root, minor);
>  }
>  
>  static int i915_panel_show(struct seq_file *m, void *data)
> diff --git a/drivers/gpu/drm/i915/display/intel_display_debugfs.h b/drivers/gpu/drm/i915/display/intel_display_debugfs.h
> index a3bea1ce04c2..c922c1745bfe 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_debugfs.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_debugfs.h
> @@ -10,10 +10,10 @@ struct drm_connector;
>  struct drm_i915_private;
>  
>  #ifdef CONFIG_DEBUG_FS
> -int intel_display_debugfs_register(struct drm_i915_private *i915);
> +void intel_display_debugfs_register(struct drm_i915_private *i915);
>  int intel_connector_debugfs_add(struct drm_connector *connector);
>  #else
> -static inline int intel_display_debugfs_register(struct drm_i915_private *i915) { return 0; }
> +static inline void intel_display_debugfs_register(struct drm_i915_private *i915) {}
>  static inline int intel_connector_debugfs_add(struct drm_connector *connector) { return 0; }
>  #endif
>  
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index 8f2525e4ce0f..de313199c714 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -2392,7 +2392,7 @@ static const struct i915_debugfs_files {
>  	{"i915_guc_log_relay", &i915_guc_log_relay_fops},
>  };
>  
> -int i915_debugfs_register(struct drm_i915_private *dev_priv)
> +void i915_debugfs_register(struct drm_i915_private *dev_priv)
>  {
>  	struct drm_minor *minor = dev_priv->drm.primary;
>  	int i;
> @@ -2409,7 +2409,7 @@ int i915_debugfs_register(struct drm_i915_private *dev_priv)
>  				    i915_debugfs_files[i].fops);
>  	}
>  
> -	return drm_debugfs_create_files(i915_debugfs_list,
> -					I915_DEBUGFS_ENTRIES,
> -					minor->debugfs_root, minor);
> +	drm_debugfs_create_files(i915_debugfs_list,
> +				 I915_DEBUGFS_ENTRIES,
> +				 minor->debugfs_root, minor);
>  }
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.h b/drivers/gpu/drm/i915/i915_debugfs.h
> index 6da39c76ab5e..1de2736f1248 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.h
> +++ b/drivers/gpu/drm/i915/i915_debugfs.h
> @@ -12,10 +12,10 @@ struct drm_i915_private;
>  struct seq_file;
>  
>  #ifdef CONFIG_DEBUG_FS
> -int i915_debugfs_register(struct drm_i915_private *dev_priv);
> +void i915_debugfs_register(struct drm_i915_private *dev_priv);
>  void i915_debugfs_describe_obj(struct seq_file *m, struct drm_i915_gem_object *obj);
>  #else
> -static inline int i915_debugfs_register(struct drm_i915_private *dev_priv) { return 0; }
> +static inline void i915_debugfs_register(struct drm_i915_private *dev_priv) {}
>  static inline void i915_debugfs_describe_obj(struct seq_file *m, struct drm_i915_gem_object *obj) {}
>  #endif

-- 
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux