From patchwork Mon Feb 26 17:32:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 206826 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp2226579dyb; Mon, 26 Feb 2024 09:34:23 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUcwOtkOGbrJSSRgckrMg781Ypv+yx3a91eLyramgXbCy/P0N6bTiQ0YQaXaC+poVbBZpuDvFPicQklcaeja9DTJbL9xw== X-Google-Smtp-Source: AGHT+IFvi9x187SLElsCt0SNbECwkkhdYldr3djCJpnRDa1fiYEg5cb8WjwmQnr1JJ53osnhtR2X X-Received: by 2002:a67:c991:0:b0:472:4fd5:1dc1 with SMTP id y17-20020a67c991000000b004724fd51dc1mr4337vsk.14.1708968863173; Mon, 26 Feb 2024 09:34:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708968863; cv=pass; d=google.com; s=arc-20160816; b=C8dp0+WWrzQPIiYbXWvGGGbaDzZxE8A0L7PcrwiPxXxl2LVM9YXVp/8JpezmFZDCVg pLebBVwdTmCImAKe1lMUpAmXL0+yDhvye6EbJLMomZDc8X0NGd4OUl0y/ZhyFXo7zeoF +KzfE1HSR8AHht/lgl/6EJJmQ9Gb2uXDJ+A0Ezfy8CXFkaAdF59Qxd36Ar3wVX3mEm73 3ycAD0JKsePCJZ+j1ZpGmYYhCm1OJwkT7bSJqbMZ87GpqJBlJ7E1tWAWKABwElEoz5/U XC7/kXJ3Qcp3MnCWFRMd7/eERexpa/Gz8jzmyiFaHCRoS/DyA0VNyDRJhKrFM92icnWw DPpw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=ZotKd2o47/oKAtdV1I26QivtjRepugTGHOJDDp/ZM4g=; fh=Jxj19mDZmFjaqHyXuCKuOZXocYplNHIqAPKrIO+wqiA=; b=LMf3qmoiZOqOi+Si3mlOEIne0LKhqeAHrv0Ulb8kxOn8K5UudbO9NGVT3uwIUDaeFq jqEK6SR0NattEQ93JmGFkavwLBZ1XqA5HyF1Y0q0IK8MIGxOeybRuja/Io2kShTFtrMX OKXhuQP0kQP64U6yk/5sF+bO0YnawDmHyzHYIFGaf6kfEfP2HU7avnqBnaSHM1XDmJG1 KFJj1ZaNwu9VchyOSQW/c0/idiMq1WBCbrQsyk8wqeVhJjVqC8e88LQ2486uXCiONxG4 YEb9955hRcxx/2oeUH/NXRlztH1bUgcFKtH8Zds/ehtQlUpsLklDo/jBNNVYX0CSEg+j WptA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Zv+jgdzp; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-82069-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82069-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id ij24-20020a0561025e9800b0046ed2957797si759851vsb.727.2024.02.26.09.34.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 09:34:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-82069-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Zv+jgdzp; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-82069-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82069-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id EA65A1C2B28C for ; Mon, 26 Feb 2024 17:34:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 62586130AD3; Mon, 26 Feb 2024 17:32:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="Zv+jgdzp" Received: from mail-qk1-f178.google.com (mail-qk1-f178.google.com [209.85.222.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CEFEE12F366 for ; Mon, 26 Feb 2024 17:32:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.178 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708968773; cv=none; b=GdHrj5Q2wRnUgw/0Zpl3kVb6kD//FUfmrGcVjX3NhdrTlugU+Bu+cfTP6sXFFnpSeQAOAxEmo9EoYUQYNiAAsR40WlwyCfD1dnV5OruntmyoxXQgdErenBFWCkjwE7CFcmsHsrOD3V8PYvPuT+PCWciG29h0NqyoDf4Gkh50g7k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708968773; c=relaxed/simple; bh=Wy4cGPpVerRovklUcPnMhjmK9LuSlF+TSnH28VA7whs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=JWC03D4ZdkcQpnOgnPfCg2tnGJj2OufkNNF8F3ZvTrpIHOaG7LSn2h7rlEbd8jNT8mLvSYG8UTIQHr9JHJVcGVurTLIg5AJlLHWsMuUTFCXn/ux0bi7uMZ7dzd6jJzbeiJ9O9RTV77Df4ybWACSazFrZ+BP8oyzG+VzQke1KVi8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=Zv+jgdzp; arc=none smtp.client-ip=209.85.222.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-qk1-f178.google.com with SMTP id af79cd13be357-787cb2ef657so94445985a.1 for ; Mon, 26 Feb 2024 09:32:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1708968770; x=1709573570; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=ZotKd2o47/oKAtdV1I26QivtjRepugTGHOJDDp/ZM4g=; b=Zv+jgdzpv7kbxm6d51ljpzyYaHHHaw109ZABdcIgI2J3WR8hcr0j1EpNDHNYlqvDtt +7duKGpReSs2CDVHSgcR392oAEnvTVNOUE+fdszHIeuBjG76EGg/w0+GgqHv2MHX7ZKL B4WNuqWk5RAIPdGWp15zD/a9kubf6P4nkctjY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708968770; x=1709573570; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZotKd2o47/oKAtdV1I26QivtjRepugTGHOJDDp/ZM4g=; b=X7bIAnfhTa3SIdfCUA1i/dz9x9BpZf++SpUfAZjViuK5JDU1g2sNLV/HD04kgs1QOv nPnqPZT3vgsxOj0ekvHIx+9eMsdGT4QyW0u5Tt1UcSu7m7XctcsH8TbY75yBfvLqvuMi 70m/3eqacmU3/YbioqqnoaCnH6+4FN9RZfHztsozBvjGh8vPzkiYQsh/32gntrP5OLCy 2JFJmqHkPEzVnqMjpsR6yIal19PKPtJT8Co+EBTkMWTKHOA9KcmBMTQC+9uIKfdWPTri QCvR7jU1w4RgT2NemLOmyOuejE8oXL9IKlD7yJf64ZNOhcoYQ6vg1y/JUVy1cksn9h9l ktrw== X-Forwarded-Encrypted: i=1; AJvYcCWCloN9SZgWlTkJIurlpwAIiBHvI7d6bkKYe3jQ80wANzjXqVHdTlC7tZIgUESmQ3LtJCi/1QgpmmwQuXzfkuvW6e80tpBToe7+lcCi X-Gm-Message-State: AOJu0YwRRD3LD/O3D51hvagcOLq5HvVz9FbJj9do1zhL4ha3+fsnq3vL kgazjNdS19KmZ7UkCdblLDPka0r3B3VEYayCLA00Pq6VAixr5+8QuXQEKzOzCw== X-Received: by 2002:a05:620a:9d7:b0:787:9a1c:fb32 with SMTP id y23-20020a05620a09d700b007879a1cfb32mr8021996qky.2.1708968769789; Mon, 26 Feb 2024 09:32:49 -0800 (PST) Received: from denia.c.googlers.com (115.25.199.35.bc.googleusercontent.com. [35.199.25.115]) by smtp.gmail.com with ESMTPSA id b11-20020a05620a04eb00b0078725d0345dsm2672669qkh.2.2024.02.26.09.32.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 09:32:49 -0800 (PST) From: Ricardo Ribalda Date: Mon, 26 Feb 2024 17:32:44 +0000 Subject: [PATCH v2 1/3] media: pci: sta2x11: Fix Wcast-function-type-strict warnings Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240226-fix-clang-warnings-v2-1-fa1bc931d17e@chromium.org> References: <20240226-fix-clang-warnings-v2-0-fa1bc931d17e@chromium.org> In-Reply-To: <20240226-fix-clang-warnings-v2-0-fa1bc931d17e@chromium.org> To: Mauro Carvalho Chehab , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , Mike Isely , Tiffany Lin , Andrew-CT Chen , Yunfei Dong , Matthias Brugger , AngeloGioacchino Del Regno , Bjorn Andersson , Mathieu Poirier Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-remoteproc@vger.kernel.org, Ricardo Ribalda X-Mailer: b4 0.12.4 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791983734451366157 X-GMAIL-MSGID: 1791983734451366157 Building with LLVM=1 throws the following warning: drivers/media/pci/sta2x11/sta2x11_vip.c:1057:6: warning: 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 [-Wcast-function-type-strict] Reviewed-by: Nathan Chancellor Signed-off-by: Ricardo Ribalda --- drivers/media/pci/sta2x11/sta2x11_vip.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/media/pci/sta2x11/sta2x11_vip.c b/drivers/media/pci/sta2x11/sta2x11_vip.c index e4cf9d63e926d..a6456673be3f6 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); From patchwork Mon Feb 26 17:32:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 206827 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp2226657dyb; Mon, 26 Feb 2024 09:34:30 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXWgLZ4Y261c+uG5sTWhJ+fe+SONYrOGe5Jb9ZzkJ4yww4pDxs2izfeexgufn6JkhMTQd1gGBuaSKES+JgFMMojOL+7eA== X-Google-Smtp-Source: AGHT+IEfJKddj7d92MeUBELL7SzKGxuEmNNRi7ipUv7y9nmqbwEsqWVuRt3Vx6/iPZz9KUjIVB8x X-Received: by 2002:a05:6102:2388:b0:471:c518:eca0 with SMTP id v8-20020a056102238800b00471c518eca0mr5119255vsr.34.1708968870572; Mon, 26 Feb 2024 09:34:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708968870; cv=pass; d=google.com; s=arc-20160816; b=qamvL7pV5jXsCLY8QbCdIGWDNxdJPF3e6ISVSsgB14JADzBUuBF0pvsl3N4Ufqbxy0 2PcKN1CQ9w8RFzMn+Exy+v6KpnBva8Hz6pHSGU+1QJu4nGrxAHX5wdt7R/BbyUIDjha1 dzTgrcTpJNxjZExWQUnkFV7mW5+jxsL2zsSzHrLXi78hKFRR+JTc3wOGdqgta8uyop1S f49zrFoHEPYCuGo80saKV1QrrvQSAsnvzEgqeDZw61E61adLGlYahY/L9snsWcAmKEoZ UFbq5mNDvhqbWU99E57G2OWAvvdy8fOxHnnOBsmMepamkhnA8ZjnkA2PcCOaw7V9cqyT 6pwQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=MaYfpx4jqxqKQ4ygGfIX8XBKNx0fRub/o4Qatc3GlF4=; fh=2aEIbZ+AJ3X0j02dQlDT3AvM52pW7poIMINai/HILqk=; b=ezRz9/K1yyItWEpvs7xRAAylyMb2moVQj22Xwii8cTqq0HVq6buqgSOpTw5r0bRJg9 8rTLoRtFBRSN7TYAUTjzWNmwExPGA4/8r4ydgg5uuu1CCzGAL1GdFA2C3hhTu/dZrLkm iziRjgawBbqx0haXlZCba/ou+1MB8Pt/E9B1Wt5ZGWYC07LICe+J1T2V1jvxSNZtCKza 3TLJWYPI6FM4cu8nW9psIV9G9LwEIAPNoLporGDwqyrMQU7EnkuDlQqBUKJydSNn342I 25peHdokcAjUBooC7SNs/biOPwf4+G+kxDQF1VwWHooBa5IRx3WcL41USFl0OYo4RZNw 8nsQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=GOElx2h1; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-82070-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82070-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id ij24-20020a0561025e9800b0046ed2957797si759851vsb.727.2024.02.26.09.34.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 09:34:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-82070-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=GOElx2h1; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-82070-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82070-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 4C1861C2BD32 for ; Mon, 26 Feb 2024 17:34:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 138AE12F366; Mon, 26 Feb 2024 17:32:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="GOElx2h1" Received: from mail-qk1-f176.google.com (mail-qk1-f176.google.com [209.85.222.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CAADF12F389 for ; Mon, 26 Feb 2024 17:32:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.176 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708968773; cv=none; b=biyUwKUHJUfsYJEcQMV8sibZSHGd+jd0Nnm1NNbOHwersdZYXrO6qswYT1uhlaE1DwJYdoxZ8yDRJMhQjnPPisJGG+QiggYr60KF4yP2QvM4AZwzVTLZHYDVExAuDSqSNBkCqoO/SJ72rFjPFAcFmQVZzLXcqq/YjJJ3Bchi5U8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708968773; c=relaxed/simple; bh=dcyaGfqQ8aucX+uJmQuZcf9wqW6CMLKxh3VcDhu7drg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=VDMb0fMuHRNcO51tfttProJiQL3KZR9/JIpnzOmIIF83CVdocq0inHkZJdvKaJHtvjW/PKJ1HSl3t9vC/ZAegXWgAlOOiHzgg3deUqhOcqW3BIdFuZTHoK77atlen0HBfv71TO+pgBi6JD7CXSKwpzd5Bl1KXOM23VM5heFyECI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=GOElx2h1; arc=none smtp.client-ip=209.85.222.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-qk1-f176.google.com with SMTP id af79cd13be357-787b5c68253so235046185a.2 for ; Mon, 26 Feb 2024 09:32:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1708968771; x=1709573571; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=MaYfpx4jqxqKQ4ygGfIX8XBKNx0fRub/o4Qatc3GlF4=; b=GOElx2h12cGPZDE1L5CsA6kWYbbHIDTJgGQ7U8/B7YVdbDdYPtHW5EOr8pBLsfdyar ScKJHjwsxfm8TI4fNMxjKffXLHB6OIptEn0joSP1ieMaA0P9JmfXr9we9ukr/dFfV+ZI jDB+aSEEhIYQPfExte4rZO+gSpMzQ3bE0YdyI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708968771; x=1709573571; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MaYfpx4jqxqKQ4ygGfIX8XBKNx0fRub/o4Qatc3GlF4=; b=ifY+pLlhp4VDB9B4GXm63/KnxfZ3P2mjQvcjIIWETVImzRK4oRIPaKHLwAuk0iLBXg KfRNafpas/oFbKbAJza5UX/BBSz4Sbax08VsgZOvquRfvKSlBUg2mLBQ45c9OMBd2776 ZuysF78KfnA4LoVfLQEDQfIIDbmPTv1iIEWOAY8vJ4vZRMXl3yTcZaH88tO1dV3BHsrq 3XGIwMPw9qGiHqFS4Ztiu89iQJqvpBZkE4FNEcNh+PwyfOvfhekPU5P7gaCs9oKbPGd8 P9C4v6m4sau1kmlkTh/gghAv8ybEm+OPC6HZN+kATOkvDx64XcL3KzlMb+lALoGNoM4K zLgA== X-Forwarded-Encrypted: i=1; AJvYcCV8Fzgu1T6XwAS1MyQEHU7eUTSVMjwxwF+QhGErKcxqidk5UCJmj5FFzKXF6fINx3iF9RhULq1zBo+p9JloBCEmpFJ0Baus5am5hlWj X-Gm-Message-State: AOJu0YyuRAByaBqzHpLfFCwhgmm8PQUZwNxtE8qly+erknMF9HBB0Q+C ojC21MIxV7+bUrJTDAI4bEscdyk6qUGK5E1i11nTuUrluE/aCVgDqHO2Med7yw== X-Received: by 2002:a05:620a:17aa:b0:787:c71f:a55c with SMTP id ay42-20020a05620a17aa00b00787c71fa55cmr7498759qkb.59.1708968770886; Mon, 26 Feb 2024 09:32:50 -0800 (PST) Received: from denia.c.googlers.com (115.25.199.35.bc.googleusercontent.com. [35.199.25.115]) by smtp.gmail.com with ESMTPSA id b11-20020a05620a04eb00b0078725d0345dsm2672669qkh.2.2024.02.26.09.32.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 09:32:50 -0800 (PST) From: Ricardo Ribalda Date: Mon, 26 Feb 2024 17:32:45 +0000 Subject: [PATCH v2 2/3] media: usb: pvrusb2: Fix Wcast-function-type-strict warnings Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240226-fix-clang-warnings-v2-2-fa1bc931d17e@chromium.org> References: <20240226-fix-clang-warnings-v2-0-fa1bc931d17e@chromium.org> In-Reply-To: <20240226-fix-clang-warnings-v2-0-fa1bc931d17e@chromium.org> To: Mauro Carvalho Chehab , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , Mike Isely , Tiffany Lin , Andrew-CT Chen , Yunfei Dong , Matthias Brugger , AngeloGioacchino Del Regno , Bjorn Andersson , Mathieu Poirier Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-remoteproc@vger.kernel.org, Ricardo Ribalda X-Mailer: b4 0.12.4 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791983742317930430 X-GMAIL-MSGID: 1791983742317930430 Building with LLVM=1 throws the following warning: drivers/media/usb/pvrusb2/pvrusb2-context.c:110:6: warning: cast from 'void (*)(struct pvr2_context *)' to 'void (*)(void *)' converts to incompatible function type [-Wcast-function-type-strict] drivers/media/usb/pvrusb2/pvrusb2-v4l2.c:1070:30: warning: cast from 'void (*)(struct pvr2_v4l2_fh *)' to 'pvr2_stream_callback' (aka 'void (*)(void *)') converts to incompatible function type [-Wcast-function-type-strict] drivers/media/usb/pvrusb2/pvrusb2-dvb.c:152:6: warning: cast from 'void (*)(struct pvr2_dvb_adapter *)' to 'pvr2_stream_callback' (aka 'void (*)(void *)') converts to incompatible function type [-Wcast-function-type-strict] Reviewed-by: Nathan Chancellor Signed-off-by: Ricardo Ribalda --- drivers/media/usb/pvrusb2/pvrusb2-context.c | 5 +++-- drivers/media/usb/pvrusb2/pvrusb2-dvb.c | 7 ++++--- drivers/media/usb/pvrusb2/pvrusb2-v4l2.c | 7 ++++--- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/drivers/media/usb/pvrusb2/pvrusb2-context.c b/drivers/media/usb/pvrusb2/pvrusb2-context.c index 1764674de98bc..16edabda191c4 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-context.c +++ b/drivers/media/usb/pvrusb2/pvrusb2-context.c @@ -90,8 +90,9 @@ static void pvr2_context_destroy(struct pvr2_context *mp) } -static void pvr2_context_notify(struct pvr2_context *mp) +static void pvr2_context_notify(void *data) { + struct pvr2_context *mp = data; pvr2_context_set_notify(mp,!0); } @@ -107,7 +108,7 @@ static void pvr2_context_check(struct pvr2_context *mp) "pvr2_context %p (initialize)", mp); /* Finish hardware initialization */ if (pvr2_hdw_initialize(mp->hdw, - (void (*)(void *))pvr2_context_notify, + pvr2_context_notify, mp)) { mp->video_stream.stream = pvr2_hdw_get_video_stream(mp->hdw); diff --git a/drivers/media/usb/pvrusb2/pvrusb2-dvb.c b/drivers/media/usb/pvrusb2/pvrusb2-dvb.c index 26811efe0fb58..8b9f1a09bd53d 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-dvb.c +++ b/drivers/media/usb/pvrusb2/pvrusb2-dvb.c @@ -88,8 +88,9 @@ static int pvr2_dvb_feed_thread(void *data) return stat; } -static void pvr2_dvb_notify(struct pvr2_dvb_adapter *adap) +static void pvr2_dvb_notify(void *data) { + struct pvr2_dvb_adapter *adap = data; wake_up(&adap->buffer_wait_data); } @@ -148,8 +149,8 @@ static int pvr2_dvb_stream_do_start(struct pvr2_dvb_adapter *adap) if (!(adap->buffer_storage[idx])) return -ENOMEM; } - pvr2_stream_set_callback(pvr->video_stream.stream, - (pvr2_stream_callback) pvr2_dvb_notify, adap); + pvr2_stream_set_callback(pvr->video_stream.stream, pvr2_dvb_notify, + adap); ret = pvr2_stream_set_buffer_count(stream, PVR2_DVB_BUFFER_COUNT); if (ret < 0) return ret; diff --git a/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c b/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c index c04ab7258d645..590f80949bbfc 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c +++ b/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c @@ -1032,9 +1032,10 @@ static int pvr2_v4l2_open(struct file *file) return 0; } - -static void pvr2_v4l2_notify(struct pvr2_v4l2_fh *fhp) +static void pvr2_v4l2_notify(void *data) { + struct pvr2_v4l2_fh *fhp = data; + wake_up(&fhp->wait_data); } @@ -1067,7 +1068,7 @@ static int pvr2_v4l2_iosetup(struct pvr2_v4l2_fh *fh) hdw = fh->channel.mc_head->hdw; sp = fh->pdi->stream->stream; - pvr2_stream_set_callback(sp,(pvr2_stream_callback)pvr2_v4l2_notify,fh); + pvr2_stream_set_callback(sp, pvr2_v4l2_notify, fh); pvr2_hdw_set_stream_type(hdw,fh->pdi->config); if ((ret = pvr2_hdw_set_streaming(hdw,!0)) < 0) return ret; return pvr2_ioread_set_enabled(fh->rhp,!0); From patchwork Mon Feb 26 17:32:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 206828 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp2226727dyb; Mon, 26 Feb 2024 09:34:39 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUfNn7Bpq/BK1dJ91wEjwz4X9S0ovCLl8PnUgTlwmhrEVffKvePLStcq4mr8uZZ4mwaUZcNMNQ/mxzJ9KDQGuL5KxAn1w== X-Google-Smtp-Source: AGHT+IGaRU+qtQ8eTcsHY59vQqIQpimUk7XPa9y+Q4Z3FFaGXkMpP9/l7xgE0UCrYcxItreHxBQw X-Received: by 2002:a05:6870:c155:b0:21e:d9c3:39dd with SMTP id g21-20020a056870c15500b0021ed9c339ddmr10115033oad.20.1708968879558; Mon, 26 Feb 2024 09:34:39 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708968879; cv=pass; d=google.com; s=arc-20160816; b=YgQsAvnbdDp5l7cR/y/J3eD0NCQTidqYbXLs9TSMbZ47QnFu+iupwwH9Kx8X9a4Vtj ooB1aQcivuAavRTIzHfYrI1xuEl4L6Z0BJGajmqdNAOxtl14TaMC+fMX3xkDLo7LqY3a OPxATO2CA7I4IE7ERuN6wRcea8EfD5J+kXnm7a3vYVrSPOlDfyfJk0QcaUb7lFDleCvV d9mL1GvnCQm3o5Ijoi5lCX82CBqbeyqvaQqBYl6YGVR276E09hXr3BhamAIEuBYUFuYc i8366/2ZIVYfUqhQxDvET6wj306Khzcc59T9QVT1zBFBnXNQ3KD01OjpqR6kkb5av4ts mvFg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=/didL5h/sYGHzQHALjvpk1UK+C5uX4ht1ERRn86zQ0I=; fh=xuOvK1m2Sx/G8bEfT5z/AEsBTeEBTuBaVpaagbWCE34=; b=TzioU5EEj5+2sM2JeoJE2EH0XOwhGyE/OD3Nj1laXx44q30vXBuHZyXnwrXa1qpWZZ WtNUuwcNM/wYHOWMOy0YMUfw4XkacOncdgvgofafWD7D9RNxSnB96lvoAi+Mt451VYzp aK+oPoZK+gDZXpdT3HtP/ZEtDeSC5UIf0aO2Azf6th9upV9noV5Z7yu+rlj8pxUageOe ZGgWXmKAk9X1smfxQ/UadCXFlNLRTCl3jJVSJjPEeIyRur6FFKq6fe4qsVsE7FaGZAmK sB+3bmEkVpaodtBSehwT/vl6LR4YVkzbYagK6zzcGuOLFncEIuZ9gt827OCyvU0zsrA2 o4nA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=LEI5OqBu; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-82071-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82071-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id e63-20020a636942000000b005dc505aef9asi3946039pgc.354.2024.02.26.09.34.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 09:34:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-82071-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=LEI5OqBu; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-82071-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82071-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.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 55DFB298966 for ; Mon, 26 Feb 2024 17:34:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F2A48130AEE; Mon, 26 Feb 2024 17:32:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="LEI5OqBu" Received: from mail-qk1-f171.google.com (mail-qk1-f171.google.com [209.85.222.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 022BB12E1C4 for ; Mon, 26 Feb 2024 17:32:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708968775; cv=none; b=Fk/F6urIOS7DyT7ekVE/r79F8CIlF0nQmNDM0T4FmF9wZh/RmXTHxZ9NPwahdgMPNcQeKFWelRn2B1fdiTo+R5e6p9bxcxvGuQ38BbdDOq8y0Vb0IDGVz8jgzVvc/AvfIJ4Z6Jc3Lsl84OObq3yoYCd+rNNXDldy3bOwWU8TUlE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708968775; c=relaxed/simple; bh=td4CCxkjN8iyvmzHWLR9fnOFkdJjZ2+amnpJDdUu5f8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=N+ccowS1iIQyccBVVY1znmmZ95y9xZTepT7AQyxW+DAj1JVM0ZiPi21Elqe0vw//0zIwbmE1/zxwIgKX7T1qcKhZs6ORfO7v7r+2539vIQDLNPmROioooddJl/mB4m5f13mCn/9Ujq5hTxFl3ehOXOAItoZ0DY3f1QCwGVSpdLo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=LEI5OqBu; arc=none smtp.client-ip=209.85.222.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-qk1-f171.google.com with SMTP id af79cd13be357-787d021f08bso111201385a.3 for ; Mon, 26 Feb 2024 09:32:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1708968772; x=1709573572; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=/didL5h/sYGHzQHALjvpk1UK+C5uX4ht1ERRn86zQ0I=; b=LEI5OqBuDA4BFyU7c2Wv1RD6jswqs1xutBj25bi3sHxg+05xqLdwX6n2DF3A+yB40l tl71DxmlksMhYt8MXNcRRKquppYr9P3a7XQlNnvzWMiGMnhP/+FQH9XMnu6T1y8ebveT afAXXNxLRCTU0oO5J6JzsXromGmwGOepMnckk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708968772; x=1709573572; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/didL5h/sYGHzQHALjvpk1UK+C5uX4ht1ERRn86zQ0I=; b=hldpj5tbrgpYc9+km7rif32enXvtC7aTJDvGqFsGS0AztdfktM+nS7elyJhsvoi5Os AY0Ha9rVDAj4GrUksFMlDhmeNGVyBPSQWmd6TS7tsmCXbxJNHMaANjGrrhdcCwPQT9xR KHv1G1Op8M4QKKVfOTUnoQSEqmU0GMVab1v7cdS6ar42KpjGW1Zsil+6BxSpjFlOCqEQ L/8xP+RJGy3h3VuFUuls+plApqk/35Sa91ePQJX/BLxeAprT4XnzP2zsq7ikGLXU/z0A LG5nMgBaEXbdn2v/RXxLv2hguZ75lAifQmJFeKL6fNNIQRdNu9jJ6MPTFWJopoKnt1aI N47A== X-Forwarded-Encrypted: i=1; AJvYcCXVPgURyHLm9Q7Qw3Z6WH2iAKB0V7HhxbqXXxLQ/DvMxT4IyPrO5UQHNQdlcpzQH2R4ZlqcWCaDJIoV2ksXHqkJwZMEbY/A5+NjyEXT X-Gm-Message-State: AOJu0Yz2oOf8GPuETKM2nVeGt1UQ5YQbOdVn8ohoy2+jKby0ho1AUXsQ g+nJWnNf6qYqJn6qKnOAXVO/UtW6x/3UvUfdnYPj+99ePdNrXdol+GIteNbAcg== X-Received: by 2002:a05:620a:4092:b0:787:a0d2:460e with SMTP id f18-20020a05620a409200b00787a0d2460emr10758707qko.35.1708968772010; Mon, 26 Feb 2024 09:32:52 -0800 (PST) Received: from denia.c.googlers.com (115.25.199.35.bc.googleusercontent.com. [35.199.25.115]) by smtp.gmail.com with ESMTPSA id b11-20020a05620a04eb00b0078725d0345dsm2672669qkh.2.2024.02.26.09.32.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 09:32:51 -0800 (PST) From: Ricardo Ribalda Date: Mon, 26 Feb 2024 17:32:46 +0000 Subject: [PATCH v2 3/3] media: mediatek: vcodedc: Fix Wcast-function-type-strict warnings Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240226-fix-clang-warnings-v2-3-fa1bc931d17e@chromium.org> References: <20240226-fix-clang-warnings-v2-0-fa1bc931d17e@chromium.org> In-Reply-To: <20240226-fix-clang-warnings-v2-0-fa1bc931d17e@chromium.org> To: Mauro Carvalho Chehab , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , Mike Isely , Tiffany Lin , Andrew-CT Chen , Yunfei Dong , Matthias Brugger , AngeloGioacchino Del Regno , Bjorn Andersson , Mathieu Poirier Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-remoteproc@vger.kernel.org, Ricardo Ribalda X-Mailer: b4 0.12.4 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791983751660873748 X-GMAIL-MSGID: 1791983751660873748 Building with LLVM=1 throws the following warning: drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_fw_vpu.c:38:32: warning: cast from 'mtk_vcodec_ipi_handler' (aka 'void (*)(void *, unsigned int, void *)') to 'ipi_handler_t' (aka 'void (*)(const void *, unsigned int, void *)') converts to incompatible function type [-Wcast-function-type-strict] Constify the types to avoid the warning. Signed-off-by: Ricardo Ribalda --- drivers/media/platform/mediatek/mdp3/mtk-mdp3-vpu.c | 12 ++++++------ .../media/platform/mediatek/vcodec/common/mtk_vcodec_fw.h | 2 +- .../platform/mediatek/vcodec/common/mtk_vcodec_fw_vpu.c | 10 +--------- drivers/media/platform/mediatek/vcodec/decoder/vdec_vpu_if.c | 2 +- drivers/media/platform/mediatek/vcodec/encoder/venc_vpu_if.c | 2 +- drivers/remoteproc/mtk_scp.c | 4 ++-- include/linux/remoteproc/mtk_scp.h | 2 +- include/linux/rpmsg/mtk_rpmsg.h | 2 +- 8 files changed, 14 insertions(+), 22 deletions(-) diff --git a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-vpu.c b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-vpu.c index 49fc2e9d45dd5..c4f1c49b9d52a 100644 --- a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-vpu.c +++ b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-vpu.c @@ -77,10 +77,10 @@ void mdp_vpu_shared_mem_free(struct mdp_vpu_dev *vpu) dma_free_wc(dev, vpu->config_size, vpu->config, vpu->config_addr); } -static void mdp_vpu_ipi_handle_init_ack(void *data, unsigned int len, +static void mdp_vpu_ipi_handle_init_ack(const void *data, unsigned int len, void *priv) { - struct mdp_ipi_init_msg *msg = (struct mdp_ipi_init_msg *)data; + const struct mdp_ipi_init_msg *msg = data; struct mdp_vpu_dev *vpu = (struct mdp_vpu_dev *)(unsigned long)msg->drv_data; @@ -91,10 +91,10 @@ static void mdp_vpu_ipi_handle_init_ack(void *data, unsigned int len, complete(&vpu->ipi_acked); } -static void mdp_vpu_ipi_handle_deinit_ack(void *data, unsigned int len, +static void mdp_vpu_ipi_handle_deinit_ack(const void *data, unsigned int len, void *priv) { - struct mdp_ipi_deinit_msg *msg = (struct mdp_ipi_deinit_msg *)data; + const struct mdp_ipi_deinit_msg *msg = data; struct mdp_vpu_dev *vpu = (struct mdp_vpu_dev *)(unsigned long)msg->drv_data; @@ -102,10 +102,10 @@ static void mdp_vpu_ipi_handle_deinit_ack(void *data, unsigned int len, complete(&vpu->ipi_acked); } -static void mdp_vpu_ipi_handle_frame_ack(void *data, unsigned int len, +static void mdp_vpu_ipi_handle_frame_ack(const void *data, unsigned int len, void *priv) { - struct img_sw_addr *addr = (struct img_sw_addr *)data; + const struct img_sw_addr *addr = data; struct img_ipi_frameparam *param = (struct img_ipi_frameparam *)(unsigned long)addr->va; struct mdp_vpu_dev *vpu = diff --git a/drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_fw.h b/drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_fw.h index 300363a40158c..2561b99c95871 100644 --- a/drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_fw.h +++ b/drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_fw.h @@ -23,7 +23,7 @@ enum mtk_vcodec_fw_use { struct mtk_vcodec_fw; -typedef void (*mtk_vcodec_ipi_handler) (void *data, +typedef void (*mtk_vcodec_ipi_handler) (const void *data, unsigned int len, void *priv); struct mtk_vcodec_fw *mtk_vcodec_fw_select(void *priv, enum mtk_vcodec_fw_type type, diff --git a/drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_fw_vpu.c b/drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_fw_vpu.c index 9f6e4b59455da..4c34344dc7dcb 100644 --- a/drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_fw_vpu.c +++ b/drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_fw_vpu.c @@ -29,15 +29,7 @@ static int mtk_vcodec_vpu_set_ipi_register(struct mtk_vcodec_fw *fw, int id, mtk_vcodec_ipi_handler handler, const char *name, void *priv) { - /* - * The handler we receive takes a void * as its first argument. We - * cannot change this because it needs to be passed down to the rproc - * subsystem when SCP is used. VPU takes a const argument, which is - * more constrained, so the conversion below is safe. - */ - ipi_handler_t handler_const = (ipi_handler_t)handler; - - return vpu_ipi_register(fw->pdev, id, handler_const, name, priv); + return vpu_ipi_register(fw->pdev, id, handler, name, priv); } static int mtk_vcodec_vpu_ipi_send(struct mtk_vcodec_fw *fw, int id, void *buf, diff --git a/drivers/media/platform/mediatek/vcodec/decoder/vdec_vpu_if.c b/drivers/media/platform/mediatek/vcodec/decoder/vdec_vpu_if.c index 82e57ae983d55..a840dd2a48d0e 100644 --- a/drivers/media/platform/mediatek/vcodec/decoder/vdec_vpu_if.c +++ b/drivers/media/platform/mediatek/vcodec/decoder/vdec_vpu_if.c @@ -97,7 +97,7 @@ static bool vpu_dec_check_ap_inst(struct mtk_vcodec_dec_dev *dec_dev, struct vde * This function runs in interrupt context and it means there's an IPI MSG * from VPU. */ -static void vpu_dec_ipi_handler(void *data, unsigned int len, void *priv) +static void vpu_dec_ipi_handler(const void *data, unsigned int len, void *priv) { struct mtk_vcodec_dec_dev *dec_dev; const struct vdec_vpu_ipi_ack *msg = data; diff --git a/drivers/media/platform/mediatek/vcodec/encoder/venc_vpu_if.c b/drivers/media/platform/mediatek/vcodec/encoder/venc_vpu_if.c index 84ad1cc6ad171..ea0c4a281d1a1 100644 --- a/drivers/media/platform/mediatek/vcodec/encoder/venc_vpu_if.c +++ b/drivers/media/platform/mediatek/vcodec/encoder/venc_vpu_if.c @@ -57,7 +57,7 @@ static bool vpu_enc_check_ap_inst(struct mtk_vcodec_enc_dev *enc_dev, struct ven return ret; } -static void vpu_enc_ipi_handler(void *data, unsigned int len, void *priv) +static void vpu_enc_ipi_handler(const void *data, unsigned int len, void *priv) { struct mtk_vcodec_enc_dev *enc_dev; const struct venc_vpu_ipi_msg_common *msg = data; diff --git a/drivers/remoteproc/mtk_scp.c b/drivers/remoteproc/mtk_scp.c index a35409eda0cf2..b508136b416a8 100644 --- a/drivers/remoteproc/mtk_scp.c +++ b/drivers/remoteproc/mtk_scp.c @@ -78,10 +78,10 @@ static void scp_wdt_handler(struct mtk_scp *scp, u32 scp_to_host) rproc_report_crash(scp_node->rproc, RPROC_WATCHDOG); } -static void scp_init_ipi_handler(void *data, unsigned int len, void *priv) +static void scp_init_ipi_handler(const void *data, unsigned int len, void *priv) { struct mtk_scp *scp = priv; - struct scp_run *run = data; + const struct scp_run *run = data; scp->run.signaled = run->signaled; strscpy(scp->run.fw_ver, run->fw_ver, SCP_FW_VER_LEN); diff --git a/include/linux/remoteproc/mtk_scp.h b/include/linux/remoteproc/mtk_scp.h index 7c2b7cc9fe6c1..84e579940b8e5 100644 --- a/include/linux/remoteproc/mtk_scp.h +++ b/include/linux/remoteproc/mtk_scp.h @@ -8,7 +8,7 @@ #include -typedef void (*scp_ipi_handler_t) (void *data, +typedef void (*scp_ipi_handler_t) (const void *data, unsigned int len, void *priv); struct mtk_scp; diff --git a/include/linux/rpmsg/mtk_rpmsg.h b/include/linux/rpmsg/mtk_rpmsg.h index 363b60178040b..9d67507471fba 100644 --- a/include/linux/rpmsg/mtk_rpmsg.h +++ b/include/linux/rpmsg/mtk_rpmsg.h @@ -9,7 +9,7 @@ #include #include -typedef void (*ipi_handler_t)(void *data, unsigned int len, void *priv); +typedef void (*ipi_handler_t)(const void *data, unsigned int len, void *priv); /* * struct mtk_rpmsg_info - IPI functions tied to the rpmsg device.