Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9fc05d79 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Sasha Levin
Browse files

mtd: rawnand: lpc32xx_mlc: fix irq handler prototype



[ Upstream commit 347b828882e6334690e7003ce5e2fe5f233dc508 ]

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


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 8d27d1b1
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -316,8 +316,9 @@ static int lpc32xx_nand_device_ready(struct mtd_info *mtd)
	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 */
@@ -790,7 +791,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;