[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <PAXPR04MB9186C1B9E2E46A0D9D16A62988679@PAXPR04MB9186.eurprd04.prod.outlook.com>
Date: Fri, 12 Aug 2022 16:01:00 +0000
From: Frank Li <frank.li@....com>
To: Dan Carpenter <dan.carpenter@...cle.com>,
Thomas Gleixner <tglx@...utronix.de>
CC: Marc Zyngier <maz@...nel.org>, Shawn Guo <shawnguo@...nel.org>,
Sascha Hauer <s.hauer@...gutronix.de>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Fabio Estevam <festevam@...il.com>,
dl-linux-imx <linux-imx@....com>, Jon Mason <jdmason@...zu.us>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>
Subject: RE: [EXT] [PATCH] irqchip: imx-mu-msi: fix platform_get_irq() error
checking
> -----Original Message-----
> From: Dan Carpenter <dan.carpenter@...cle.com>
> Sent: Friday, August 12, 2022 1:23 AM
> To: Thomas Gleixner <tglx@...utronix.de>; Frank Li <frank.li@....com>
> Cc: Marc Zyngier <maz@...nel.org>; Shawn Guo <shawnguo@...nel.org>;
> Sascha Hauer <s.hauer@...gutronix.de>; Pengutronix Kernel Team
> <kernel@...gutronix.de>; Fabio Estevam <festevam@...il.com>; dl-linux-
> imx <linux-imx@....com>; Jon Mason <jdmason@...zu.us>; linux-
> kernel@...r.kernel.org; kernel-janitors@...r.kernel.org
> Subject: [EXT] [PATCH] irqchip: imx-mu-msi: fix platform_get_irq() error
> checking
>
> Caution: EXT Email
>
> The platform_get_irq() function returns negative error codes on error
> so "gic_irq" needs to be signed to handle this correctly. Also change
> the "<= 0" check to "< 0" and preserve the error code as the
> documentation for platform_get_irq() shows.
>
> Fixes: 893ae515ff8d ("irqchip: imx mu worked as msi controller")
> Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
> ---
[Frank Li] Thanks, 893ae515ff8d should be under review. There are still some issue, which need be fixed.
I am working on these. I will squash your patch into my next version.
> drivers/irqchip/irq-imx-mu-msi.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/irqchip/irq-imx-mu-msi.c b/drivers/irqchip/irq-imx-mu-
> msi.c
> index f7193a6c1245..97f3cdab8f58 100644
> --- a/drivers/irqchip/irq-imx-mu-msi.c
> +++ b/drivers/irqchip/irq-imx-mu-msi.c
> @@ -80,7 +80,7 @@ struct imx_mu_msi {
> struct imx_mu_msir *msir;
> u32 irqs_num;
> unsigned long used;
> - u32 gic_irq;
> + int gic_irq;
> struct clk *clk;
> struct device *pd_a;
> struct device *pd_b;
> @@ -355,8 +355,8 @@ static int imx_mu_msi_probe(struct platform_device
> *pdev)
> msi_data->irqs_num = IMX_MU_CHANS;
>
> msi_data->gic_irq = platform_get_irq(msi_data->pdev, 0);
> - if (msi_data->gic_irq <= 0)
> - return -ENODEV;
> + if (msi_data->gic_irq < 0)
> + return msi_data->gic_irq;
>
> platform_set_drvdata(pdev, msi_data);
>
> --
> 2.35.1
Powered by blists - more mailing lists