All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/panel: panasonic-vvx10f034n00: More return value fixes
@ 2018-01-17 21:37 Sean Paul
  2018-01-18 10:48 ` Philippe CORNU
  0 siblings, 1 reply; 3+ messages in thread
From: Sean Paul @ 2018-01-17 21:37 UTC (permalink / raw)
  To: dri-devel, philippe.cornu; +Cc: Thierry Reding

A couple more return value fixes which Philippe brought up during our
previous review.

Suggested-by: Philippe CORNU <philippe.cornu@st.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
---
 drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c | 17 +++++------------
 1 file changed, 5 insertions(+), 12 deletions(-)

diff --git a/drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c b/drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c
index 91dc5a6b14f9..74a806121f80 100644
--- a/drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c
+++ b/drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c
@@ -59,35 +59,28 @@ static inline struct wuxga_nt_panel *to_wuxga_nt_panel(struct drm_panel *panel)
 
 static int wuxga_nt_panel_on(struct wuxga_nt_panel *wuxga_nt)
 {
-	struct mipi_dsi_device *dsi = wuxga_nt->dsi;
-	int ret;
-
-	ret = mipi_dsi_turn_on_peripheral(dsi);
-	if (ret < 0)
-		return ret;
-
-	return 0;
+	return mipi_dsi_turn_on_peripheral(wuxga_nt->dsi);
 }
 
 static int wuxga_nt_panel_disable(struct drm_panel *panel)
 {
 	struct wuxga_nt_panel *wuxga_nt = to_wuxga_nt_panel(panel);
-	int ret;
+	int mipi_ret, bl_ret = 0;
 
 	if (!wuxga_nt->enabled)
 		return 0;
 
-	ret = mipi_dsi_shutdown_peripheral(wuxga_nt->dsi);
+	mipi_ret = mipi_dsi_shutdown_peripheral(wuxga_nt->dsi);
 
 	if (wuxga_nt->backlight) {
 		wuxga_nt->backlight->props.power = FB_BLANK_POWERDOWN;
 		wuxga_nt->backlight->props.state |= BL_CORE_FBBLANK;
-		backlight_update_status(wuxga_nt->backlight);
+		bl_ret = backlight_update_status(wuxga_nt->backlight);
 	}
 
 	wuxga_nt->enabled = false;
 
-	return ret;
+	return mipi_ret ? mipi_ret : bl_ret;
 }
 
 static int wuxga_nt_panel_unprepare(struct drm_panel *panel)
-- 
2.16.0.rc1.238.g530d649a79-goog

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/panel: panasonic-vvx10f034n00: More return value fixes
  2018-01-17 21:37 [PATCH] drm/panel: panasonic-vvx10f034n00: More return value fixes Sean Paul
@ 2018-01-18 10:48 ` Philippe CORNU
  2018-01-22 17:52   ` Sean Paul
  0 siblings, 1 reply; 3+ messages in thread
From: Philippe CORNU @ 2018-01-18 10:48 UTC (permalink / raw)
  To: Sean Paul, dri-devel; +Cc: Thierry Reding

Hi Sean,

Reviewed-by: Philippe Cornu <philippe.cornu@st.com>

(do you mean you write patches during meetings :o ... I never did that 
and I will not ;-)

Philippe :-)

On 01/17/2018 10:37 PM, Sean Paul wrote:
> A couple more return value fixes which Philippe brought up during our
> previous review.
> 
> Suggested-by: Philippe CORNU <philippe.cornu@st.com>
> Signed-off-by: Sean Paul <seanpaul@chromium.org>
> ---
>   drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c | 17 +++++------------
>   1 file changed, 5 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c b/drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c
> index 91dc5a6b14f9..74a806121f80 100644
> --- a/drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c
> +++ b/drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c
> @@ -59,35 +59,28 @@ static inline struct wuxga_nt_panel *to_wuxga_nt_panel(struct drm_panel *panel)
>   
>   static int wuxga_nt_panel_on(struct wuxga_nt_panel *wuxga_nt)
>   {
> -	struct mipi_dsi_device *dsi = wuxga_nt->dsi;
> -	int ret;
> -
> -	ret = mipi_dsi_turn_on_peripheral(dsi);
> -	if (ret < 0)
> -		return ret;
> -
> -	return 0;
> +	return mipi_dsi_turn_on_peripheral(wuxga_nt->dsi);
>   }
>   
>   static int wuxga_nt_panel_disable(struct drm_panel *panel)
>   {
>   	struct wuxga_nt_panel *wuxga_nt = to_wuxga_nt_panel(panel);
> -	int ret;
> +	int mipi_ret, bl_ret = 0;
>   
>   	if (!wuxga_nt->enabled)
>   		return 0;
>   
> -	ret = mipi_dsi_shutdown_peripheral(wuxga_nt->dsi);
> +	mipi_ret = mipi_dsi_shutdown_peripheral(wuxga_nt->dsi);
>   
>   	if (wuxga_nt->backlight) {
>   		wuxga_nt->backlight->props.power = FB_BLANK_POWERDOWN;
>   		wuxga_nt->backlight->props.state |= BL_CORE_FBBLANK;
> -		backlight_update_status(wuxga_nt->backlight);
> +		bl_ret = backlight_update_status(wuxga_nt->backlight);
>   	}
>   
>   	wuxga_nt->enabled = false;
>   
> -	return ret;
> +	return mipi_ret ? mipi_ret : bl_ret;
>   }
>   
>   static int wuxga_nt_panel_unprepare(struct drm_panel *panel)
> 
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/panel: panasonic-vvx10f034n00: More return value fixes
  2018-01-18 10:48 ` Philippe CORNU
