From patchwork Tue Feb 13 10:00:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 200348 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:bc8a:b0:106:860b:bbdd with SMTP id dn10csp445135dyb; Tue, 13 Feb 2024 02:28:12 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVIni0HxXHi9FzxQPY5BusSNQU4hwkMGvP8ko+ct/7oO8cVEKTeRhayjJU9H0qTMuTE8DBTxBRbTVSk9RrV+u92fmU27A== X-Google-Smtp-Source: AGHT+IG6RcXm42UjcCPO82jLcvKPDXQe3FSwNTXQxQKYrN6CYyzAA/yFAUjPilN57fWPDyryg4gu X-Received: by 2002:a17:90a:744b:b0:296:207b:c917 with SMTP id o11-20020a17090a744b00b00296207bc917mr5760314pjk.23.1707820092731; Tue, 13 Feb 2024 02:28:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707820092; cv=pass; d=google.com; s=arc-20160816; b=gjqfC1MN5V+oGWOC30pXIoAY6F5x0NDlRYVjOG3Z70vemRAlqC740TULoEU5zhBBIf UVKCcJAqGf+JRyeehrbTnZFJZw5r6g+S/SmAp1pDib6OlLHe7ZJPfLB9ULdTQm7uqilf UwhJerSGvWvCMfjXbcT2fKePeUfnnbGpRbLI7E2qD7g0NcGV8WuVa/K9bNnP4CkphfcF Ph1XWKwE/fcZHL8BeUrBs37RAdEx55VKDMr3MDLDvEJ5eXQfGz6XxEsmqyzrIq5z9gF2 ulnMgf0i3P/INaRyGik9qTPxG+zGRAwSlw91un+y2lyCZAauKbC4o2wrHoDzT7fIHajz ZRTA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=oIDLI3pS9+9efCDo020zHNOr09bs/yhDlITOcQvdzFo=; fh=BCi+eT38dTgXVptvNClMw0X9UUsheIOqQWhY9uzDpW0=; b=wDoje3sj0NY5bAxpTv0XCrMQtAS9lwiIsKN+fDIH6Q0lBGkxmmpM8LVl1Y72mBwutv VcM3PiIz7zWSVwh8pJvTYlUaV5YxFG/s1XmKnO75l16yfum1ggrkWwJROI3jSGN5Qj1h 2AexDohgmNgKBxiawIumc9M3j7yN6pY0AQhan3nJcmxzYpYQz13AZJBkhPG3K642gWXL NxkVF5/qG4rlLyL2OMRrZH1DpFQ4an41PYo+yxqwV5yp5Z+tCRXtCNHUYJp0rVA3boWS OMNOYJalxz5ojePn4lauSagkunzU+SsEn9r0qozNb47uEFTFNJO7Ui4rnFSRokNxM7Kw 28RQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Czb4jvH3; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-63298-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63298-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCUOJQJ6ip7DWoEyEc3h+4esIJ8Rk48qo3rr1yuq0Gjm9i63SKe+4rukSjjfYRbwqtdPrjCi4LxlfPB6RzVJiJ+1GJwFNg== Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id cz7-20020a17090ad44700b00297040c5cf5si1797611pjb.55.2024.02.13.02.28.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 02:28:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-63298-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Czb4jvH3; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-63298-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63298-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id B430BB24765 for ; Tue, 13 Feb 2024 10:04:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5708C37711; Tue, 13 Feb 2024 10:01:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Czb4jvH3" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AC23F37152; Tue, 13 Feb 2024 10:01:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707818515; cv=none; b=VSX2WmivFhPV5hL2ET3PyJWgzIwKttyjzMoPCvGSPiRE64nllGms11eHDhO9V8Joyc6lJwPnV4RwvCvt55i/YZwvEtHn3+kUiFkmPP93Czd631dKi1J3AZGjPVzv9g/8Cn5qqk7SxG6lPlTaENhSQsmOXuOLTVOOUMVMyAOTkRQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707818515; c=relaxed/simple; bh=UU+zpA7I6z15NuI2JwEPZ/xh+eLMAyrqwwsqp31LEJg=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=gO0thIpzbGuqxH0YGeZoLGtpmVCKi30BlMapNiQcIU8nL1nVyUF4lgLODoQG3JrAcWeza4ydj6Nzg7O3LnEvCGBD7Ah/QeHBxrD3mVnEOsYgn1y6qBKPuVXGMNmVJqnssQSeOtPgfb8fv3lOMeKGeXM1XVQq7batcayPFgkNGHA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Czb4jvH3; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id CBAECC433F1; Tue, 13 Feb 2024 10:01:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707818515; bh=UU+zpA7I6z15NuI2JwEPZ/xh+eLMAyrqwwsqp31LEJg=; h=From:To:Cc:Subject:Date:From; b=Czb4jvH3IBvNqc4VVgfDnGhlWAHmrbg0er9XeuGRTRJyBYbX1aLruGawaJ/efSjbN hvx3wypXmh45CQpK34csnhnhCrGdyiVZ5watoCo/kn1e8vUUhAPsI3NPdZqkhsqPFR 8LjDk5B483FVmf6LNZ3ctHxF2AwjQ6F4cgKbjl1YUdRG1KKMLi2rHQQFpxbv/lK121 qZUlVKOoNld+fAIHMdg1qe/44wJjux8c1gsbpy6uIVATHgdLsb8aIDVSext6PzV/rB A/JqmINItFaOMmStnFRpOTMhI+s5xGAvrZUaZ5g6Alg0yCBFdWEjiwqnqj/hJSYd18 SfSeF0dZ3x38Q== From: Arnd Bergmann 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@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Subject: [PATCH] mtd: rawnand: lpc32xx_mlc: fix irq handler prototype Date: Tue, 13 Feb 2024 11:00:09 +0100 Message-Id: <20240213100146.455811-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790779161357549544 X-GMAIL-MSGID: 1790779161357549544 From: Arnd Bergmann 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 --- 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;