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: 193102 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2395:b0:106:343:edcb with SMTP id gw21csp757084dyb; Sat, 27 Jan 2024 18:13:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IEs+47ZUSVQ9qYv8obWRkB2J870YJlGHWGWQFIGv49qU11D3iCyON4vUWPf6iRM3lvxzKOL X-Received: by 2002:a05:6808:3186:b0:3bd:a199:cea2 with SMTP id cd6-20020a056808318600b003bda199cea2mr6210196oib.30.1706408020484; Sat, 27 Jan 2024 18:13:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706408020; cv=pass; d=google.com; s=arc-20160816; b=KTcihkcPi4fUMeb4J/0NatKrscoKkflpBLNn8svDk2cvttob06jLh8LaW8vKhTBwh0 4Mot8nYoSDVjRw9IDy2QBh7K0OmzKfTXnlAc1J+n2OQO/6JoE5E2JbJYzbKUL7IOwM7v G1UAGyFyLeuNBrYbAw3VcIGcNz/DWqSexMTEC+IwWJL+aXActw39Gpfm1xK8JdV+dD6I fuHiaOeweaW4jecuvKGj4n+f69jH/+jrqXnMiEm2DQ/eawX31yqBVd8mj4+C3uWmH1qq H3ROs0LfcJugfDBuj0bcR8Rid8FpzxoO7J9rzctw2NXki4flfkfEnj94iDWEDqvhFVQQ IWWw== 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=j3C7WQBZgNLZ3JFZZb+3FA3visUd8j+r0zGWZyg3Ybg=; fh=gnL8uShfXrBm11n/oB2cBj/6LDJpR2x+b96Zpkf7O6U=; b=iMtjmZiuoxLvA8myJwhLDb1RYXYhpX2nzQnJZYIxnY29Ipp6JupwCoMauhIjS2nA0Z Q6D9rUZjEj3nlJyJq/4KrJSsR1GWCHiC5zQCKPj2rn5P7zaMJp00ik6aBQGGIAeqJ/6b D49ETAhHqmqrU/wW2wg+u1dS7XQc1dAENmPszp27FHPDWOhjelWrilFICoT9Rs2tBDeL uSKY3zsPdjWkYLUyO5BYNQVjhaxmXLmBK99HNWHRa4t3SfdHHO6yoTyLBIhq4DYrJeEW zl9tX7Fq20I8gSaR0/Cf9SvXXNs/BnA/GFgo3lf857p/oYpPd8G5Il0mepBDSY80RnFG d3xA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=cv1kF7YQ; 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-41499-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-41499-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d17-20020a170902c19100b001d737fce309si3502371pld.536.2024.01.27.18.13.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 Jan 2024 18:13:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-41499-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=cv1kF7YQ; 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-41499-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-41499-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 1DE9EB22A82 for ; Sun, 28 Jan 2024 02:13:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2FE5CDDDC; Sun, 28 Jan 2024 02:12:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="cv1kF7YQ" 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 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-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 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-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789298496312877889 X-GMAIL-MSGID: 1789298496312877889 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); }