@ 2018-01-22 17:52   ` Sean Paul
  0 siblings, 0 replies; 3+ messages in thread
From: Sean Paul @ 2018-01-22 17:52 UTC (permalink / raw)
  To: Philippe CORNU; +Cc: Thierry Reding, dri-devel

On Thu, Jan 18, 2018 at 10:48:52AM +0000, Philippe CORNU wrote:
> Hi Sean,
> 
> Reviewed-by: Philippe Cornu <philippe.cornu@st.com>
> 
> (do you mean you write patches during meetings :o ... I never did that 
> and I will not ;-)

Haha, only the boring ones ;)

Applied to -misc. Thanks for the suggestions and reviews!

Sean

> 
> Philippe :-)
> 
> On 01/17/2018 10:37 PM, Sean Paul wrote:
> > A couple more return value fixes which Philippe brought up during our
> > previous review.
> > 
> > Suggested-by: Philippe CORNU <philippe.cornu@st.com>
> > Signed-off-by: Sean Paul <seanpaul@chromium.org>
> > ---
> >   drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c | 17 +++++------------
> >   1 file changed, 5 insertions(+), 12 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c b/drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c
> > index 91dc5a6b14f9..74a806121f80 100644
> > --- a/drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c
> > +++ b/drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c
> > @@ -59,35 +59,28 @@ static inline struct wuxga_nt_panel *to_wuxga_nt_panel(struct drm_panel *panel)
> >   
> >   static int wuxga_nt_panel_on(struct wuxga_nt_panel *wuxga_nt)
> >   {
> > -	struct mipi_dsi_device *dsi = wuxga_nt->dsi;
> > -	int ret;
> > -
> > -	ret = mipi_dsi_turn_on_peripheral(dsi);
> > -	if (ret < 0)
> > -		return ret;
> > -
> > -	return 0;
> > +	return mipi_dsi_turn_on_peripheral(wuxga_nt->dsi);
> >   }
> >   
> >   static int wuxga_nt_panel_disable(struct drm_panel *panel)
> >   {
> >   	struct wuxga_nt_panel *wuxga_nt = to_wuxga_nt_panel(panel);
> > -	int ret;
> > +	int mipi_ret, bl_ret = 0;
> >   
> >   	if (!wuxga_nt->enabled)
> >   		return 0;
> >   
> > -	ret = mipi_dsi_shutdown_peripheral(wuxga_nt->dsi);
> > +	mipi_ret = mipi_dsi_shutdown_peripheral(wuxga_nt->dsi);
> >   
> >   	if (wuxga_nt->backlight) {
> >   		wuxga_nt->backlight->props.power = FB_BLANK_POWERDOWN;
> >   		wuxga_nt->backlight->props.state |= BL_CORE_FBBLANK;
> > -		backlight_update_status(wuxga_nt->backlight);
> > +		bl_ret = backlight_update_status(wuxga_nt->backlight);
> >   	}
> >   
> >   	wuxga_nt->enabled = false;
> >   
> > -	return ret;
> > +	return mipi_ret ? mipi_ret : bl_ret;
> >   }
> >   
> >   static int wuxga_nt_panel_unprepare(struct drm_panel *panel)
> > 

-- 
Sean Paul, Software Engineer, Google / Chromium OS
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-01-22 17:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-17 21:37 [PATCH] drm/panel: panasonic-vvx10f034n00: More return value fixes Sean Paul
2018-01-18 10:48 ` Philippe CORNU
2018-01-22 17:52   ` Sean Paul

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.