Skip to content

Commit 347b828

Browse files
arndbmiquelraynal
authored andcommitted
mtd: rawnand: lpc32xx_mlc: fix irq handler prototype
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: 70f7cb7 ("mtd: add LPC32xx MLC NAND driver") Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Miquel Raynal <[email protected]> Link: https://lore.kernel.org/linux-mtd/[email protected]
1 parent e395036 commit 347b828

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/mtd/nand/raw/lpc32xx_mlc.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,8 +303,9 @@ static int lpc32xx_nand_device_ready(struct nand_chip *nand_chip)
303303
return 0;
304304
}
305305

306-
static irqreturn_t lpc3xxx_nand_irq(int irq, struct lpc32xx_nand_host *host)
306+
static irqreturn_t lpc3xxx_nand_irq(int irq, void *data)
307307
{
308+
struct lpc32xx_nand_host *host = data;
308309
uint8_t sr;
309310

310311
/* Clear interrupt flag by reading status */
@@ -780,7 +781,7 @@ static int lpc32xx_nand_probe(struct platform_device *pdev)
780781
goto release_dma_chan;
781782
}
782783

783-
if (request_irq(host->irq, (irq_handler_t)&lpc3xxx_nand_irq,
784+
if (request_irq(host->irq, &lpc3xxx_nand_irq,
784785
IRQF_TRIGGER_HIGH, DRV_NAME, host)) {
785786
dev_err(&pdev->dev, "Error requesting NAND IRQ\n");
786787
res = -ENXIO;

0 commit comments

Comments
 (0)