All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/komeda: Fix a signedness bug
@ 2019-01-21 13:59 ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2019-01-21 13:59 UTC (permalink / raw)
  To: James (Qian) Wang; +Cc: David Airlie, Liviu Dudau, kernel-janitors, dri-devel

The mdev->irq value comes from platform_get_irq() so it can't be more
than INT_MAX and if it's unsigned then it breaks the error handling in
komeda_parse_dt().

Fixes: 29e56aec911d ("drm/komeda: Add DT parsing")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 drivers/gpu/drm/arm/display/komeda/komeda_dev.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_dev.h b/drivers/gpu/drm/arm/display/komeda/komeda_dev.h
index a0bf7050037a..a52da6180c69 100644
--- a/drivers/gpu/drm/arm/display/komeda/komeda_dev.h
+++ b/drivers/gpu/drm/arm/display/komeda/komeda_dev.h
@@ -82,7 +82,7 @@ struct komeda_dev {
 	struct clk *mclk;
 
 	/** @irq: irq number */
-	u32 irq;
+	int irq;
 
 	int n_pipelines;
 	struct komeda_pipeline *pipelines[KOMEDA_MAX_PIPELINES];
-- 
2.17.1

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

* [PATCH] drm/komeda: Fix a signedness bug
@ 2019-01-21 13:59 ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2019-01-21 13:59 UTC (permalink / raw)
  To: James (Qian) Wang; +Cc: David Airlie, Liviu Dudau, kernel-janitors, dri-devel

The mdev->irq value comes from platform_get_irq() so it can't be more
than INT_MAX and if it's unsigned then it breaks the error handling in
komeda_parse_dt().

Fixes: 29e56aec911d ("drm/komeda: Add DT parsing")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 drivers/gpu/drm/arm/display/komeda/komeda_dev.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_dev.h b/drivers/gpu/drm/arm/display/komeda/komeda_dev.h
index a0bf7050037a..a52da6180c69 100644
--- a/drivers/gpu/drm/arm/display/komeda/komeda_dev.h
+++ b/drivers/gpu/drm/arm/display/komeda/komeda_dev.h
@@ -82,7 +82,7 @@ struct komeda_dev {
 	struct clk *mclk;
 
 	/** @irq: irq number */
-	u32 irq;
+	int irq;
 
 	int n_pipelines;
 	struct komeda_pipeline *pipelines[KOMEDA_MAX_PIPELINES];
-- 
2.17.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: drm/komeda: Fix a signedness bug
  2019-01-21 13:59 ` Dan Carpenter
@ 2019-01-22 10:00   ` james qian wang (Arm Technology China)
  -1 siblings, 0 replies; 4+ messages in thread
From: james qian wang (Arm Technology China) @ 2019-01-22 10:00 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: David Airlie, kernel-janitors, Liviu Dudau, dri-devel

On Mon, Jan 21, 2019 at 04:59:52PM +0300, Dan Carpenter wrote:
> The mdev->irq value comes from platform_get_irq() so it can't be more
> than INT_MAX and if it's unsigned then it breaks the error handling in
> komeda_parse_dt().
>
> Fixes: 29e56aec911d ("drm/komeda: Add DT parsing")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
>  drivers/gpu/drm/arm/display/komeda/komeda_dev.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_dev.h b/drivers/gpu/drm/arm/display/komeda/komeda_dev.h
> index a0bf7050037a..a52da6180c69 100644
> --- a/drivers/gpu/drm/arm/display/komeda/komeda_dev.h
> +++ b/drivers/gpu/drm/arm/display/komeda/komeda_dev.h
> @@ -82,7 +82,7 @@ struct komeda_dev {
>  struct clk *mclk;
>
>  /** @irq: irq number */
> -u32 irq;
> +int irq;
>

Hi Dan:

    Thank you.

    Liviu and I discussed this problem, and we decided to fix it by

    Remove IRQ parsing from initial series:
    https://patchwork.freedesktop.org/patch/277409/

    And add it back when add the fully IRQ handling:
    https://patchwork.freedesktop.org/patch/279491/

>  int n_pipelines;
>  struct komeda_pipeline *pipelines[KOMEDA_MAX_PIPELINES];
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

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

* Re: drm/komeda: Fix a signedness bug
@ 2019-01-22 10:00   ` james qian wang (Arm Technology China)
  0 siblings, 0 replies; 4+ messages in thread
From: james qian wang (Arm Technology China) @ 2019-01-22 10:00 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: David Airlie, kernel-janitors, Liviu Dudau, dri-devel

On Mon, Jan 21, 2019 at 04:59:52PM +0300, Dan Carpenter wrote:
> The mdev->irq value comes from platform_get_irq() so it can't be more
> than INT_MAX and if it's unsigned then it breaks the error handling in
> komeda_parse_dt().
>
> Fixes: 29e56aec911d ("drm/komeda: Add DT parsing")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
>  drivers/gpu/drm/arm/display/komeda/komeda_dev.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_dev.h b/drivers/gpu/drm/arm/display/komeda/komeda_dev.h
> index a0bf7050037a..a52da6180c69 100644
> --- a/drivers/gpu/drm/arm/display/komeda/komeda_dev.h
> +++ b/drivers/gpu/drm/arm/display/komeda/komeda_dev.h
> @@ -82,7 +82,7 @@ struct komeda_dev {
>  struct clk *mclk;
>
>  /** @irq: irq number */
> -u32 irq;
> +int irq;
>

Hi Dan:

    Thank you.

    Liviu and I discussed this problem, and we decided to fix it by

    Remove IRQ parsing from initial series:
    https://patchwork.freedesktop.org/patch/277409/

    And add it back when add the fully IRQ handling:
    https://patchwork.freedesktop.org/patch/279491/

>  int n_pipelines;
>  struct komeda_pipeline *pipelines[KOMEDA_MAX_PIPELINES];
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
_______________________________________________
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:[~2019-01-22 10:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-21 13:59 [PATCH] drm/komeda: Fix a signedness bug Dan Carpenter
2019-01-21 13:59 ` Dan Carpenter
2019-01-22 10:00 ` james qian wang (Arm Technology China)
2019-01-22 10:00   ` james qian wang (Arm Technology China)

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.