Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: 70f7cb78ec53 ("mtd: add LPC32xx MLC NAND driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20240213100146.455811-1-arnd@kernel.org

authored by

Arnd Bergmann and committed by
Miquel Raynal
347b8288 e3950365

+3 -2
+3 -2
drivers/mtd/nand/raw/lpc32xx_mlc.c
··· 303 303 return 0; 304 304 } 305 305 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) 307 307 { 308 + struct lpc32xx_nand_host *host = data; 308 309 uint8_t sr; 309 310 310 311 /* Clear interrupt flag by reading status */ ··· 781 780 goto release_dma_chan; 782 781 } 783 782 784 - if (request_irq(host->irq, (irq_handler_t)&lpc3xxx_nand_irq, 783 + if (request_irq(host->irq, &lpc3xxx_nand_irq, 785 784 IRQF_TRIGGER_HIGH, DRV_NAME, host)) { 786 785 dev_err(&pdev->dev, "Error requesting NAND IRQ\n"); 787 786 res = -ENXIO;