All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/omap: dsi: fix unreachable code in dsi_vc_send_short()
@ 2021-01-26 13:55 ` menglong8.dong
  0 siblings, 0 replies; 4+ messages in thread
From: menglong8.dong @ 2021-01-26 13:55 UTC (permalink / raw)
  To: tomba
  Cc: airlied, daniel, sebastian.reichel, laurent.pinchart, dri-devel,
	linux-kernel, Menglong Dong

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' 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>
---
 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));
 
-- 
2.25.1


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

* [PATCH] drm/omap: dsi: fix unreachable code in dsi_vc_send_short()
@ 2021-01-26 13:55 ` menglong8.dong
  0 siblings, 0 replies; 4+ messages in thread
From: menglong8.dong @ 2021-01-26 13:55 UTC (permalink / raw)
  To: tomba
  Cc: Menglong Dong, airlied, linux-kernel, dri-devel,
	sebastian.reichel, laurent.pinchart

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' 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>
---
 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));
 
-- 
2.25.1

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

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

* Re: [PATCH] drm/omap: dsi: fix unreachable code in dsi_vc_send_short()
  2021-01-26 13:55 ` menglong8.dong
@ 2021-01-26 21:15   ` Sebastian Reichel
  -1 siblings, 0 replies; 4+ messages in thread
From: Sebastian Reichel @ 2021-01-26 21:15 UTC (permalink / raw)
  To: menglong8.dong
  Cc: tomba, airlied, daniel, laurent.pinchart, dri-devel,
	linux-kernel, Menglong Dong

[-- Attachment #1: Type: text/plain, Size: 1669 bytes --]

Hi,

On Tue, Jan 26, 2021 at 05:55:11AM -0800, 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' insteaded.
> 
> Fixes: 1ed6253856cb
> ("drm/omap: dsi: switch dsi_vc_send_long/short to mipi_dsi_msg")

Documentation/process/submitting-patches.rst:

If your patch fixes a bug in a specific commit, e.g. you found an
issue using ``git bisect``, please use the 'Fixes:' tag with the
first 12 characters of the SHA-1 ID, and the one line summary. Do
not split the tag across multiple lines, tags are exempt from the
"wrap at 75 columns" rule in order to simplify parsing scripts.

Otherwise:

Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>

-- Sebastian

> Signed-off-by: Menglong Dong <dong.menglong@zte.com.cn>
> ---
>  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));
>  
> -- 
> 2.25.1
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH] drm/omap: dsi: fix unreachable code in dsi_vc_send_short()
@ 2021-01-26 21:15   ` Sebastian Reichel
  0 siblings, 0 replies; 4+ messages in thread
From: Sebastian Reichel @ 2021-01-26 21:15 UTC (permalink / raw)
  To: menglong8.dong
  Cc: Menglong Dong, tomba, airlied, linux-kernel, dri-devel, laurent.pinchart


[-- Attachment #1.1: Type: text/plain, Size: 1669 bytes --]

Hi,

On Tue, Jan 26, 2021 at 05:55:11AM -0800, 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' insteaded.
> 
> Fixes: 1ed6253856cb
> ("drm/omap: dsi: switch dsi_vc_send_long/short to mipi_dsi_msg")

Documentation/process/submitting-patches.rst:

If your patch fixes a bug in a specific commit, e.g. you found an
issue using ``git bisect``, please use the 'Fixes:' tag with the
first 12 characters of the SHA-1 ID, and the one line summary. Do
not split the tag across multiple lines, tags are exempt from the
"wrap at 75 columns" rule in order to simplify parsing scripts.

Otherwise:

Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>

-- Sebastian

> Signed-off-by: Menglong Dong <dong.menglong@zte.com.cn>
> ---
>  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));
>  
> -- 
> 2.25.1
> 

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

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

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

end of thread, other threads:[~2021-01-27  8:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-26 13:55 [PATCH] drm/omap: dsi: fix unreachable code in dsi_vc_send_short() menglong8.dong
2021-01-26 13:55 ` menglong8.dong
2021-01-26 21:15 ` Sebastian Reichel
2021-01-26 21:15   ` Sebastian Reichel

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.