Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2949578rdb; Tue, 13 Feb 2024 02:07:57 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXisUm0oazEMPN9Mbvnzy/9PYuHmlx0a5IXFhfnxn3ITMRZrLzpATGi7blZfhyGBy/dXh/3kzH9A7Nf0zK5VSEklS8SdB06/p5ycXxHpA== X-Google-Smtp-Source: AGHT+IERdV9HdiytxgRR4gD8rwdO7nQnpwoUwonIYHjYIxdo2igWfLa4ygXDZ5z7vesr9wie/B5G X-Received: by 2002:a05:6a20:d38a:b0:19e:2d04:d783 with SMTP id iq10-20020a056a20d38a00b0019e2d04d783mr7114673pzb.4.1707818877637; Tue, 13 Feb 2024 02:07:57 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707818877; cv=pass; d=google.com; s=arc-20160816; b=rWkGPSLWxtxgkfz9e4Q7are8j6YCobHwMHsh50e14zDWwGwKk3NHoZDEu8kKf5GE9v yTYfxAyPw/X72zh130iGWhqcvltw/IXbQABEIINdLVaEHTaIyZWhBBG1rwgj+tL8nfe9 kC4rbAEEzTcMp0bBcKodwxpRnztwr5sEPCcP+LvLa1lSAc8M63c+FsGLnWc285YRiyTj vlyepvrf7A/S9CI1Uv1cy03GLzGenLYNjzEzb9RBxotYN8tk9XepsCfvD7FrvbSv+sSL BRL0EB7IkRlESqHVQCR/ggtlGf5gH9yWMUB8W6kaLJ6NMdW0x9aBDJKqNZsVCg2Uh1wx rhbw== 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=qRFuaV8xyFU8mSWjQjZzpaPo8vF/plTtblpl/7h6xx4=; fh=tRzdGWzHeT8PDc22rmR1n4ePy13NuvB5F4ltpOb/HLE=; b=ZihmohJf78n74Sp/dpDlzhr2kRq/WJbdkaEi4jaHZUKxjSEQRBEhNCbrpiDGwaOK7W 3e8iAk8VbtmcFoaXy37N9oYQueHiH4HmC+rDvK3kjglHfE6KwQrvbjttrvsyUL4P7aYc Vl+PRIWWa955GP2XokOJTx/SnEzihBgnRqJaTZ822WUD/PKpir1NO5TLj+F5u1fk+5xv P7TzEbDalBuNtVOraKItzzSGui6amz1fbxcdENGya8xd3YlsM9uJDfgdY39d3Jwh9A0o qnakg+fQFrgIAhbXmTGMzanbgMbZCGbBcpvfRAsKhIGXbAMHbZm+OUJRp47S1J8hOFES GYMw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="KjfvP/Nh"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-63275-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63275-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCWyeJej1k/gJ9dz3wQwz75Y1md7RU2HGdz132FxNNIagfs2x/Hzqfl6uB/EJ+wsCn+XzLazZgluuilx+rYAzaxYuGLrZq4//piJgu//rA== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id j20-20020a056a00175400b006e08197a06asi6366880pfc.8.2024.02.13.02.07.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 02:07:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-63275-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="KjfvP/Nh"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-63275-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63275-linux.lists.archive=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 sv.mirrors.kernel.org (Postfix) with ESMTPS id F1BBA28BF2E for ; Tue, 13 Feb 2024 09:56:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 95178224F9; Tue, 13 Feb 2024 09:54:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="KjfvP/Nh" 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 B83212BB03; Tue, 13 Feb 2024 09:54:57 +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=1707818097; cv=none; b=bQmxIkjLG2dW88EYKZSbnVRoNMNfpo4XTJzMCn1RD0br8rV89EnsEhU72hXMdKcSMOzNxNccu495JXbE8OGRtvn8DmDNEiHMfNq+HqfzoCa3TiKcRZb9/t4qhbpi55Qp1uePJr0ZcYOj1dhfFzFrz082pNS7AQZUu3Yz+0Xj/eE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707818097; c=relaxed/simple; bh=4De3RyTU7r+pUzJUl0tRw/D7nVV5tAv3p6T8Js04G/c=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=M7ZP1qENUFqRSCZY2SD+QrecC7P9D9vNiQvnHnsCah46ti4LofGH8RM46MrmTFUN+HdOPV5Nklx3imFEEx1rOWrTn344ZtThE6YFS5tHj6XHB47CnOaPcYcFH4UTljR/xDeirTrrrn35SnugVJSRtIrIRyePHN14FtgiQB9ypqY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=KjfvP/Nh; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id DE5ECC433F1; Tue, 13 Feb 2024 09:54:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707818097; bh=4De3RyTU7r+pUzJUl0tRw/D7nVV5tAv3p6T8Js04G/c=; h=From:To:Cc:Subject:Date:From; b=KjfvP/NhWaO4TPXRscwaIdNAvjfmjfNzJMINOI7zjyj3rzCsHcNLiJAjs9E1aQlki rg5MogLLMywQQ6U8N5g5KnHPpdcPsaG5aSK9fCZj9ailMSDaA0CfYz6O+mcuYx6llh NRqe7zADwWnvYKUKveVnKLnbsRcKeKNWS8MO7YTAkM23IgzIslBoEQAWbCJFUH0gKy EgUXlpYiCl3r07CXddQfD6IE72/vLJYB7QtQ9/4bNCTl0ySYNy9OtRS2DRlefwxGDz xe4N/R7iLBxVzUHT+P8vescQb4PKfT4Mu2wKba29P4ghiPRgQadUSP9dKojAAVUbmg Srkt73YXHuY0g== From: Arnd Bergmann To: Mauro Carvalho Chehab , Nathan Chancellor Cc: Arnd Bergmann , Nick Desaulniers , Bill Wendling , Justin Stitt , Andy Shevchenko , Linus Walleij , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Subject: [PATCH] media: sta2x11: fix irq handler cast Date: Tue, 13 Feb 2024 10:54:47 +0100 Message-Id: <20240213095451.454142-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 Content-Transfer-Encoding: 8bit From: Arnd Bergmann clang-16 warns about casting incompatible function pointers: drivers/media/pci/sta2x11/sta2x11_vip.c:1057:6: error: cast from 'irqreturn_t (*)(int, struct sta2x11_vip *)' (aka 'enum irqreturn (*)(int, struct sta2x11_vip *)') to 'irq_handler_t' (aka 'enum irqreturn (*)(int, void *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict] Change the prototype of the irq handler to the regular version with a local variable to adjust the argument type. Signed-off-by: Arnd Bergmann --- drivers/media/pci/sta2x11/sta2x11_vip.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/media/pci/sta2x11/sta2x11_vip.c b/drivers/media/pci/sta2x11/sta2x11_vip.c index e4cf9d63e926..9def7d08c809 100644 --- a/drivers/media/pci/sta2x11/sta2x11_vip.c +++ b/drivers/media/pci/sta2x11/sta2x11_vip.c @@ -767,8 +767,9 @@ static const struct video_device video_dev_template = { * * IRQ_HANDLED, interrupt done. */ -static irqreturn_t vip_irq(int irq, struct sta2x11_vip *vip) +static irqreturn_t vip_irq(int irq, void *data) { + struct sta2x11_vip *vip = data; unsigned int status; status = reg_read(vip, DVP_ITS); @@ -1053,9 +1054,7 @@ static int sta2x11_vip_init_one(struct pci_dev *pdev, spin_lock_init(&vip->slock); - ret = request_irq(pdev->irq, - (irq_handler_t) vip_irq, - IRQF_SHARED, KBUILD_MODNAME, vip); + ret = request_irq(pdev->irq, vip_irq, IRQF_SHARED, KBUILD_MODNAME, vip); if (ret) { dev_err(&pdev->dev, "request_irq failed\n"); ret = -ENODEV; -- 2.39.2