public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Damien Lespiau <damien.lespiau@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 03/10] drm/i915/skl: Rename a local variable to fit in 80 chars
Date: Tue, 12 May 2015 19:20:25 +0300	[thread overview]
Message-ID: <20150512162025.GI18908@intel.com> (raw)
In-Reply-To: <1431443602-22886-4-git-send-email-damien.lespiau@intel.com>

On Tue, May 12, 2015 at 04:13:15PM +0100, Damien Lespiau wrote:
> No reason to not follow the 80 chars rule, renaming the local variable
> makes it easy.

Or you could just kill the pointless local variable from all of these
functions.

> 
> Cc: Chandra Konduru <chandra.konduru@intel.com>
> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_display.c | 26 +++++++++++++-------------
>  1 file changed, 13 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index c6419e8..e2b01d9 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -2953,17 +2953,17 @@ void skl_detach_scalers(struct intel_crtc *intel_crtc)
>  
>  u32 skl_plane_ctl_format(uint32_t pixel_format)
>  {
> -	u32 plane_ctl_format = 0;
> +	u32 format = 0;
>  
>  	switch (pixel_format) {
>  	case DRM_FORMAT_RGB565:
> -		plane_ctl_format = PLANE_CTL_FORMAT_RGB_565;
> +		format = PLANE_CTL_FORMAT_RGB_565;
>  		break;
>  	case DRM_FORMAT_XBGR8888:
> -		plane_ctl_format = PLANE_CTL_FORMAT_XRGB_8888 | PLANE_CTL_ORDER_RGBX;
> +		format = PLANE_CTL_FORMAT_XRGB_8888 | PLANE_CTL_ORDER_RGBX;
>  		break;
>  	case DRM_FORMAT_XRGB8888:
> -		plane_ctl_format = PLANE_CTL_FORMAT_XRGB_8888;
> +		format = PLANE_CTL_FORMAT_XRGB_8888;
>  		break;
>  	/*
>  	 * XXX: For ARBG/ABGR formats we default to expecting scanout buffers
> @@ -2971,36 +2971,36 @@ u32 skl_plane_ctl_format(uint32_t pixel_format)
>  	 * DRM_FORMAT) for user-space to configure that.
>  	 */
>  	case DRM_FORMAT_ABGR8888:
> -		plane_ctl_format = PLANE_CTL_FORMAT_XRGB_8888 | PLANE_CTL_ORDER_RGBX |
> +		format = PLANE_CTL_FORMAT_XRGB_8888 | PLANE_CTL_ORDER_RGBX |
>  			PLANE_CTL_ALPHA_SW_PREMULTIPLY;
>  		break;
>  	case DRM_FORMAT_ARGB8888:
> -		plane_ctl_format = PLANE_CTL_FORMAT_XRGB_8888 |
> +		format = PLANE_CTL_FORMAT_XRGB_8888 |
>  			PLANE_CTL_ALPHA_SW_PREMULTIPLY;
>  		break;
>  	case DRM_FORMAT_XRGB2101010:
> -		plane_ctl_format = PLANE_CTL_FORMAT_XRGB_2101010;
> +		format = PLANE_CTL_FORMAT_XRGB_2101010;
>  		break;
>  	case DRM_FORMAT_XBGR2101010:
> -		plane_ctl_format = PLANE_CTL_ORDER_RGBX | PLANE_CTL_FORMAT_XRGB_2101010;
> +		format = PLANE_CTL_ORDER_RGBX | PLANE_CTL_FORMAT_XRGB_2101010;
>  		break;
>  	case DRM_FORMAT_YUYV:
> -		plane_ctl_format = PLANE_CTL_FORMAT_YUV422 | PLANE_CTL_YUV422_YUYV;
> +		format = PLANE_CTL_FORMAT_YUV422 | PLANE_CTL_YUV422_YUYV;
>  		break;
>  	case DRM_FORMAT_YVYU:
> -		plane_ctl_format = PLANE_CTL_FORMAT_YUV422 | PLANE_CTL_YUV422_YVYU;
> +		format = PLANE_CTL_FORMAT_YUV422 | PLANE_CTL_YUV422_YVYU;
>  		break;
>  	case DRM_FORMAT_UYVY:
> -		plane_ctl_format = PLANE_CTL_FORMAT_YUV422 | PLANE_CTL_YUV422_UYVY;
> +		format = PLANE_CTL_FORMAT_YUV422 | PLANE_CTL_YUV422_UYVY;
>  		break;
>  	case DRM_FORMAT_VYUY:
> -		plane_ctl_format = PLANE_CTL_FORMAT_YUV422 | PLANE_CTL_YUV422_VYUY;
> +		format = PLANE_CTL_FORMAT_YUV422 | PLANE_CTL_YUV422_VYUY;
>  		break;
>  	default:
>  		BUG();
>  	}
>  
> -	return plane_ctl_format;
> +	return format;
>  }
>  
>  u32 skl_plane_ctl_tiling(uint64_t fb_modifier)
> -- 
> 2.1.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-05-12 16:20 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-12 15:13 [PATCH 00/10] Expose the same formats for SKL primary/sprite planes Damien Lespiau
2015-05-12 15:13 ` [PATCH 01/10] drm/i915/skl: Leave a new line between variable declarations and code Damien Lespiau
2015-05-14  5:19   ` Konduru, Chandra
2015-05-12 15:13 ` [PATCH 02/10] drm/i915/skl: Add a new line before return Damien Lespiau
2015-05-14  5:20   ` Konduru, Chandra
2015-05-12 15:13 ` [PATCH 03/10] drm/i915/skl: Rename a local variable to fit in 80 chars Damien Lespiau
2015-05-12 16:20   ` Ville Syrjälä [this message]
2015-05-14  5:20   ` Konduru, Chandra
2015-05-12 15:13 ` [PATCH 04/10] drm/i915/skl: Replace BUG() by MISSING_CASE() in skl_plane_ctl_format() Damien Lespiau
2015-05-14  5:24   ` Konduru, Chandra
2015-05-12 15:13 ` [PATCH 05/10] drm/i915/skl: Support the advertized index format Damien Lespiau
2015-05-14  5:24   ` Konduru, Chandra
2015-05-12 15:13 ` [PATCH 06/10] drm/i915: Don't use the intel_ prefix for gen-specific data Damien Lespiau
2015-05-12 16:04   ` Daniel Vetter
2015-05-12 16:09     ` Daniel Vetter
2015-05-12 15:13 ` [PATCH 07/10] drm/i915/skl: Don't advertize ARGB2101010 and ABGR2101010 Damien Lespiau
2015-05-12 16:13   ` Daniel Vetter
2015-05-12 16:18     ` Damien Lespiau
2015-05-12 16:48       ` Daniel Vetter
2015-05-12 16:29   ` Ville Syrjälä
2015-05-12 15:13 ` [PATCH 08/10] drm/i915/skl: Make primary and sprite plane advertize the same formats Damien Lespiau
2015-05-12 16:14   ` Daniel Vetter
2015-05-12 16:33   ` Ville Syrjälä
2015-05-12 15:13 ` [PATCH 09/10] drm/i915/skl: Factor skl_plane_get_formats() Damien Lespiau
2015-05-12 15:13 ` [PATCH 10/10] drm/i915: Make the sprite formats const Damien Lespiau
2015-05-12 16:14   ` Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150512162025.GI18908@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=damien.lespiau@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox