All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
To: menglong8.dong@gmail.com, sebastian.reichel@collabora.com
Cc: airlied@linux.ie, daniel@ffwll.ch,
	laurent.pinchart@ideasonboard.com,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	Menglong Dong <dong.menglong@zte.com.cn>
Subject: Re: [PATCH v2] drm/omap: dsi: fix unreachable code in dsi_vc_send_short()
Date: Wed, 27 Jan 2021 16:23:24 +0200	[thread overview]
Message-ID: <65ce7efd-a7ae-5a47-9915-94964906e28b@ideasonboard.com> (raw)
In-Reply-To: <20210127015117.23267-1-dong.menglong@zte.com.cn>

On 27/01/2021 03:51, menglong8.dong@gmail.com wrote:
> From: Menglong Dong <dong.menglong@zte.com.cn>
> 
> The 'r' in dsi_vc_send_short() is of type 'unsigned int', so the
> 'r < 0' can't be true.
> 
> Fix this by introducing a 'err' of type 'int' insteaded.
> 
> Fixes: 1ed6253856cb ("drm/omap: dsi: switch dsi_vc_send_long/short to mipi_dsi_msg")
> 
> Signed-off-by: Menglong Dong <dong.menglong@zte.com.cn>
> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
> ---
> v2:
> - remove word wrap in 'Fixes' tag
> ---
>  drivers/gpu/drm/omapdrm/dss/dsi.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c
> index 8e11612f5fe1..febcc87ddfe1 100644
> --- a/drivers/gpu/drm/omapdrm/dss/dsi.c
> +++ b/drivers/gpu/drm/omapdrm/dss/dsi.c
> @@ -2149,11 +2149,12 @@ static int dsi_vc_send_short(struct dsi_data *dsi, int vc,
>  			     const struct mipi_dsi_msg *msg)
>  {
>  	struct mipi_dsi_packet pkt;
> +	int err;
>  	u32 r;
>  
> -	r = mipi_dsi_create_packet(&pkt, msg);
> -	if (r < 0)
> -		return r;
> +	err = mipi_dsi_create_packet(&pkt, msg);
> +	if (err)
> +		return err;
>  
>  	WARN_ON(!dsi_bus_is_locked(dsi));
>  

Thanks! I'll apply to drm-misc-next.

 Tomi

WARNING: multiple messages have this Message-ID (diff)
From: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
To: menglong8.dong@gmail.com, sebastian.reichel@collabora.com
Cc: Menglong Dong <dong.menglong@zte.com.cn>,
	airlied@linux.ie, linux-kernel@vger.kernel.org,
	dri-devel@lists.freedesktop.org,
	laurent.pinchart@ideasonboard.com
Subject: Re: [PATCH v2] drm/omap: dsi: fix unreachable code in dsi_vc_send_short()
Date: Wed, 27 Jan 2021 16:23:24 +0200	[thread overview]
Message-ID: <65ce7efd-a7ae-5a47-9915-94964906e28b@ideasonboard.com> (raw)
In-Reply-To: <20210127015117.23267-1-dong.menglong@zte.com.cn>

On 27/01/2021 03:51, menglong8.dong@gmail.com wrote:
> From: Menglong Dong <dong.menglong@zte.com.cn>
> 
> The 'r' in dsi_vc_send_short() is of type 'unsigned int', so the
> 'r < 0' can't be true.
> 
> Fix this by introducing a 'err' of type 'int' insteaded.
> 
> Fixes: 1ed6253856cb ("drm/omap: dsi: switch dsi_vc_send_long/short to mipi_dsi_msg")
> 
> Signed-off-by: Menglong Dong <dong.menglong@zte.com.cn>
> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
> ---
> v2:
> - remove word wrap in 'Fixes' tag
> ---
>  drivers/gpu/drm/omapdrm/dss/dsi.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c
> index 8e11612f5fe1..febcc87ddfe1 100644
> --- a/drivers/gpu/drm/omapdrm/dss/dsi.c
> +++ b/drivers/gpu/drm/omapdrm/dss/dsi.c
> @@ -2149,11 +2149,12 @@ static int dsi_vc_send_short(struct dsi_data *dsi, int vc,
>  			     const struct mipi_dsi_msg *msg)
>  {
>  	struct mipi_dsi_packet pkt;
> +	int err;
>  	u32 r;
>  
> -	r = mipi_dsi_create_packet(&pkt, msg);
> -	if (r < 0)
> -		return r;
> +	err = mipi_dsi_create_packet(&pkt, msg);
> +	if (err)
> +		return err;
>  
>  	WARN_ON(!dsi_bus_is_locked(dsi));
>  

Thanks! I'll apply to drm-misc-next.

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

  reply	other threads:[~2021-01-27 14:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-27  1:51 [PATCH v2] drm/omap: dsi: fix unreachable code in dsi_vc_send_short() menglong8.dong
2021-01-27  1:51 ` menglong8.dong
2021-01-27 14:23 ` Tomi Valkeinen [this message]
2021-01-27 14:23   ` Tomi Valkeinen

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=65ce7efd-a7ae-5a47-9915-94964906e28b@ideasonboard.com \
    --to=tomi.valkeinen@ideasonboard.com \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dong.menglong@zte.com.cn \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=menglong8.dong@gmail.com \
    --cc=sebastian.reichel@collabora.com \
    /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 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.