diff mbox series

drm/i915: Switch the order of function parameters

Message ID 20181026195342.16828-1-dhinakaran.pandiyan@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915: Switch the order of function parameters | expand

Commit Message

Dhinakaran Pandiyan Oct. 26, 2018, 7:53 p.m. UTC
intel_fb_pitch_limit() has the parameters pixel_format and fb_modifier
switched in their positions. The parameters are however used correctly,
but change the order for consistency.

Also use kernel data types for both parameters.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Ville Syrjälä Oct. 29, 2018, 2:18 p.m. UTC | #1
On Fri, Oct 26, 2018 at 12:53:42PM -0700, Dhinakaran Pandiyan wrote:
> intel_fb_pitch_limit() has the parameters pixel_format and fb_modifier
> switched in their positions. The parameters are however used correctly,
> but change the order for consistency.
> 
> Also use kernel data types for both parameters.
> 
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>

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

> ---
>  drivers/gpu/drm/i915/intel_display.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index fe045abb6472..e7521664a724 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -14346,7 +14346,7 @@ static const struct drm_framebuffer_funcs intel_fb_funcs = {
>  
>  static
>  u32 intel_fb_pitch_limit(struct drm_i915_private *dev_priv,
> -			 uint64_t fb_modifier, uint32_t pixel_format)
> +			 u32 pixel_format, u64 fb_modifier)
>  {
>  	struct intel_crtc *crtc;
>  	struct intel_plane *plane;
> @@ -14446,8 +14446,8 @@ static int intel_framebuffer_init(struct intel_framebuffer *intel_fb,
>  		goto err;
>  	}
>  
> -	pitch_limit = intel_fb_pitch_limit(dev_priv, mode_cmd->modifier[0],
> -					   mode_cmd->pixel_format);
> +	pitch_limit = intel_fb_pitch_limit(dev_priv, mode_cmd->pixel_format,
> +					   mode_cmd->modifier[0]);
>  	if (mode_cmd->pitches[0] > pitch_limit) {
>  		DRM_DEBUG_KMS("%s pitch (%u) must be at most %d\n",
>  			      mode_cmd->modifier[0] != DRM_FORMAT_MOD_LINEAR ?
> -- 
> 2.14.1
Dhinakaran Pandiyan Oct. 29, 2018, 7:50 p.m. UTC | #2
On Mon, 2018-10-29 at 16:18 +0200, Ville Syrjälä wrote:
> On Fri, Oct 26, 2018 at 12:53:42PM -0700, Dhinakaran Pandiyan wrote:
> > intel_fb_pitch_limit() has the parameters pixel_format and
> > fb_modifier
> > switched in their positions. The parameters are however used
> > correctly,
> > but change the order for consistency.
> > 
> > Also use kernel data types for both parameters.
> > 
> > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> 
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Thanks, pushed this to -queued.


-DK
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index fe045abb6472..e7521664a724 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -14346,7 +14346,7 @@  static const struct drm_framebuffer_funcs intel_fb_funcs = {
 
 static
 u32 intel_fb_pitch_limit(struct drm_i915_private *dev_priv,
-			 uint64_t fb_modifier, uint32_t pixel_format)
+			 u32 pixel_format, u64 fb_modifier)
 {
 	struct intel_crtc *crtc;
 	struct intel_plane *plane;
@@ -14446,8 +14446,8 @@  static int intel_framebuffer_init(struct intel_framebuffer *intel_fb,
 		goto err;
 	}
 
-	pitch_limit = intel_fb_pitch_limit(dev_priv, mode_cmd->modifier[0],
-					   mode_cmd->pixel_format);
+	pitch_limit = intel_fb_pitch_limit(dev_priv, mode_cmd->pixel_format,
+					   mode_cmd->modifier[0]);
 	if (mode_cmd->pitches[0] > pitch_limit) {
 		DRM_DEBUG_KMS("%s pitch (%u) must be at most %d\n",
 			      mode_cmd->modifier[0] != DRM_FORMAT_MOD_LINEAR ?