* [PATCH] mtd: rawnand: lpc32xx_mlc: fix irq handler prototype
@ 2024-02-13 10:00 Arnd Bergmann
2024-02-26 10:44 ` Miquel Raynal
0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2024-02-13 10:00 UTC (permalink / raw)
To: Miquel Raynal, Vladimir Zapolskiy
Cc: Arnd Bergmann, Richard Weinberger, Vignesh Raghavendra,
Nathan Chancellor, Nick Desaulniers, Bill Wendling, Justin Stitt,
Martin Blumenstingl, Roland Stigge, David Woodhouse, linux-mtd,
linux-arm-kernel, linux-kernel, llvm
From: Arnd Bergmann <arnd@arndb.de>
clang-16 warns about mismatched function prototypes:
drivers/mtd/nand/raw/lpc32xx_mlc.c:783:29: error: cast from 'irqreturn_t (*)(int, struct lpc32xx_nand_host *)' (aka 'enum irqreturn (*)(int, struct lpc32xx_nand_host *)') to 'irq_handler_t' (aka 'enum irqreturn (*)(int, void *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict]
Change the interrupt handler to the normal way of just passing
a void* pointer and converting it inside the function..
Fixes: 70f7cb78ec53 ("mtd: add LPC32xx MLC NAND driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/mtd/nand/raw/lpc32xx_mlc.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/nand/raw/lpc32xx_mlc.c b/drivers/mtd/nand/raw/lpc32xx_mlc.c
index 488fd452611a..677fcb03f9be 100644
--- a/drivers/mtd/nand/raw/lpc32xx_mlc.c
+++ b/drivers/mtd/nand/raw/lpc32xx_mlc.c
@@ -303,8 +303,9 @@ static int lpc32xx_nand_device_ready(struct nand_chip *nand_chip)
return 0;
}
-static irqreturn_t lpc3xxx_nand_irq(int irq, struct lpc32xx_nand_host *host)
+static irqreturn_t lpc3xxx_nand_irq(int irq, void *data)
{
+ struct lpc32xx_nand_host *host = data;
uint8_t sr;
/* Clear interrupt flag by reading status */
@@ -780,7 +781,7 @@ static int lpc32xx_nand_probe(struct platform_device *pdev)
goto release_dma_chan;
}
- if (request_irq(host->irq, (irq_handler_t)&lpc3xxx_nand_irq,
+ if (request_irq(host->irq, &lpc3xxx_nand_irq,
IRQF_TRIGGER_HIGH, DRV_NAME, host)) {
dev_err(&pdev->dev, "Error requesting NAND IRQ\n");
res = -ENXIO;
--
2.39.2
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mtd: rawnand: lpc32xx_mlc: fix irq handler prototype
2024-02-13 10:00 [PATCH] mtd: rawnand: lpc32xx_mlc: fix irq handler prototype Arnd Bergmann
@ 2024-02-26 10:44 ` Miquel Raynal
0 siblings, 0 replies; 2+ messages in thread
From: Miquel Raynal @ 2024-02-26 10:44 UTC (permalink / raw)
To: Arnd Bergmann, Miquel Raynal, Vladimir Zapolskiy
Cc: Arnd Bergmann, Richard Weinberger, Vignesh Raghavendra,
Nathan Chancellor, Nick Desaulniers, Bill Wendling, Justin Stitt,
Martin Blumenstingl, Roland Stigge, David Woodhouse, linux-mtd,
linux-arm-kernel, linux-kernel, llvm
On Tue, 2024-02-13 at 10:00:09 UTC, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> clang-16 warns about mismatched function prototypes:
>
> drivers/mtd/nand/raw/lpc32xx_mlc.c:783:29: error: cast from 'irqreturn_t (*)(int, struct lpc32xx_nand_host *)' (aka 'enum irqreturn (*)(int, struct lpc32xx_nand_host *)') to 'irq_handler_t' (aka 'enum irqreturn (*)(int, void *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict]
>
> Change the interrupt handler to the normal way of just passing
> a void* pointer and converting it inside the function..
>
> Fixes: 70f7cb78ec53 ("mtd: add LPC32xx MLC NAND driver")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.
Miquel
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-02-26 10:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-13 10:00 [PATCH] mtd: rawnand: lpc32xx_mlc: fix irq handler prototype Arnd Bergmann
2024-02-26 10:44 ` Miquel Raynal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).