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: 193100 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2395:b0:106:343:edcb with SMTP id gw21csp756972dyb; Sat, 27 Jan 2024 18:13:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IHpP4rNQOeP0bawVNQKltL8R8519BqVbhtQqcrgW54Tj5n5YlAQr7263B9znR+5P8HBFYuZ X-Received: by 2002:a05:6214:acc:b0:681:30e5:1c5a with SMTP id g12-20020a0562140acc00b0068130e51c5amr3269511qvi.110.1706407995954; Sat, 27 Jan 2024 18:13:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706407995; cv=pass; d=google.com; s=arc-20160816; b=FD+5QYPRlMitzQxbt0qgQsR/1tnxP2IFBctnw/BtR2AX9tHX9KrknpmpjC1dYIhWAg V5rEidJPfgyVEo3PLxQGraepg8kbf+DYC/zRxDvXZSB6547Dju5Cdlpe1ru7J/s5Edhl CR/+jZb6GDs2Kg0wAHNZAykyKWzNC6wZFQsHQcTj7WAn2OvTHn6CkHlvkVJWH4kc5vuZ o1omyddjbaK5J+eH1cFKdjlbpO6BO8Gh+MX9FNUAnV/GafJ6k2LmO4Bmo2WBeKmyIl+E baEOAyh2tQj0j5NXeJZZa2+NLno1QB3kZ94c0w3z3ggKdvb9/rtlcpshgIhmKFqlNZd4 bSFg== 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=JJ/tXyO7amkyPth0LbHgT/YZ0y8KfOoM1IDJtLvky2Q=; fh=gnL8uShfXrBm11n/oB2cBj/6LDJpR2x+b96Zpkf7O6U=; b=h6vx6KXbyCG8Hvz1p842cGMAGsTeRcOlOvbdj2YFoyu7oyt6ontaLj3/KMOCPB8x/0 Fo3z9Uy+0WJ/K5bUN3U1lT45MoNjX43yVRKEL/xyJl8zkE/cRqf9kgRhGdEmRU5cHibM zMKdDG3IjHzcjaFT5aVQMInkEu0IszZyhXREJSntEvWxiuhGRkUigWTkHUIZ3FZmuMIG ca/w3ITHtBaaofC20qFyR0ETLiGDerGlF3CHuCwmuDcZPWJrivsfn5+hRlbOaf6f7fO0 r4h488/o7RDsU5KLaDuAFuncwcJk+zepA/44YjfRWAKEwaDJDVnz5vrIh3DGQBZdiUSP jYTA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=gBOPEVmy; 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-41497-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-41497-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id jl7-20020ad45e87000000b00680503d5c6bsi2944315qvb.149.2024.01.27.18.13.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 Jan 2024 18:13:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-41497-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=gBOPEVmy; 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-41497-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-41497-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id AA0E81C212BF for ; Sun, 28 Jan 2024 02:13:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 037F5BA3F; Sun, 28 Jan 2024 02:12:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="gBOPEVmy" Received: from mail-qt1-f174.google.com (mail-qt1-f174.google.com [209.85.160.174]) (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 9902A17C9 for ; Sun, 28 Jan 2024 02:12:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.174 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706407945; cv=none; b=KLV0To42Bgxef5FyAyWi3grf68m+62OgxgfONvTa+//0/bsgcIerMWP38rdIARNUaZtigPDRCtK5mSmjie/VYZJtBT4knOxIiMK7/2qXTHkpCV06HQuspv3Jf6ejzJSXI6/r/yz0rsb9ILprOWBcmV3A1wg/j+lXhx7rZv0JHBs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706407945; c=relaxed/simple; bh=Nh29uFhKJi602G3prs8tELRuSaiBp8xa7lI2rXd2Wvk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=iTb2PIF7hCxnUOIUTXQAr72spFW7b/pBp5MpVlx/VL3yosNk9e1Dow6+ZNqxC6HElZz0dGTWrPiNvEWn/RsOOfLdYWHBnVtPMcxSyVP+7ZL2AcQ1N+mtGyXF80/H40RV2I2AJl7yH3a6WpmEM6p5xgr34b97y9yRefWmO9EWyaY= 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=gBOPEVmy; arc=none smtp.client-ip=209.85.160.174 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-f174.google.com with SMTP id d75a77b69052e-42a032cf012so17548431cf.1 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=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=JJ/tXyO7amkyPth0LbHgT/YZ0y8KfOoM1IDJtLvky2Q=; b=gBOPEVmyjaXkTxEgfMbxFFUjQaKuhD4isds40+acoBqC7SPRB1DO0aJ2GZ7bhpnEyH EooYm6VU8gcx7Tic8G60asyR0LCtbk4S3zpCJpH82rikHnCdfnRD2L3+BSIL8CBKrCj+ XDgOgIgkTGG9KtO7k9uQs3RCtZwRidsEA95EE= 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=wsPUXTnGE1ge4pApXM1SjDBx1UmE1K2rda8Xxci3TfXqA/GzPc10/XM2qIvKt77mpy /R7EBt2YS2IS5+elpU+XCgAeGOz7EQTod+GNVx7dY0l8pmJL+y1WMHADEgmAEYSEfjla Q94nhyQ5l5i6zoiLxGpk8woLsCS2t7cww3gQM7EyzRB2VlA9t+srlOaAF85Jvfd9pANM +A6KOONCfOO2/MI1h9buJZ8UU3VA4J941d+7QbF0nPaIgWvfy6dR+vuVHyGXvSLpqKb/ OnEq6cEYvfpv3iYPXwR49MWAs1aMHs30Hbl+J4hFn/G8gxe1k4TdpCsJfBtP3t+erkCn 3XIQ== X-Gm-Message-State: AOJu0YyGiK5Szn1BiH9djLK4IBIRUVqsU3XMNn4dB7esjW6YMvtTyZJL GxX0A6mTH26B4KgKJWUW4hfwDT7Fykvb61lBUx1Bcw/lOJaXtsC5mPLC8gZ9bw== 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 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-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-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789298470897083031 X-GMAIL-MSGID: 1789298470897083031 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: 193101 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2395:b0:106:343:edcb with SMTP id gw21csp757043dyb; Sat, 27 Jan 2024 18:13:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IHDv8Xy9RnOd86gkeWBcmIjXmtZ3Ihs1XXdKdZocrSpRlnkf2usuLalHAZLr1SGg3zyqcRm X-Received: by 2002:a05:6830:8f:b0:6dd:de75:7fa6 with SMTP id a15-20020a056830008f00b006ddde757fa6mr3632068oto.2.1706408012571; Sat, 27 Jan 2024 18:13:32 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706408012; cv=pass; d=google.com; s=arc-20160816; b=UtqnxfP5Zt+x16zWllpA2Mo7Ljv83CzSHilY+AxpCkrWHU1KncPltfO52dDZpfVGtr Twg5+mOimK4XPdAHfJxCncJBP23LXOGgxZT7i0DxsrVmO/6CsUFDRgmI7VsXD7X0fJdl 7sgNt/VlBOmNMQV6IEv8d1ye0qjeJK3TY94z4AGUJIKecc3qWJpS1eumtJZvcWAcCAQf Kfv9nnDmOp4mlPb6MfyTSHvzbMt4NQ7M/zKiqtJwwmQs6zsWaz6MTVg2nYLblI9Isrf3 +LT4MoDLz85Grwzn4E35KR3yGFS4xNErn0Ff7lU9lWDtbQ+qyIz0+qBwUNDH2E2q5Nxa PUyw== 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=hOgHCV5E3Be30rwf2RnaiPl5JJ07/Dl6Wk4WLvGCkYA=; fh=gnL8uShfXrBm11n/oB2cBj/6LDJpR2x+b96Zpkf7O6U=; b=erfCs+nnh33CgidE8vnpr3r/+bV4IyFM2VKPpagS9K7bUpsH1F+cho9+Iv1dihIFKV LWG4rcFhpQ7wGI4fYhZhqL2jBHP4fN0mDNpadIQhmz7vCYxq4eVIqkcNGnHVJVMGPteJ sTEw8RUDZk2MX/WMXK08FkyA5mcT9QHVHmw8qiJ+FtdDh+q1UO6BACNkWhFM7pOoLthZ I+t6TB1D1+3yHzPq+H7eqm9jPviLAPKXs0kZ6QjhN8gvn5KPoVWW7ZnNzutF6Wv9IbIz /rvSfD8OR87lTvl5Pw5Gl6f1ddVu9IWY+z+kAiwSVkhxtg2ymSbMVy2g6rYELNFVREHb 8F0w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=TOl5Yi3i; 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-41498-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-41498-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id u33-20020a056a0009a100b006d9fac3a70fsi3612611pfg.370.2024.01.27.18.13.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 Jan 2024 18:13:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-41498-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=TOl5Yi3i; 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-41498-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-41498-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 51133283205 for ; Sun, 28 Jan 2024 02:13:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8137DDDAE; Sun, 28 Jan 2024 02:12:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="TOl5Yi3i" Received: from mail-qk1-f176.google.com (mail-qk1-f176.google.com [209.85.222.176]) (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 9FC9320FD for ; Sun, 28 Jan 2024 02:12:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.176 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706407946; cv=none; b=Xiqa/k3VUY79xRJRnj5151zt/hxeijjqFA2Bu9j+QOdKnQqjLZejHQ+Q2NIv2DbLhUlI+JmwuIUHfPBMjdNCKsfTAPESQkffTw1JHI6pucGSjw2dPjiuZh8ASB9KoBTTLqAXvptx9tZ9gic5W0bhbLyxxFpKCY0d1+ATVIby5z0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706407946; c=relaxed/simple; bh=xPQ0PXiX5n2Y4YbHy5UWYmPUAytuGPVlH6TYVkRD8Jk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ZxLOJIWmYny4zJsin41K7ScGw7Yf0iSJf79dvXklJGhZic7kdHCgO/cY/oE77xIvSSeN56ICtL5SBmvj4AC5Krmwn4GOS10ALbH8Uc9568n+S47grqNoasUdafqBmxHyyxOM2srO5TN38yhb8fdZeHz0GpzDSyatAimx4zNmrwk= 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=TOl5Yi3i; arc=none smtp.client-ip=209.85.222.176 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-qk1-f176.google.com with SMTP id af79cd13be357-7838af983c1so137949685a.3 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=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=hOgHCV5E3Be30rwf2RnaiPl5JJ07/Dl6Wk4WLvGCkYA=; b=TOl5Yi3ireZIuU/4W8N2tVF37x0lJnkVK6+cBxzEwFoeJKEWLk3xFo/ZUSUB8AXT1g R4GwkA75X2ka2hFlEywOIwux7IQTu9YlagmtqhphyNSHuADNM/QEGgEByecQo2YwhgZS FjbQbfnlRAjAaPU3C2XBUKYfPwnWHiYwLeTeA= 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=EmcNHOrC7zanJfc8AErqDdNLf7hlbO9E9v90SGnqgr4960EAdU70rReSVR/Qn7UstI mlP/5cP2BQdxLU6q9OypCShQBF7W+4j9BT5HDzhMICr6peILLaxWYn1vqMeBPYmMb6iR zQMOLsyoGCY2AzKOGT8UZGJ/ErdKnx4DFhn0icr6q0s3f+bZhtfPBf8+fWiFtLldpxlx yIeUS4R4arnbymzE8GUTVr3GWEeU071b9fyCzdG27xkRKlAD2JqiJuWwFkQqvwmwlX6+ bE98WwsyhPQfp3CR3ogttg7wHZfLa18RsaBV08hH4xEH4G37oV4UzJgO7l1gfje49M6b juXw== X-Gm-Message-State: AOJu0Yzja3CeEvuo8miu1PqM0JP6rNOuU2Gbcee1qmDKibdZWYV1lRVE kQoFeKDi8z/cW0ePM46+i9tBvD0XveQ970isbQ+uhajESQW1QB7RXI7go6vtAg== 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 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-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-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789298488191863204 X-GMAIL-MSGID: 1789298488191863204 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: 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); }