Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp2055487rdb; Sun, 4 Feb 2024 12:56:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IHDHyfPCLngVC808OjIjJkAwsPb7y6tg2MnKZBjzm0A34q9paQ/SxECo4lxZ5dPCOuencfz X-Received: by 2002:a05:6871:3227:b0:219:54a:862b with SMTP id mo39-20020a056871322700b00219054a862bmr4995280oac.8.1707080163026; Sun, 04 Feb 2024 12:56:03 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707080162; cv=pass; d=google.com; s=arc-20160816; b=zaikgGDTz6ovwbpdOGGY3NW6UQBRW7sV2GWHxwpkuEsXeQjoKX5A1+UMpR6F+FcZKl EgST25ZCdVG74vgSv8MqtwyIgUQaqse0cImvqNBv6BKXT7wEvTY6AA37MH33BOQ/k2Dp PiEEMyARTXFUrqxO3KXsOHzH/TXp5WFjEsnux7vJFQsPe28/zrKT5sxHYJUc6T5ZG7mk xchNN8YAFdyA4yTynfAGnK2p1fQ0OrFFxhf2xj6TiTeCFS/Ga3Ur3udZRy5TPWIGXsrE dAh8SF/JQGEjid6cf2y+J69kBxUo+eyaZilOGIYzbzOgs7/MwQ6erqkkbaP0seA6DfR/ Bf+Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=5r8gZWB9PZBWbuM0o6LwBJ5QkUd6Z8cYpWt9Zy+KEwE=; fh=2lzmYwFVG7xM2LocqGm+tddSVIldxYLvwm2SieYugRE=; b=q3fzlxbmsl2Qp6dtT4ees6cbWtkdLwc/ts6D9sr/GrcTzdFZ7HeC4K//qxTdd3+n+Z xKWd0scUbBy3F7AkYDVRaZtVKt7yMQcAgpCYI8CzJCdUqYtVhVLF4eju//zp1AaN643X D1Atq6Vfhz8snqi0UNFaRlMQDUYssRpeZ+mWPZOG/olkVdy/2AoA1iIEEZ8iGEvumqCd RvXE7PwpObP52K3yvAcYdOzO7usqXfjEY+ehNWLC4ZJcspDlY3TwdhrTx3XGfkgyvvn5 FQuktsfEpvZx1ZFmHkPEshnskfzagKrrRqdkJHhxDxLGxtGDTQyzTj+QwbTnTz7+I5Ry hwpw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WeVbqBWF; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-51898-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51898-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCVahUyjdt0B2XvG249eU/tDbRarN9hfItFSGhkcJlD5P8MDJ0wkLB5zwXMBic39rh0bI5BjZ+PN4Y8tlSIPtkRqVgQ2rzJIfA6H+hj8rg== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id p188-20020a6342c5000000b005dbdd08de09si4873929pga.556.2024.02.04.12.56.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 12:56:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-51898-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=WeVbqBWF; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-51898-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51898-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 AC37E28332F for ; Sun, 4 Feb 2024 20:56:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 859D2286BD; Sun, 4 Feb 2024 20:55:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="WeVbqBWF" 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 A789525565; Sun, 4 Feb 2024 20:55:52 +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=1707080152; cv=none; b=ajlBpnQRyskSFxNuvLtjc1125lkKDeBvAIPsnXsuVmR3ZgUaZxFtSUFy5jFCDTcvyjzzuB1ldVa1W2bmVFiZOw1IsNS7dqUtistFjUlGWPODWV+JcOkZzPWszrA5Ug9Ibulv5eo+XGGCKsOIDSXkBDF3YLjER4vFvym4gDBLKuE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707080152; c=relaxed/simple; bh=nP25hJvCpMad5PlXLZIYw/Vb97I4Hz7shBB0Jia5HHc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=sg7OQTcRuzOvcU7bYevtGEKlaqTK6O04HFmba3kWPtaWm+wuTF+09Y3qg+icxI6lZiC3mXt0dZvtRslzSrs0zkgWLoilD6Pgytca7sj+DgLOPSkXP8Jc2OLfryAJvoU/wz00EBzrc9j2aQD28HvU7Nd76hDfXxD/4uVeRs2okPU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=WeVbqBWF; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2495DC433C7; Sun, 4 Feb 2024 20:55:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707080152; bh=nP25hJvCpMad5PlXLZIYw/Vb97I4Hz7shBB0Jia5HHc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=WeVbqBWFFSYNvQZJAL+NQMcCXY6OwMBTTE+Q0NLY7n4AfnQOdXkGtZ6QLR+TdOvg7 So+KSD+O4OYvex427MVujDNT+Nu77npRgycQ4IZu4JYgBNpdjM9U7+oTmWd2ge0VQQ 0Cqjxcgd2J3x23LqZdBLVuOhdl69Yr4jKOPevXxG+EGAa0EkOQWYFqK0+xwa76gLRA n2Q4d8Jc+6lcIEfOiEy3fJtAP60haS0FrWxYfndFik7Z3/wUttXh3Rr6CYNvFShnbB VTB992+rERfbjt+b/wna+D6GvlFjJ75tXtGa921WcrznHj4NqQ1RRonAN0T5m3mvHo eJwyRTe+X3zkQ== Date: Sun, 4 Feb 2024 13:55:49 -0700 From: Nathan Chancellor To: =?iso-8859-1?Q?N=EDcolas_F=2E_R=2E_A=2E?= Prado Cc: AngeloGioacchino Del Regno , Sami Tolvanen , Ricardo Ribalda , Mauro Carvalho Chehab , Nick Desaulniers , Bill Wendling , Justin Stitt , Mike Isely , Tiffany Lin , Andrew-CT Chen , Yunfei Dong , Matthias Brugger , 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 Subject: Re: [PATCH 3/3] media: mediatek: vcodedc: Fix Wcast-function-type-strict warnings Message-ID: <20240204205549.GA2892810@dev-fedora.aadp> References: <20240128-fix-clang-warnings-v1-0-1d946013a421@chromium.org> <20240128-fix-clang-warnings-v1-3-1d946013a421@chromium.org> <20240201221654.GC2240065@dev-arch.thelio-3990X> <5658ec37-868f-454d-a149-467e6de139cd@collabora.com> <12d0c580-788d-4466-af8a-feb5ab3c6677@notapiano> 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-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <12d0c580-788d-4466-af8a-feb5ab3c6677@notapiano> On Fri, Feb 02, 2024 at 03:15:46PM -0500, Nícolas F. R. A. Prado wrote: > On Fri, Feb 02, 2024 at 01:58:05PM +0100, AngeloGioacchino Del Regno wrote: > > Il 01/02/24 23:25, Sami Tolvanen ha scritto: > > > On Thu, Feb 1, 2024 at 10:17 PM Nathan Chancellor wrote: > > > > > > > > On Sun, Jan 28, 2024 at 02:12:22AM +0000, Ricardo Ribalda wrote: > > > > > 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 > > > > > > > > I am not positive because I don't have any hardware to test this driver > > > > but I suspect this patch is just hiding the warning without actually > > > > addressing the issue that it is pointing out. > > > > > > Agreed, this won't fix the issue. The correct solution is to drop the > > > cast and change the handler type to match the pointer type (i.e. use > > > const void* for the first argument). > > > > > > > Even though I agree that the correct solution is to change the handler's type, > > I think that having a test on the actual hardware done is still valuable. > > > > We scheduled a job on KernelCI to test this commit on our integration kernel, > > you'll get results for ChromeOS' tast decoders (MT8195 only) and Fluster tests > > on MT8183/8186/8192/8195. > > > > > > The results should be available in a couple of hours here, relative to > > commit `49955a84129dbe1f94fedf729690efcf28513828` on our tree: > > https://chromeos.kernelci.org/job/collabora-chromeos-kernel/branch/for-kernelci/ > > > > P.S.: If they don't, feel free to ping me or Nicolas (added to the loop) about it. > > Hi, > > the results are available at > > https://chromeos.kernelci.org/test/job/collabora-chromeos-kernel/branch/for-kernelci/kernel/v6.8-rc2-3109-g49955a84129d/ > > (You need to type "decoder" into the search bar to limit the results to only the > decoder tests) > > The only regressions I see are due to infrastructure error or broken test > unrelated to this change (v4l2-decoder-conformance-h264-frext test on > MT8195-Tomato, and cros-tast-decoder-v4l2-sl-h264 test on MT8183-Juniper) > > Otherwise, all platforms (MT8183/8186/8192/8195) and video codecs > (VP8/VP9/H264/H265/AV1) seem unaffected. > > Note that these are GCC builds. Thank you for running the tests to make sure this series does not regress anything. If possible, it would be good to try and build with LLVM and enable kernel Control Flow Integrity (kCFI, CONFIG_CFI_CLANG) to see if my theory that this is currently broken is correct. I have prebuilt LLVM toolchains on kernel.org but if it is too much of a hassle, I would not worry about it. https://mirrors.edge.kernel.org/pub/tools/llvm/ Cheers, Nathan