From nobody Fri Sep 20 03:52:22 2024 Received: from mail-qt1-f174.google.com (mail-qt1-f174.google.com [209.85.160.174]) (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 9902A17C9 for ; Sun, 28 Jan 2024 02:12:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.174 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706407945; cv=none; b=KLV0To42Bgxef5FyAyWi3grf68m+62OgxgfONvTa+//0/bsgcIerMWP38rdIARNUaZtigPDRCtK5mSmjie/VYZJtBT4knOxIiMK7/2qXTHkpCV06HQuspv3Jf6ejzJSXI6/r/yz0rsb9ILprOWBcmV3A1wg/j+lXhx7rZv0JHBs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706407945; c=relaxed/simple; bh=Nh29uFhKJi602G3prs8tELRuSaiBp8xa7lI2rXd2Wvk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=iTb2PIF7hCxnUOIUTXQAr72spFW7b/pBp5MpVlx/VL3yosNk9e1Dow6+ZNqxC6HElZz0dGTWrPiNvEWn/RsOOfLdYWHBnVtPMcxSyVP+7ZL2AcQ1N+mtGyXF80/H40RV2I2AJl7yH3a6WpmEM6p5xgr34b97y9yRefWmO9EWyaY= 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=gBOPEVmy; arc=none smtp.client-ip=209.85.160.174 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="gBOPEVmy" Received: by mail-qt1-f174.google.com with SMTP id d75a77b69052e-42a032cf012so17548431cf.1 for ; Sat, 27 Jan 2024 18:12:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1706407942; x=1707012742; 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=JJ/tXyO7amkyPth0LbHgT/YZ0y8KfOoM1IDJtLvky2Q=; b=gBOPEVmyjaXkTxEgfMbxFFUjQaKuhD4isds40+acoBqC7SPRB1DO0aJ2GZ7bhpnEyH EooYm6VU8gcx7Tic8G60asyR0LCtbk4S3zpCJpH82rikHnCdfnRD2L3+BSIL8CBKrCj+ XDgOgIgkTGG9KtO7k9uQs3RCtZwRidsEA95EE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706407942; x=1707012742; 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=JJ/tXyO7amkyPth0LbHgT/YZ0y8KfOoM1IDJtLvky2Q=; b=wsPUXTnGE1ge4pApXM1SjDBx1UmE1K2rda8Xxci3TfXqA/GzPc10/XM2qIvKt77mpy /R7EBt2YS2IS5+elpU+XCgAeGOz7EQTod+GNVx7dY0l8pmJL+y1WMHADEgmAEYSEfjla Q94nhyQ5l5i6zoiLxGpk8woLsCS2t7cww3gQM7EyzRB2VlA9t+srlOaAF85Jvfd9pANM +A6KOONCfOO2/MI1h9buJZ8UU3VA4J941d+7QbF0nPaIgWvfy6dR+vuVHyGXvSLpqKb/ OnEq6cEYvfpv3iYPXwR49MWAs1aMHs30Hbl+J4hFn/G8gxe1k4TdpCsJfBtP3t+erkCn 3XIQ== X-Gm-Message-State: AOJu0YyGiK5Szn1BiH9djLK4IBIRUVqsU3XMNn4dB7esjW6YMvtTyZJL GxX0A6mTH26B4KgKJWUW4hfwDT7Fykvb61lBUx1Bcw/lOJaXtsC5mPLC8gZ9bw== X-Google-Smtp-Source: AGHT+IEEZr/G/RgBFCi06b4c43fIXB0Odt7evUICu34JTHlyZ3GvGTVQDDbpNKHMg99SUGIH+6qSbA== X-Received: by 2002:a05:622a:49:b0:42a:8630:3dfd with SMTP id y9-20020a05622a004900b0042a86303dfdmr2871708qtw.87.1706407942502; Sat, 27 Jan 2024 18:12:22 -0800 (PST) Received: from denia.c.googlers.com (240.157.150.34.bc.googleusercontent.com. [34.150.157.240]) by smtp.gmail.com with ESMTPSA id ka23-20020a05622a441700b0042a98bf0117sm568061qtb.78.2024.01.27.18.12.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 Jan 2024 18:12:21 -0800 (PST) From: Ricardo Ribalda Date: Sun, 28 Jan 2024 02:12:20 +0000 Subject: [PATCH 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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20240128-fix-clang-warnings-v1-1-1d946013a421@chromium.org> References: <20240128-fix-clang-warnings-v1-0-1d946013a421@chromium.org> In-Reply-To: <20240128-fix-clang-warnings-v1-0-1d946013a421@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 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, Ricardo Ribalda X-Mailer: b4 0.12.3 Building with LLVM=3D1 throws the following warning: drivers/media/pci/sta2x11/sta2x11_vip.c:1057:6: warning: cast from 'irqretu= rn_t (*)(int, struct sta2x11_vip *)' (aka 'enum irqreturn (*)(int, struct s= ta2x11_vip *)') to 'irq_handler_t' (aka 'enum irqreturn (*)(int, void *)') = converts to incompatible function type [-Wcast-function-type-strict] Signed-off-by: Ricardo Ribalda Reviewed-by: Nathan Chancellor --- 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/st= a2x11/sta2x11_vip.c index e4cf9d63e926..0a3827575753 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 =3D= { /** * 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,9 +767,10 @@ static const struct video_device video_dev_template = =3D { * * IRQ_HANDLED, interrupt done. */ -static irqreturn_t vip_irq(int irq, struct sta2x11_vip *vip) +static irqreturn_t vip_irq(int irq, void *data) { unsigned int status; + struct sta2x11_vip *vip =3D data; =20 status =3D reg_read(vip, DVP_ITS); =20 --=20 2.43.0.429.g432eaa2c6b-goog From nobody Fri Sep 20 03:52:22 2024 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 9FC9320FD for ; Sun, 28 Jan 2024 02:12:24 +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=1706407946; cv=none; b=Xiqa/k3VUY79xRJRnj5151zt/hxeijjqFA2Bu9j+QOdKnQqjLZejHQ+Q2NIv2DbLhUlI+JmwuIUHfPBMjdNCKsfTAPESQkffTw1JHI6pucGSjw2dPjiuZh8ASB9KoBTTLqAXvptx9tZ9gic5W0bhbLyxxFpKCY0d1+ATVIby5z0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706407946; c=relaxed/simple; bh=xPQ0PXiX5n2Y4YbHy5UWYmPUAytuGPVlH6TYVkRD8Jk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ZxLOJIWmYny4zJsin41K7ScGw7Yf0iSJf79dvXklJGhZic7kdHCgO/cY/oE77xIvSSeN56ICtL5SBmvj4AC5Krmwn4GOS10ALbH8Uc9568n+S47grqNoasUdafqBmxHyyxOM2srO5TN38yhb8fdZeHz0GpzDSyatAimx4zNmrwk= 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=TOl5Yi3i; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="TOl5Yi3i" Received: by mail-qk1-f176.google.com with SMTP id af79cd13be357-7838af983c1so137949685a.3 for ; Sat, 27 Jan 2024 18:12:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1706407943; x=1707012743; 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=hOgHCV5E3Be30rwf2RnaiPl5JJ07/Dl6Wk4WLvGCkYA=; b=TOl5Yi3ireZIuU/4W8N2tVF37x0lJnkVK6+cBxzEwFoeJKEWLk3xFo/ZUSUB8AXT1g R4GwkA75X2ka2hFlEywOIwux7IQTu9YlagmtqhphyNSHuADNM/QEGgEByecQo2YwhgZS FjbQbfnlRAjAaPU3C2XBUKYfPwnWHiYwLeTeA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706407943; x=1707012743; 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=hOgHCV5E3Be30rwf2RnaiPl5JJ07/Dl6Wk4WLvGCkYA=; b=EmcNHOrC7zanJfc8AErqDdNLf7hlbO9E9v90SGnqgr4960EAdU70rReSVR/Qn7UstI mlP/5cP2BQdxLU6q9OypCShQBF7W+4j9BT5HDzhMICr6peILLaxWYn1vqMeBPYmMb6iR zQMOLsyoGCY2AzKOGT8UZGJ/ErdKnx4DFhn0icr6q0s3f+bZhtfPBf8+fWiFtLldpxlx yIeUS4R4arnbymzE8GUTVr3GWEeU071b9fyCzdG27xkRKlAD2JqiJuWwFkQqvwmwlX6+ bE98WwsyhPQfp3CR3ogttg7wHZfLa18RsaBV08hH4xEH4G37oV4UzJgO7l1gfje49M6b juXw== X-Gm-Message-State: AOJu0Yzja3CeEvuo8miu1PqM0JP6rNOuU2Gbcee1qmDKibdZWYV1lRVE kQoFeKDi8z/cW0ePM46+i9tBvD0XveQ970isbQ+uhajESQW1QB7RXI7go6vtAg== X-Google-Smtp-Source: AGHT+IH+hk6gNAofiPiYjbeJjVjSll9nP6JGaxAuvO6ry6PkFSYfUZKlxlGVvj4dQrSmFMmS8hX13Q== X-Received: by 2002:ac8:5b84:0:b0:42a:9aa8:776d with SMTP id a4-20020ac85b84000000b0042a9aa8776dmr1203101qta.130.1706407943512; Sat, 27 Jan 2024 18:12:23 -0800 (PST) Received: from denia.c.googlers.com (240.157.150.34.bc.googleusercontent.com. [34.150.157.240]) by smtp.gmail.com with ESMTPSA id ka23-20020a05622a441700b0042a98bf0117sm568061qtb.78.2024.01.27.18.12.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 Jan 2024 18:12:22 -0800 (PST) From: Ricardo Ribalda Date: Sun, 28 Jan 2024 02:12:21 +0000 Subject: [PATCH 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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20240128-fix-clang-warnings-v1-2-1d946013a421@chromium.org> References: <20240128-fix-clang-warnings-v1-0-1d946013a421@chromium.org> In-Reply-To: <20240128-fix-clang-warnings-v1-0-1d946013a421@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 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, Ricardo Ribalda X-Mailer: b4 0.12.3 Building with LLVM=3D1 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] dr= ivers/media/usb/pvrusb2/pvrusb2-dvb.c:152:6: warning: cast from 'void (*)(s= truct pvr2_dvb_adapter *)' to 'pvr2_stream_callback' (aka 'void (*)(void *)= ') converts to incompatible function type [-Wcast-function-type-strict] Signed-off-by: Ricardo Ribalda Reviewed-by: Nathan Chancellor --- 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/us= b/pvrusb2/pvrusb2-context.c index 1764674de98b..16edabda191c 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) } =20 =20 -static void pvr2_context_notify(struct pvr2_context *mp) +static void pvr2_context_notify(void *data) { + struct pvr2_context *mp =3D data; pvr2_context_set_notify(mp,!0); } =20 @@ -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 =3D pvr2_hdw_get_video_stream(mp->hdw); diff --git a/drivers/media/usb/pvrusb2/pvrusb2-dvb.c b/drivers/media/usb/pv= rusb2/pvrusb2-dvb.c index 26811efe0fb5..8b9f1a09bd53 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; } =20 -static void pvr2_dvb_notify(struct pvr2_dvb_adapter *adap) +static void pvr2_dvb_notify(void *data) { + struct pvr2_dvb_adapter *adap =3D data; wake_up(&adap->buffer_wait_data); } =20 @@ -148,8 +149,8 @@ static int pvr2_dvb_stream_do_start(struct pvr2_dvb_ada= pter *adap) if (!(adap->buffer_storage[idx])) return -ENOMEM; } =20 - 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); =20 ret =3D 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/p= vrusb2/pvrusb2-v4l2.c index c04ab7258d64..590f80949bbf 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; } =20 - -static void pvr2_v4l2_notify(struct pvr2_v4l2_fh *fhp) +static void pvr2_v4l2_notify(void *data) { + struct pvr2_v4l2_fh *fhp =3D data; + wake_up(&fhp->wait_data); } =20 @@ -1067,7 +1068,7 @@ static int pvr2_v4l2_iosetup(struct pvr2_v4l2_fh *fh) =20 hdw =3D fh->channel.mc_head->hdw; sp =3D 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 =3D pvr2_hdw_set_streaming(hdw,!0)) < 0) return ret; return pvr2_ioread_set_enabled(fh->rhp,!0); --=20 2.43.0.429.g432eaa2c6b-goog From nobody Fri Sep 20 03:52:22 2024 Received: from mail-qt1-f182.google.com (mail-qt1-f182.google.com [209.85.160.182]) (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 D9E1446AD for ; Sun, 28 Jan 2024 02:12:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706407947; cv=none; b=DIcXz07GXUteheLDdFW7F6LLPJB2sUp6q2uHIZu9wCKHV1ALozPOQD7/Oq18DX5QUQPKJwK9JKHyBn17mepGm+jJs+b/DwLer8tO0SR4uVi5TVUCJJsehFGvBhixtgec+OOP9k6wwScvhpIzN2yg5ZQv2A9vkKoCEAcK/FXUWuM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706407947; c=relaxed/simple; bh=9FkkM0hWSfNgvycjkBk9G6d+gbIZbwtTlwMJBT/mtG4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=j1fgJsXNIaDH3TWIvIg7LlPHwUhfpl6fWKJge/pj8BvNjOcwA/mhw99J+VnZHX6mUYxrtWuRgv7Xv1xKmi55PrrpiX8kIxK5SbcDPseXg90g1Aqp/UUubyNkrPj64PH7JhqzPNLNekBqucNF9hmq3iaqe22ZMWnJv1CunITXSs8= 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=cv1kF7YQ; arc=none smtp.client-ip=209.85.160.182 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="cv1kF7YQ" Received: by mail-qt1-f182.google.com with SMTP id d75a77b69052e-42a8be32041so11059891cf.1 for ; Sat, 27 Jan 2024 18:12:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1706407945; x=1707012745; 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=j3C7WQBZgNLZ3JFZZb+3FA3visUd8j+r0zGWZyg3Ybg=; b=cv1kF7YQM5NyC7/Jeh3KhL1qC/id6nz8hCXK0zJzhm7e1QGAwpIJCYF0dg6PoR0CyK sfVoLuXKp+C7E2VFBWxbrVZsg70FX+8gJT9hQP1KicVB9ejLwEZBueXnlyIC1TZNKdn+ FgkdKDKqXmHzMsWOMz6AvdkjUvT8wugbh+RL0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706407945; x=1707012745; 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=j3C7WQBZgNLZ3JFZZb+3FA3visUd8j+r0zGWZyg3Ybg=; b=iby6QLaKwq6t8D2K9K5JWRFgumaFptCuBfJqvEE5i4NjLc+59ODn65PUrS3FwJ+zUR lS4A2TFZGLa+C12UMnHUkxJ5kfmxfN2w+SuKsbzi32WZq/wWBPp2NZqsG+/ashnqkT8v UduzoB3Sw0b9QIIbWpufsrnz30xtwvi8S9hwPXSa23jwlen/o3cwFAHJRx3PVpoksl0x iakgADIk6hjLnluoBYY74xY0fbki2OwnhLItuMrSJE1SFPh8ojPhpIfMgQvdwqIYBHhj YTpM4P7sjW2TKmdMctTC2dn+W1M4RtXyWbYvK4g8xf5/SWmzG1QJC30Rtf49TKaVEwnj ty2A== X-Gm-Message-State: AOJu0YyLB8/0PMQh7jeagpQGRbw4IlFOWdfBSpUeclNPNPFHDDxEkDIz uZmrkvmO6FOPPuxiRcBbcxz4zpujLMHZ2FNlFKRVizpyhHtLLm3szB123s/BTg== X-Google-Smtp-Source: AGHT+IFQh4FaJ+1XI2IdQ76ww3xRTWTulNHZ3WBhfnSPiasZomtas55CswgU5xylWxHtrHsOrzM/jg== X-Received: by 2002:ac8:4e96:0:b0:42a:87ff:4b0a with SMTP id 22-20020ac84e96000000b0042a87ff4b0amr4978445qtp.99.1706407944870; Sat, 27 Jan 2024 18:12:24 -0800 (PST) Received: from denia.c.googlers.com (240.157.150.34.bc.googleusercontent.com. [34.150.157.240]) by smtp.gmail.com with ESMTPSA id ka23-20020a05622a441700b0042a98bf0117sm568061qtb.78.2024.01.27.18.12.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 Jan 2024 18:12:24 -0800 (PST) From: Ricardo Ribalda Date: Sun, 28 Jan 2024 02:12:22 +0000 Subject: [PATCH 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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20240128-fix-clang-warnings-v1-3-1d946013a421@chromium.org> References: <20240128-fix-clang-warnings-v1-0-1d946013a421@chromium.org> In-Reply-To: <20240128-fix-clang-warnings-v1-0-1d946013a421@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 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, Ricardo Ribalda X-Mailer: b4 0.12.3 Building with LLVM=3D1 throws the following warning: drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_fw_vpu.c:38:32: wa= rning: cast from 'mtk_vcodec_ipi_handler' (aka 'void (*)(void *, unsigned i= nt, void *)') to 'ipi_handler_t' (aka 'void (*)(const void *, unsigned int,= void *)') converts to incompatible function type [-Wcast-function-type-str= ict] Signed-off-by: Ricardo Ribalda --- drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_fw_vpu.c | 6 ++++= -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_fw_vp= u.c b/drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_fw_vpu.c index 9f6e4b59455d..781a0359afdc 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 @@ -33,9 +33,11 @@ static int mtk_vcodec_vpu_set_ipi_register(struct mtk_vc= odec_fw *fw, int id, * 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. + * more constrained, so the conversion below is safe. We use the void + * casting, to convince clang with -Wcast-function-type-sctrict that + * this is safe. */ - ipi_handler_t handler_const =3D (ipi_handler_t)handler; + ipi_handler_t handler_const =3D (ipi_handler_t)((void *)handler); =20 return vpu_ipi_register(fw->pdev, id, handler_const, name, priv); } --=20 2.43.0.429.g432eaa2c6b-goog