Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp1077616lqh; Fri, 29 Mar 2024 06:43:13 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWg9BCWB4yHMNZnLqoABRjavgBz2MPSonbWpsdit3i+RKaUHe+AG4fieihWO4b6uxbS3KYdSrC3dflP/1cwBSjVdqM38gK+JTTbT2Drxw== X-Google-Smtp-Source: AGHT+IGReCUpQfvp5a2CUqpOfgauuAmlYWo70BzJb5eo8PCIU2HQQnbQy+jMcDYvJc0Zid4cPzYA X-Received: by 2002:a17:906:4083:b0:a4d:f0c3:a9e9 with SMTP id u3-20020a170906408300b00a4df0c3a9e9mr1461478ejj.28.1711719793199; Fri, 29 Mar 2024 06:43:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711719793; cv=pass; d=google.com; s=arc-20160816; b=Y44/Mv6Pnja3JVi+8U1I2ZJ4kMNvixfH3MdwxPvOfJEZdgPOv5kDXHI5Z8Hw0RYQKf N8CL+hCfoOyPBMTc4rw5n5eevKmBLYPAwJsrbs01x9Iql77z43/xA0RQVyfwK6n5ofQb juOIpIcZeOmJK33nNw8Zhkcaea3WN5OMzyOXpun3+eb1eGL3M11h26KcgVAK+cZmT7kM 1cIgOdR0F4wmDA9P9xrhQzpfKva6B+m2dMWuMtvrv86GFAF9pgzVvkgIqAJzcqCwDvBD XPemRxycjBihbgNl9sOjgPVwtvHIlo2COcH2z2gjrMq6Bm6AfbHpqH655XyYADOdJcDS lddw== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=zSIUVpTGC7qb5mqF8tdsfdYpMvAUitN+h8PmvqK7ZbM=; fh=xvxAYWimIR6dlltQ8hAfOQziL8KT2j7uOJ/uaeH25a8=; b=GAPq7nhUw6tzK2+drNI9Jy4XVQFbLaNazmAZbFp8LXGLvhvIHgtFXRO/X+TMyyrMqu w5lFxz6vmmO3D2FpXeLaQgvL8YTe0wS+JuEfrvgHlsyz/kyEdqTxVyPEUxcFVv1YdhWn tTXajhkKpu2xtKwaPvam+l3gULd9erRC4HyrEPeYAAI6WUkSmAFTavd33u3ktFT4o4Ig XmoqBoIqta80UHzpT3UdovHyIY0RcpcqZyfWEinqXKUWfj5pf5b4ua3xn2UnBmP3twiG vZz5st3hE6mshUyAuNERWt3BTe+aWZuadrrJfyolrO5GFWj7l9bMLtOEsA+ShQfQYOm0 LOwA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LpthkKxL; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-124753-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-124753-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id n4-20020a170906840400b00a464fcaa08asi1741439ejx.975.2024.03.29.06.43.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Mar 2024 06:43:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-124753-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LpthkKxL; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-124753-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-124753-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 4A96D1F22DAB for ; Fri, 29 Mar 2024 13:42:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C6D9F17E3D8; Fri, 29 Mar 2024 12:41:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="LpthkKxL" 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 E120D17E3C1; Fri, 29 Mar 2024 12:41:20 +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=1711716081; cv=none; b=l37nyVoRZG5eWSj4sA7KVJlDn2+q46b7tssVNwDZjEsWqhKud1OYHox2K8LgsxEWJIZZhi998haZyrRKPTtTbAWoGYgCZdJs+N0Bp03es0wyNkzeP3WRE8XV0ba66jE1joy4nY4J60gxjYxteI7ii28L3zmo1AbYMCwCufAPisA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711716081; c=relaxed/simple; bh=g4G966sqyGAo0Tea4bdG14ocnuCnsoCEQwCF6LPvnEs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AygvTBvs/PgLtu2lGFzacifQ01Co9RtpygHpCxrn4eG7c8lJUsOE9C6HobeaRqsqbW/X639/NnKXDWbfigfha6+L0TXT27ft/b2GA5+ViU2NK26ZTMg01ZmwG4Oa5hMQVZ0OaY+HO1dfKsroj2yTGg14OwaqNWWVFJ2Q7kNax0I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=LpthkKxL; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 769E8C433C7; Fri, 29 Mar 2024 12:41:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711716080; bh=g4G966sqyGAo0Tea4bdG14ocnuCnsoCEQwCF6LPvnEs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LpthkKxLOvVpnc4K/7vaeUzbYN70oq9d9k1NVj8uLOMgthvBV7ISvwJJsoz6rkawd 467ontqzAywfQ+YMrQ9kQpFqtCCR77oVsoCWcK/5tgvXkDLk4jQZgZDIxVNc8DHay3 kdUV0+hG35gX7DwVkwP2ZBJiTe/txyW+8Rc7k5nIEx4X5/UwEPFTacKc/j1zyY7RDv QRnzIZqj/BfxK35DFxFi2YJWPLLVfRmUBPbVFzy4rNJ+lMzWqCCMPi8jymZVAxP4Ym im4qf15rO6AUjjV4hzmfO8s3d8+ID75Qm8/7hO11eItyTTb8VBDm9zjiFEWxtD99B9 zvt/vFOYrG5dA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Arnd Bergmann , Hans Verkuil , Sasha Levin , mchehab@kernel.org, nathan@kernel.org, linux-media@vger.kernel.org, llvm@lists.linux.dev Subject: [PATCH AUTOSEL 6.8 44/98] media: sta2x11: fix irq handler cast Date: Fri, 29 Mar 2024 08:37:15 -0400 Message-ID: <20240329123919.3087149-44-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240329123919.3087149-1-sashal@kernel.org> References: <20240329123919.3087149-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.8.2 Content-Transfer-Encoding: 8bit From: Arnd Bergmann [ Upstream commit 3de49ae81c3a0f83a554ecbce4c08e019f30168e ] 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 Signed-off-by: Hans Verkuil [hverkuil: update argument documentation] Signed-off-by: Sasha Levin --- drivers/media/pci/sta2x11/sta2x11_vip.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/media/pci/sta2x11/sta2x11_vip.c b/drivers/media/pci/sta2x11/sta2x11_vip.c index e4cf9d63e926d..364ce9e570182 100644 --- a/drivers/media/pci/sta2x11/sta2x11_vip.c +++ b/drivers/media/pci/sta2x11/sta2x11_vip.c @@ -757,7 +757,7 @@ static const struct video_device video_dev_template = { /** * vip_irq - interrupt routine * @irq: Number of interrupt ( not used, correct number is assumed ) - * @vip: local data structure containing all information + * @data: local data structure containing all information * * check for both frame interrupts set ( top and bottom ). * check FIFO overflow, but limit number of log messages after open. @@ -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.43.0