Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp809436rdb; Fri, 2 Feb 2024 04:58:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IE/EOOWfBqOy8D8KezqMV2FPCqOZ4SkcSkO34sIJoHMS5oAnVOHCS7GZOfb8MCS+azISbN7 X-Received: by 2002:a0c:f083:0:b0:68c:7c38:6cd with SMTP id g3-20020a0cf083000000b0068c7c3806cdmr1504572qvk.36.1706878708112; Fri, 02 Feb 2024 04:58:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706878708; cv=pass; d=google.com; s=arc-20160816; b=l/fOw1idatT1YbTVlS4pNFPK7CzFwf8Mk/dlx+s3txT2foH8/ygx858yaMaZcAsI8k cHVA+rnRcchqOt1QM+ZHZiasI6y2q5YvsCApf0tkp4S9VoHHnOJViNn/mkurOIk+U99B rE+YpBfHm2MN8tG1dQyfY3ZkEA+7I1/2RGYxK/vFzI5g7LQm4wpDpdWz+VGcmmiiymXw 5E/popoiIPyufKRc5bchejN95S8M1QTZdgqKhGTCJq8yDqUoA1ezAv+VuVsmsX7kOJzv DOwV1ISmDTiqZ8Pl6RJQj9AaEA+VO5lctghncDrvGehZ8za0RptTVWhrsGw8NQ5Gof2t 2sYg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=t0l8YfnAKEx/FrBGo5s3bgp4D926rL9rDO7ig9PaGrw=; fh=+5kj+xoGO7EdbnU180KCQfjsY8G2Sl/wZTkr7vsYXWM=; b=gTZeXHa3ZxFrPyXjbmgFvdWVGYptcoaAUCSmyHBRU3bPKpeXM4HRUf0dTU8H06755y qsURRdu8rN9ElE6DAE5fz8y1nf0vTkDJE/OIoRdPVYLtfBIIg7/24iUzgrdHqgmOxbWm jvkYXtjxHJALslsp2Wnejeh9guzhnKibvPI+HwGvjyHALApJCAQTfVom1h5U3oDrW4gv Yc2czJosULgGTNe5N/798I4K6uvNobhecudjCYjeGTBWpiv1QWSzx4han9CMuHsps/2v FQN2iil3k8n5cme8iOryinL2DzSrBOhIZmU+iLa7xBEQYsB7ye/3zyTfVnLBds3wUk0G ModQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=XxK6AL0R; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-49872-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49872-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com X-Forwarded-Encrypted: i=1; AJvYcCWCQ7UerfiXIwk22HKpYQiXfrfx41mDTczIRRhmfKOOITA5iR5Qfr2x4qrTE2KRfD+tV1+RWf7S2D/ZCsePWwSW2/VZcj61SVrPXVudFw== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d14-20020a0cfe8e000000b0068c55772858si1894347qvs.131.2024.02.02.04.58.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 04:58:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-49872-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=XxK6AL0R; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-49872-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49872-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com 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 D99151C24A1E for ; Fri, 2 Feb 2024 12:58:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DB8C2440D; Fri, 2 Feb 2024 12:58:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="XxK6AL0R" Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (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 7B49846433; Fri, 2 Feb 2024 12:58:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706878692; cv=none; b=E8w3EqTg2/dP89LbLRsCaOwZsSzbOQlxjgO6g8pBc3MMq92f+WbjIGSwumg7trfNX1IlTEoGivyOPz8NgQ3dSbuZhSuHuAP9p725fBhsPFFkUXRILuq0kiLBuuOrRH+ul/4SYwf+PeU+WneLY7iPbqAXP3SLix5sTO+HD80wTFw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706878692; c=relaxed/simple; bh=eZxOtydVn75KlLDsjhljk2E/9by5DLKsxQBgEm9BoA4=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=eQyhRajEr6mw3VSHng6PaLiYiNn8NY5n1jmO7OFr3VmH/iy36hvFbpVJYiHCgmmwK91OwgwToiuiDAzZzm4fgo1bIjj585URkCjb49LfxRLcUMa9H8FlEsK9N0YDSRgk0fQ9H8pd4t8NsYaKh2XIilkemlzbtcGDqc3ukcnBlvg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=XxK6AL0R; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1706878687; bh=eZxOtydVn75KlLDsjhljk2E/9by5DLKsxQBgEm9BoA4=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=XxK6AL0RPCUwDZCkOln4QsiMSxSV+V+FsoLeSFodim/VeGCBa1gRurxBCEurJn9H1 M2eGLmZ+8wJVHWBjjDGOkpEOaya0UT3PXQi1F27UH0gXzNGRVlOL4c/Cez0pazK5Rr d9cB1gGLUlMHG3kODLG+Gi6kn012YCsOX8O9kqZ/jGxnF3UgCGRr0Vn76qmqgatdU6 5JZ+kROqn3LJvFe9To2ze9qVVshRt8ZPYqZQBDdxr4afC+bq5B5knr2nVetBzsmkTA /28LyP/bnxgLvhI5Kx9TFGvU4P2UVolG0oliYpt3Pt/ApMa4UW5btQsmVeYAJpdc/k QYH8MpJArwguA== Received: from [100.113.186.2] (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 79E863781183; Fri, 2 Feb 2024 12:58:06 +0000 (UTC) Message-ID: <5658ec37-868f-454d-a149-467e6de139cd@collabora.com> Date: Fri, 2 Feb 2024 13:58:05 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 3/3] media: mediatek: vcodedc: Fix Wcast-function-type-strict warnings Content-Language: en-US To: Sami Tolvanen , Nathan Chancellor , Ricardo Ribalda , =?UTF-8?B?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= Cc: 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 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> From: AngeloGioacchino Del Regno In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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. Cheers, Angelo