diff mbox

[4/4] drm/i915: Remove redundant const from function return type

Message ID 1463059132-1720-5-git-send-email-imre.deak@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Imre Deak May 12, 2016, 1:18 p.m. UTC
Marking function return types as const is redundant, as these are
rvalues and as such constant by definition. Code checkers and GCC will
warn about this so remove the modifier.

Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 drivers/gpu/drm/i915/i915_debugfs.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

Ville Syrjälä May 12, 2016, 1:31 p.m. UTC | #1
On Thu, May 12, 2016 at 04:18:52PM +0300, Imre Deak wrote:
> Marking function return types as const is redundant, as these are
> rvalues and as such constant by definition. Code checkers and GCC will
> warn about this so remove the modifier.
> 
> Signed-off-by: Imre Deak <imre.deak@intel.com>

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> ---
>  drivers/gpu/drm/i915/i915_debugfs.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index 5e5b5cc..24f4105 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -89,17 +89,17 @@ static int i915_capabilities(struct seq_file *m, void *data)
>  	return 0;
>  }
>  
> -static const char get_active_flag(struct drm_i915_gem_object *obj)
> +static char get_active_flag(struct drm_i915_gem_object *obj)
>  {
>  	return obj->active ? '*' : ' ';
>  }
>  
> -static const char get_pin_flag(struct drm_i915_gem_object *obj)
> +static char get_pin_flag(struct drm_i915_gem_object *obj)
>  {
>  	return obj->pin_display ? 'p' : ' ';
>  }
>  
> -static const char get_tiling_flag(struct drm_i915_gem_object *obj)
> +static char get_tiling_flag(struct drm_i915_gem_object *obj)
>  {
>  	switch (obj->tiling_mode) {
>  	default:
> @@ -109,12 +109,12 @@ static const char get_tiling_flag(struct drm_i915_gem_object *obj)
>  	}
>  }
>  
> -static inline const char get_global_flag(struct drm_i915_gem_object *obj)
> +static char get_global_flag(struct drm_i915_gem_object *obj)
>  {
>  	return i915_gem_obj_to_ggtt(obj) ? 'g' : ' ';
>  }
>  
> -static inline const char get_pin_mapped_flag(struct drm_i915_gem_object *obj)
> +static char get_pin_mapped_flag(struct drm_i915_gem_object *obj)
>  {
>  	return obj->mapping ? 'M' : ' ';
>  }
> -- 
> 2.5.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 5e5b5cc..24f4105 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -89,17 +89,17 @@  static int i915_capabilities(struct seq_file *m, void *data)
 	return 0;
 }
 
-static const char get_active_flag(struct drm_i915_gem_object *obj)
+static char get_active_flag(struct drm_i915_gem_object *obj)
 {
 	return obj->active ? '*' : ' ';
 }
 
-static const char get_pin_flag(struct drm_i915_gem_object *obj)
+static char get_pin_flag(struct drm_i915_gem_object *obj)
 {
 	return obj->pin_display ? 'p' : ' ';
 }
 
-static const char get_tiling_flag(struct drm_i915_gem_object *obj)
+static char get_tiling_flag(struct drm_i915_gem_object *obj)
 {
 	switch (obj->tiling_mode) {
 	default:
@@ -109,12 +109,12 @@  static const char get_tiling_flag(struct drm_i915_gem_object *obj)
 	}
 }
 
-static inline const char get_global_flag(struct drm_i915_gem_object *obj)
+static char get_global_flag(struct drm_i915_gem_object *obj)
 {
 	return i915_gem_obj_to_ggtt(obj) ? 'g' : ' ';
 }
 
-static inline const char get_pin_mapped_flag(struct drm_i915_gem_object *obj)
+static char get_pin_mapped_flag(struct drm_i915_gem_object *obj)
 {
 	return obj->mapping ? 'M' : ' ';
 }