[08/37] drm/arcpgu: Add local 'fb' variables
diff mbox

Message ID 1479498793-31021-9-git-send-email-ville.syrjala@linux.intel.com
State New
Headers show

Commit Message

Ville Syrjälä Nov. 18, 2016, 7:52 p.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Add a local 'fb' variable to a few places to get rid of the
'crtc->primary->fb' stuff. Looks neater and helps me with my ppor
coccinelle skills later.

Cc: Alexey Brodkin <abrodkin@synopsys.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/arc/arcpgu_crtc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Alexey Brodkin Nov. 21, 2016, 3:30 p.m. UTC | #1
Hi Ville,

On Fri, 2016-11-18 at 21:52 +0200, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>

> 

> Add a local 'fb' variable to a few places to get rid of the

> 'crtc->primary->fb' stuff. Looks neater and helps me with my ppor

> coccinelle skills later.

> 

> Cc: Alexey Brodkin <abrodkin@synopsys.com>

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

> ---

>  drivers/gpu/drm/arc/arcpgu_crtc.c | 3 ++-

>  1 file changed, 2 insertions(+), 1 deletion(-)

> 

> diff --git a/drivers/gpu/drm/arc/arcpgu_crtc.c b/drivers/gpu/drm/arc/arcpgu_crtc.c

> index 7130b044b004..5c26c5f126a3 100644

> --- a/drivers/gpu/drm/arc/arcpgu_crtc.c

> +++ b/drivers/gpu/drm/arc/arcpgu_crtc.c

> @@ -35,7 +35,8 @@ static struct simplefb_format supported_formats[] = {

>  static void arc_pgu_set_pxl_fmt(struct drm_crtc *crtc)

>  {

>  	struct arcpgu_drm_private *arcpgu = crtc_to_arcpgu_priv(crtc);

> -	uint32_t pixel_format = crtc->primary->state->fb->pixel_format;

> +	const struct drm_framebuffer *fb = crtc->primary->state->fb;

> +	uint32_t pixel_format = fb->pixel_format;

>  	struct simplefb_format *format = NULL;

>  	int i;


Acked-by: Alexey Brodkin <abrodkin@synopsys.com>
Alexey Brodkin Nov. 23, 2016, 4 p.m. UTC | #2
Hi Ville,

On Fri, 2016-11-18 at 21:52 +0200, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>

> 

> Add a local 'fb' variable to a few places to get rid of the

> 'crtc->primary->fb' stuff. Looks neater and helps me with my ppor

> coccinelle skills later.

> 

> Cc: Alexey Brodkin <abrodkin@synopsys.com>

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

> ---

>  drivers/gpu/drm/arc/arcpgu_crtc.c | 3 ++-

>  1 file changed, 2 insertions(+), 1 deletion(-)

> 

> diff --git a/drivers/gpu/drm/arc/arcpgu_crtc.c b/drivers/gpu/drm/arc/arcpgu_crtc.c

> index 7130b044b004..5c26c5f126a3 100644

> --- a/drivers/gpu/drm/arc/arcpgu_crtc.c

> +++ b/drivers/gpu/drm/arc/arcpgu_crtc.c

> @@ -35,7 +35,8 @@ static struct simplefb_format supported_formats[] = {

>  static void arc_pgu_set_pxl_fmt(struct drm_crtc *crtc)

>  {

>  	struct arcpgu_drm_private *arcpgu = crtc_to_arcpgu_priv(crtc);

> -	uint32_t pixel_format = crtc->primary->state->fb->pixel_format;

> +	const struct drm_framebuffer *fb = crtc->primary->state->fb;

> +	uint32_t pixel_format = fb->pixel_format;

>  	struct simplefb_format *format = NULL;

>  	int i;


Acked-by: Alexey Brodkin <abrodkin@synopsys.com>

Patch
diff mbox

diff --git a/drivers/gpu/drm/arc/arcpgu_crtc.c b/drivers/gpu/drm/arc/arcpgu_crtc.c
index 7130b044b004..5c26c5f126a3 100644
--- a/drivers/gpu/drm/arc/arcpgu_crtc.c
+++ b/drivers/gpu/drm/arc/arcpgu_crtc.c
@@ -35,7 +35,8 @@  static struct simplefb_format supported_formats[] = {
 static void arc_pgu_set_pxl_fmt(struct drm_crtc *crtc)
 {
 	struct arcpgu_drm_private *arcpgu = crtc_to_arcpgu_priv(crtc);
-	uint32_t pixel_format = crtc->primary->state->fb->pixel_format;
+	const struct drm_framebuffer *fb = crtc->primary->state->fb;
+	uint32_t pixel_format = fb->pixel_format;
 	struct simplefb_format *format = NULL;
 	int i;