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: 13534333 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 3373FC47DDB for ; Sun, 28 Jan 2024 02:12:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :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=ALbxC4QenArxmPJtUIPYfqSlV3sz14d00nD6G10X98E=; b=tZWEj/RngLrHqW rK4mWOOpBtiq1z3Dd8ynYqEHN94TaGBH0dXIbnbc6EgzIhlVPgn4fFcdyPavbIvmOmyMu1Ioru42y IXvHOxGrKUm/O0imrpNWe0Khd/Ppr0Xc+zw5EQCMR5jxZpCUgHsUJXziLgokPlHXZqXx413cW2Bkf S8U+35vJpYvdLG02nzGj5wvfsoK7de/mX+VveCmRtyRst/OWJAVQ454mq4L04o0Mrl0M9q8SqwIx1 F9AtVoOpiQS1kAo2UvgJJLZDzrXs5BwTzGNnFQJPFARP+1K20/DpeIfVLkUgZFMEzkoBqDinytZQR bGLdnmt+g8K+ibYiS4pA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTuf2-00000008ZUh-1lGk; Sun, 28 Jan 2024 02:12:40 +0000 Received: from mail-qt1-x836.google.com ([2607:f8b0:4864:20::836]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTueo-00000008ZNq-41At for linux-arm-kernel@lists.infradead.org; Sun, 28 Jan 2024 02:12:29 +0000 Received: by mail-qt1-x836.google.com with SMTP id d75a77b69052e-427ca22a680so13330391cf.3 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=bvdmFeLQlTniYiEORPqVMQEHES/cJkqtxi1yVj0TcKvP5Nw1D+gwZ5X2kbWYcEFSI1 lBR8Cx1gnwD4C8JkxSkNvgDnfw/zzLyLG1rDEZjpW5/0mPpQ/tIHj00ADiOCdmjX2Z6K KCx3EuFAYNd7P5qG7Qp5T17BlL1PKf3BgVVOBxwBUrOMD38shEibIkB1brpy0Lyx97VC m9Ar3rHJHUzHVSeJNqWH16O1RxyCwfa19zgBmk7gQU3dP5M6ie8ZcVPXBNWw25E9nO89 InbHWiMh/CP2pd5hZ4fc8MTIvv1/zi15ncOGTVOZQwX9o2jDwGLWEsd7op5urtVWjWIp zm9A== X-Gm-Message-State: AOJu0YwCT+pcJnvmxXMItG71NNCCxMr/OdDp1V8pLUc3Y1MOlA5rLObW /17GgZ304IY3PS+AzaNBmGpqjNCBahcGs66tVuhmTE0VkTaYLiPAl/WFtXS0bw== 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_181227_080808_287CFCB1 X-CRM114-Status: GOOD ( 13.65 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=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); }