From patchwork Sun Jan 28 02:12:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 13534324 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F1694C46CD2 for ; Sun, 28 Jan 2024 02:12:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=JJ/tXyO7amkyPth0LbHgT/YZ0y8KfOoM1IDJtLvky2Q=; b=08PB1UHIRZNoZgiS4IdyY1zcrv VNt/MyrUd5/ZdyZ0cPh2MLnkRSnAStG2EmDgP3B+GwBsOyw8S0F1TMvjjv7WedQeieba91SrhlP7P XRUhsScxlbz3Pk5hXfbW0m30YDxaJWuTUCY7ZiUntOMikX6NTaM1/8If82oKb3UcRZOTZv1pZTZk/ kE0fZIpF0HTjXvyVW+AELJlCN3I0T7/MhO6GhhiMCtij0tkxyUt6sf4PCV38jcZzGNgRIpJZL2NMc VxkrFrFel7+EtrRfz0HNaajea/XnshybuWGlG8abpd9xOi8wGwr/a3Y4Go7wCbqxS5RsXN2U5GDkj tZTTCEOw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTuez-00000008ZSl-2QJX; Sun, 28 Jan 2024 02:12:37 +0000 Received: from mail-qt1-x82e.google.com ([2607:f8b0:4864:20::82e]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTuen-00000008ZNK-1BMH for linux-mediatek@lists.infradead.org; Sun, 28 Jan 2024 02:12:27 +0000 Received: by mail-qt1-x82e.google.com with SMTP id d75a77b69052e-42a99f34cc8so2795271cf.2 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=lists.infradead.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=nMx8w1pMV9H3PhHIncCNqpQhQhY5TNp1Ms1IaawSVXWh54FvTpOcaJQH2IxxdLD/Zi M3kZfeeA/S5vGfMrXxIPjOSev6xLW3w90ES/qyLcvwArxODPF9J5N9MwovApAEyn9yrO bzZlKBVcpV5dyUrJOrKGYpDtIm/+XT2sNX0Ns= 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=m/tyKi4NkAN+d/cvFlqTv1z1iYyJXkiLwFFPj+yv6Nt2IbgTM9SKepAzQvnDX3St3u HOf0FIOQqsdfQ1webaIxEuRbLC6OWBVqSOE0lXWHh4Z9w7Pe2yhCK1Kxk6Uq/MTB3rfO Py8t+oAqpQy7mE9uMtilQZfYkuhPEXyjLeNdeWJ3lCFy472eKIpYTM2pJYHo65Xagjcy 7SPlNoCEyja3AhQhOKhJLNOhb83QnBPjx6G7vCeUUB/M81LJkeMJWiR2rmEhPqEt0rn8 xXAW00QYpAOUt6sdeSf4A/pRvcWoBmq5K9DDioc79UDLjuJzgBwMjoOOtpupJJPLS8tq u1sg== X-Gm-Message-State: AOJu0YwRYgeBJw59egTcxKh4n+DINHWSpil/ht7A1DQiMHyXFqu7ydJT 3ky2XAQwS/0zpWE5HYMcxe7v5z7kSusXhk7kuODpRur/SFc4isRnL5lr2BLUmg== 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 MIME-Version: 1.0 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240127_181225_387075_2385B9D1 X-CRM114-Status: GOOD ( 11.30 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org 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] 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/sta2x11/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 = { /** * 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 = { * * 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 = data; status = reg_read(vip, DVP_ITS); From patchwork Sun Jan 28 02:12:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 13534325 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 87232C48285 for ; Sun, 28 Jan 2024 02:12:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=hOgHCV5E3Be30rwf2RnaiPl5JJ07/Dl6Wk4WLvGCkYA=; b=4UL0BHVMnzXBRkb8vbZF1uGYp8 UVNz51mc0eIiHWMqVGdCEh0SpEhvrKEOidzu/hUQ1PYlLpcoXK5JMjMtaQRX4hZ5ILaT0Fi5MhEEd ZpI0ZJd4LCknVgoB2EpxtzKoLRorrwFINn+FceM/czOIAdxTxJ7S1O8MG+fUqCr69h2CgRFzHdFaN RoavvL8rWOJ+eblFk+EnKaCE7QYgrhwKq10aaU8efkBvalMZ4IHxeqaUSgWDkkfZuVC5e1inmVx5m jgvfXHdtAACKiK938CshIb8yC257svPDNQH09gQnLvkN2hPxWSduFRspXGzi/cRjcX9YDSpsYJPht MQGyvDpA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTuez-00000008ZT8-49Rq; Sun, 28 Jan 2024 02:12:37 +0000 Received: from mail-qv1-xf2a.google.com ([2607:f8b0:4864:20::f2a]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTuen-00000008ZNO-3NNL for linux-mediatek@lists.infradead.org; Sun, 28 Jan 2024 02:12:27 +0000 Received: by mail-qv1-xf2a.google.com with SMTP id 6a1803df08f44-6818aa07d81so13007666d6.0 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=lists.infradead.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=WWz9Noqe5Z+7G0FvfRmqVJ1XJytr16ncTT4K7a0ARGSJ1JAhrFeZMh2sQkb2gCTMsO mKdQ2dK8cddTaRiK7Km76NVOw/zJjCoNke8D7ip+u4lmpga7nOhWvBvEF1Hrw5ZvWAyT /BsCbqGL79+JxvLVietUkky9RG+BwtKKfqi58= 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=GLxFp0p1PfVuOd3riDm9oQ5iHmD716oqI0CV/UFY4IZi8xBHjr/eSJvf8sLMbGcXCh o6GNZJ+oN0+zJD6XsedkXDFs4/qSB1q2jB5D7zM+SwXZ2paMHFTYJzWeBjbjO8K3NegS Mi+rUwLXHPCMsEPrNKwveUeRAOOR54h3cUvdQXIqXggdJewBtAby6W6WdDHOzgB0jtBC VFFQJy6ka9xeQgujuqXKHnR08zQwk8pbB8cq9vee/01KTlEm4vsun6acMp5vzhYCDCkq l+FwU1/aycVL6t9fgkNGZFagi0FWRDEEdh6lXh2oCTPlhAqprayinoi52fMABkCsJU9m HbXA== X-Gm-Message-State: AOJu0Yz4BSp/ebOQcK2H0eFzrwTKMFeaZhIw4ZEQ2HOV8xUH4reSn/B9 sJz9p6dQ+g+zyF4hlaogbNg56v6joBxBsKJPteE0mYG83rLSrEA8z3/ZpK9VsQ== 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 MIME-Version: 1.0 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240127_181225_895178_98869BE4 X-CRM114-Status: GOOD ( 11.29 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org 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] 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/usb/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) } -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 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; } -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 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; } - -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 Sun Jan 28 02:12:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 13534326 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 13699C47DDB for ; Sun, 28 Jan 2024 02:12:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=j3C7WQBZgNLZ3JFZZb+3FA3visUd8j+r0zGWZyg3Ybg=; b=Lnyemfoat+zXHyeTgg/A7LOW35 SgSV7UIwyEa4HdBFAMv+shymKE9+uizwqUUIdupEygvJNxcXuHd66JIQzo/S73t8lxb1C91gdZDIo ytVhJK1NkXfHg/v3vDeFsoENEIeTFA9CupOuTVgM45cn7SFQGNzS0UU/8EdS7UlPzX80lG4m9PK6l Cn3SRrn+EXkNcUQZxZmWzvmKeX7PsU0cY7OhE+UErAvYI6r8CA/RFfLVNrFd9Yv6s+cqX6y/byN7a KNGjHZoPCfJ9MvAI2PUG5N3QKiIznBjTkueGXFRPzfLz4XHgUabpnIJC/BNl13rlq4fcnbyb1OIMq /D9f9nXw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTuf0-00000008ZTV-27eW; Sun, 28 Jan 2024 02:12:38 +0000 Received: from mail-qt1-x82c.google.com ([2607:f8b0:4864:20::82c]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTuen-00000008ZNr-2g8j for linux-mediatek@lists.infradead.org; Sun, 28 Jan 2024 02:12:27 +0000 Received: by mail-qt1-x82c.google.com with SMTP id d75a77b69052e-42a8be32041so11059911cf.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=lists.infradead.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=f//2QNbxvezrS9cvKJBN2G3vCcvW/rCMO30F2ktXn3im7NTwKnuqSOJO6t+XokBwNM tqyHk0r0GvE6gjNxqhN3R/095NFVLngOQu7rM6qYRm7oiEWJGUqyxE8hagFwtJyhRW1L Bkgef5kya0hdtqZLz/F6hOaA6tG2ZdsAUNQsA= 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=Ez/18kbtvEezW0cOdwFkMwPvzxckf6iibGTu623AmEXXdg3mx2E0DBUTHJVQnmuxGA sBz2tPq0X2JhoEyik+DLXGj1b1GuVvYk1XwiNETy+gSmHnzglO1yT2w8OcP6Dxq3/h6T 0opHhkPk8UDiJ97kpRQid+PVlh7aMzo23jQ7R2UMZjEyl2M/MO2DLNtHk5nB2GZB7H3U j2zUBAUi51TvSlsSxUQ88Qsbip77jM3VAvda5DcTrReaodFbmJ78lHG1eBPNNU2c8L/a dDUgYZnFEXwhkSMG12y+kUylIIyg6w9jnK0IbkIIVjJNMz39O7mrU2rEw7uOb3VeP/s4 QFlw== X-Gm-Message-State: AOJu0YynpJMVxGTWsRwGwH9m+CiBqBfTU0nDTvZ/tolS/9OiN13hzyJ7 syeS6TRAxOZ5zAKT2EzWKLvhrBaGdjByHOGkvunnTm+7fRmtA6Ky7dFMxqXWpQ== 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 MIME-Version: 1.0 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240127_181225_733473_2B017040 X-CRM114-Status: GOOD ( 12.38 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org 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] 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_vpu.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_vcodec_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 = (ipi_handler_t)handler; + ipi_handler_t handler_const = (ipi_handler_t)((void *)handler); return vpu_ipi_register(fw->pdev, id, handler_const, name, priv); }