From patchwork Thu Dec 8 14:19:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 13068462 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 F360AC4332F for ; Thu, 8 Dec 2022 14:21:44 +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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=lvv7wyaJRxemvQrHvCUNdNpGOCq7Vlm9qTXvk15SZ1g=; b=jZ0MQU94fVO9z6 6PpUxgIyA2/1IQEkIs7Fbts7cdTsGOEB0I9mAg4BZaU1atOTG5M5oXT4ueTH9KTsaWqlAK6FcIC95 +9PM+mimB5AbOiX3DAawjFuZxkqhj5U7YzQHes4CVRgkctrA7jcYeTlydm1dYli/scR931Jk/owch g1WhHn3Ih8ZNre0pZtHay0ZzN+CjfXseYIQlFx/hkna5KABArwuIMv/gjL/QnaQ5M4PepPQ1kmJfQ NQFVAOCPIWNA0bPAa/Wo8rEhkEFy0R0P1IIXokBTfM9RvBWrpoe4eQGP9jX0ZdD+/WZOVEDCqloMf ojCVHai17bkMLyyem3lw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3HlK-001lpA-Lf; Thu, 08 Dec 2022 14:20:34 +0000 Received: from relay6-d.mail.gandi.net ([217.70.183.198]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3HlH-001lkV-S2 for linux-arm-kernel@lists.infradead.org; Thu, 08 Dec 2022 14:20:33 +0000 Received: (Authenticated sender: paul.kocialkowski@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id CC93DC000A; Thu, 8 Dec 2022 14:20:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1670509229; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4H86cqUfo0veX7ajDKOvCLkZuNLK31VBo7MemiXpJog=; b=SE28wRoJfx3NxPUQTHch2c8hS6doHhE3jLz1I4oUI/wSV07e3fjfI03JjoiARh+xttgJQ1 56SGF19BmGFfw/0NXpIFIz2UPlhPUGQnk1sEXiEbfODkQ1VZjhiIgmVcpGYs1OnfrSVAaZ ZoeS0lZ65JVcD2QEcKt1hDWzRsJm5c+jY2G9ACM9WuQXJ1ACqmI+81Rq4pZxFvrvDrZhCP BtRKbXvZAr5xQxSAPAJbhTzgXpTV4pUuWVTVshNmCkfvebTiUycyV5VpRIy6pudrqg/v91 EZORjFCoQz4GAVPpNbbwVHB4VloKy6mZgU3EUA10pUISz1vgeQyXi0stkUE9kA== From: Paul Kocialkowski To: linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev Cc: Yong Deng , Paul Kocialkowski , Mauro Carvalho Chehab , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Thomas Petazzoni , Hans Verkuil , Sakari Ailus , Conor Dooley , Nathan Chancellor Subject: [PATCH v3 01/12] media: sun6i-csi: bridge: Fix return code handling in stream off path Date: Thu, 8 Dec 2022 15:19:55 +0100 Message-Id: <20221208142006.425809-2-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221208142006.425809-1-paul.kocialkowski@bootlin.com> References: <20221208142006.425809-1-paul.kocialkowski@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221208_062032_217171_8E290655 X-CRM114-Status: GOOD ( 11.99 ) 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 Explicitly set ret to zero on disable path to avoid a related smatch warning. This makes initialization at declaration useless. Signed-off-by: Paul Kocialkowski Fixes: 0d2b746b1bef ("media: sun6i-csi: Add bridge v4l2 subdev with port management") --- drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_bridge.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_bridge.c b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_bridge.c index 86d20c1c35ed..88df3a73ebfa 100644 --- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_bridge.c +++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_bridge.c @@ -415,8 +415,7 @@ static int sun6i_csi_bridge_s_stream(struct v4l2_subdev *subdev, int on) struct sun6i_csi_bridge_source *source; struct v4l2_subdev *source_subdev; struct media_pad *remote_pad; - /* Initialize to 0 to use both in disable label (ret != 0) and off. */ - int ret = 0; + int ret; /* Source */ @@ -436,6 +435,7 @@ static int sun6i_csi_bridge_s_stream(struct v4l2_subdev *subdev, int on) if (!on) { v4l2_subdev_call(source_subdev, video, s_stream, 0); + ret = 0; goto disable; } From patchwork Thu Dec 8 14:19:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 13068464 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 13E5BC3A5A7 for ; Thu, 8 Dec 2022 14:21:56 +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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=O4C4colYvg+Y2KZGPYWS9EJjDht6KMelB4wwHFXdHCs=; b=QXpN6WZcgmRcHu zVHV4pqQRQKRzXG1y0yTP5hn1SWLtb2JZKmIza7rWOBLyqK+L46RRW8ZeP1vP2umWt2MS1Rsnc+hv hPpl0sBizuD+BQNb3JOd0JQ+kXAId4hB/WPP3eDUll0GEmE1wmsV3MXd4Gg8MwrBvL+2LeaAC+JLH zq9YEOK/9WByxhVnSATqsxJ9bQt7V3xg69Rrb7R7ZdHcD8yuiYO0QNFhujtErVl6rxQOBOcve9Ww7 wkR1+JZ0hcdWBY0daq7SBiYUuz4TVA6qlrc7p4wzvs8HH1zRlceL1RcHnS+AHApb2Jbu14h2MlqrD HU7RNXyJWQexCAyFBoBw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3Hli-001m9P-90; Thu, 08 Dec 2022 14:20:58 +0000 Received: from relay6-d.mail.gandi.net ([217.70.183.198]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3HlJ-001lki-1q for linux-arm-kernel@lists.infradead.org; Thu, 08 Dec 2022 14:20:34 +0000 Received: (Authenticated sender: paul.kocialkowski@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 1583EC0004; Thu, 8 Dec 2022 14:20:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1670509231; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YYTNcaefDb7Hq3EpjUs2F8iw4f2OIjP/h6YQGK4LD5Y=; b=GgXtQ65EjvZGV+VlKH0VTsXbAs6WxZsJ2xOxvmyTl9E0onBA+lb8gneodXFYRyvwmE4mfE SLlmRZf960OCcUD3eINNLNEW7eaR8Pms/VOIfPsA/rAltgO+fNFSt6SslLRulsag+pvtbz 5UxsXbJJOJAuQpq2qFvB7QAm3n+K7UrbJvgQzOyJsPboLeaClkMTl1RyrCElm6oHrrVDcS rQyeu6q63xvwxkauZlWh1Io66Xs6yI41RSYKuQiuUiXVxCaLGIa1xf5nySAIw+z2qOmjQy 3Akvp0PMikSnjr4vyIN08wFoxufv+eIzCQNs/Y6Z6cDoDM6nsetNuPpU5ajeMQ== From: Paul Kocialkowski To: linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev Cc: Yong Deng , Paul Kocialkowski , Mauro Carvalho Chehab , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Thomas Petazzoni , Hans Verkuil , Sakari Ailus , Conor Dooley , Nathan Chancellor Subject: [PATCH v3 02/12] media: sun6i-csi: bridge: Error out on invalid port to fix warning Date: Thu, 8 Dec 2022 15:19:56 +0100 Message-Id: <20221208142006.425809-3-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221208142006.425809-1-paul.kocialkowski@bootlin.com> References: <20221208142006.425809-1-paul.kocialkowski@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221208_062033_267241_E28CAD01 X-CRM114-Status: GOOD ( 10.50 ) 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 The enabled variable is only set for a valid port and used later, which triggers an uninitialized use smatch warning. Explicitly error out in that case to fix the warning. Signed-off-by: Paul Kocialkowski Fixes: 0d2b746b1bef ("media: sun6i-csi: Add bridge v4l2 subdev with port management") --- drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_bridge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_bridge.c b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_bridge.c index 88df3a73ebfa..4517c0346eef 100644 --- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_bridge.c +++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_bridge.c @@ -663,7 +663,7 @@ sun6i_csi_bridge_notifier_bound(struct v4l2_async_notifier *notifier, enabled = !bridge->source_parallel.expected; break; default: - break; + return -EINVAL; } source->subdev = remote_subdev; From patchwork Thu Dec 8 14:19:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 13068465 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 5705CC4332F for ; Thu, 8 Dec 2022 14:22:10 +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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=VHaq/GJtTfQpUMRsns8r5wEgYX4WE+KDvT0TjHNR4fU=; b=0FVm2mL1Dpmz4h rOFdZvWwl4JPz+yxyc7LMEp9VOSw7QLMVht9EoQseJOZXGpmoifIbXg3erp9ev/RqZnbfYYcxf0Q5 YlvI5YcNCUN/7LycGV+p+TjAhyWkRmgh/jsHCpvdPjgvy8OY2KSJkVF9GBPjel1rJ+V+KcPjn/hZj AoiIKX/ndStnmHo/Jc/DrChhRCebClcS4qx1Lz/bZEWKc9kSKISmKu7HaEwNViYkYgAtZ2OMbSR6u bYVdJlxdmzucu8+WD/pfjX0JWrCzfoiguJy9OvwD4X++n9W7pU68Ga0+7FAQo0jn440oeVy1ZIlEI 3BmtG45hKCGKmx1ojbOw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3Hlr-001mGh-Vs; Thu, 08 Dec 2022 14:21:08 +0000 Received: from relay6-d.mail.gandi.net ([217.70.183.198]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3HlL-001lou-2G for linux-arm-kernel@lists.infradead.org; Thu, 08 Dec 2022 14:20:36 +0000 Received: (Authenticated sender: paul.kocialkowski@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id D4BF7C0008; Thu, 8 Dec 2022 14:20:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1670509233; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=C7Bq1jaABPqnvcdD20frWPwa1ZDzg3R23L+HGhf2pEY=; b=dsGSXrzij4d5S1T4L635XDwIWwMSrZsfUJHtTCTXR20N82Gh8+cQjVwmvHLUKeFGzTx8be Ta3MgnNVoUyd4JyGL1caOFxiLW7mMcHTznQhTUqKSm/TI7a7OrGNPiQvV3H88bgqrjcyxK bf0f3+gEnAzeVN+8RFrs70wxZm2aH5MVwP3Mg9Ok0AqJsJ/Lbat3qtMhObopIvEN4v9Hp0 RHA++MXD7sYagbu6iAnpV1gklbUOy7Ocf1a57TAcIu31hc0V+yAiKsYDQOdXkq42lFPjCQ x0OxieCbWG58PDx9Ws+u4grmFQQghMT/BMhkKBhduUxNpU75h1RhMlb9EoMARA== From: Paul Kocialkowski To: linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev Cc: Yong Deng , Paul Kocialkowski , Mauro Carvalho Chehab , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Thomas Petazzoni , Hans Verkuil , Sakari Ailus , Conor Dooley , Nathan Chancellor Subject: [PATCH v3 03/12] media: sunxi-csi: bridge: Declare subdev ops as static Date: Thu, 8 Dec 2022 15:19:57 +0100 Message-Id: <20221208142006.425809-4-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221208142006.425809-1-paul.kocialkowski@bootlin.com> References: <20221208142006.425809-1-paul.kocialkowski@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221208_062035_265263_6F4B3CAF X-CRM114-Status: GOOD ( 10.92 ) 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 The static keyword is missing in the v4l2 subdev ops definition for the bridge. Signed-off-by: Paul Kocialkowski Fixes: 0d2b746b1bef ("media: sun6i-csi: Add bridge v4l2 subdev with port management") --- drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_bridge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_bridge.c b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_bridge.c index 4517c0346eef..7fcb0815cb42 100644 --- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_bridge.c +++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_bridge.c @@ -587,7 +587,7 @@ static const struct v4l2_subdev_pad_ops sun6i_csi_bridge_pad_ops = { .set_fmt = sun6i_csi_bridge_set_fmt, }; -const struct v4l2_subdev_ops sun6i_csi_bridge_subdev_ops = { +static const struct v4l2_subdev_ops sun6i_csi_bridge_subdev_ops = { .video = &sun6i_csi_bridge_video_ops, .pad = &sun6i_csi_bridge_pad_ops, }; From patchwork Thu Dec 8 14:19:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 13068466 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 48538C3A5A7 for ; Thu, 8 Dec 2022 14:22:21 +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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=gfLECWe1izhERD32rsLnJ5N0AE15J5cAgSDwYqm8t78=; b=WZTlwFAzBEev8X xoTK4ni2BNzfU0aXQN28AEr8N+qly/LFa8qkCt115pDJm8rWZnbv/DPMB8eFNxbNyJdDNmm5KZhEo GJ/Kw0w3dp4WtORtOvQCp0U4e0wrjHNpBi6wUMemNS82O+7e+OvjbeYc5kp6ZIHNLolV2BEDlLYGJ MMGsTwUh6ceBTEzFVQ48KUQLpT41sShdBnDyM9fxqQ9icfsoZoZ9wJJAu7lR8XsOKsmQIT0pKMiNa /ma61ATFuKEM+txYcLDFt9YtiwltvVLVg2BCh1EzuI0lkjWnYIx5SItwOkk1kU4cxNTx6xPpUY49n pcRls+afzvF8SKVi1t0w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3Hm4-001mRJ-Rl; Thu, 08 Dec 2022 14:21:21 +0000 Received: from relay6-d.mail.gandi.net ([2001:4b98:dc4:8::226]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3HlO-001lq7-6F for linux-arm-kernel@lists.infradead.org; Thu, 08 Dec 2022 14:20:39 +0000 Received: (Authenticated sender: paul.kocialkowski@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id DEEE7C0013; Thu, 8 Dec 2022 14:20:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1670509235; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=I9WP6UuK09ZiFFwZrEctyWpBf9jdRvt9QAuYsYKrf9k=; b=YkKbf6dwji/yyJ8JYIQMdoJpGqrErvK8AsQaXO8+OTDO4pvaRgSbJyDk5UmCPSbTzli6jK A6DIbIgIYA6SSTySQb2g1O5qlWXcyZ7Oafl7q4tXZMW248qTCCI2hfs0lyhRHHinWaS8z6 XopCP+xjm+Ia/VeoyH+unlabZk1aM+xgR3LOg/hvCaRekn4DQ/qDDdIZ3EW1Urbsu/bpbk tR2syjZGb6+Q8EB78fWbiCJQsx5nmAwrLy74jYEiCLsQ5rI3DlfFtlJsZ4rUTJui5flM9t jjGNVWksTlzaK+pgO7a8iVtf9v4JbXwTnYS99DovlM7ipIBIiMFtLalKZqnk0w== From: Paul Kocialkowski To: linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev Cc: Yong Deng , Paul Kocialkowski , Mauro Carvalho Chehab , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Thomas Petazzoni , Hans Verkuil , Sakari Ailus , Conor Dooley , Nathan Chancellor Subject: [PATCH v3 04/12] media: sun6i-csi: capture: Remove useless ret initialization Date: Thu, 8 Dec 2022 15:19:58 +0100 Message-Id: <20221208142006.425809-5-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221208142006.425809-1-paul.kocialkowski@bootlin.com> References: <20221208142006.425809-1-paul.kocialkowski@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221208_062038_445028_B12B8725 X-CRM114-Status: GOOD ( 11.98 ) 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 There is no particular need to assign ret when declaring it as it will be assigned before there is any chance to return it. Signed-off-by: Paul Kocialkowski --- drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_capture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_capture.c b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_capture.c index 6d34f5c0768f..cf6aadbc130b 100644 --- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_capture.c +++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_capture.c @@ -832,7 +832,7 @@ static int sun6i_csi_capture_open(struct file *file) { struct sun6i_csi_device *csi_dev = video_drvdata(file); struct sun6i_csi_capture *capture = &csi_dev->capture; - int ret = 0; + int ret; if (mutex_lock_interruptible(&capture->lock)) return -ERESTARTSYS; From patchwork Thu Dec 8 14:19:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 13068485 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 E506FC4332F for ; Thu, 8 Dec 2022 14:22:57 +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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=7VP2jOPwWK7zX+SQ7fHwH/VKn0pqb7X/Psu4S5TpM6g=; b=lrbEJpLlwt8ok5 OFNwVcaa1I+h/XhyjlPPhdoIeH3Gswr5KhIfm1Pc1PEHAa0k55KOcFhiVHCba2yzAzRJWTt+eEJjz HGi00UuQfXUcmIpTnUfPcFW1MskTIuxPt2dl1+P8LW2ffEOgusOY1EbxnD375AhUpmJJuoJ11B5AV UgBFhEVVjPVuxn7L/ahzD0fNNOOQ9w2LS2ACWqEwdAAfaJpSawVLs4Uv0O8JVQLn0wck/eMbzIzZx o7SoXmPRJ5WSXGpP7eVS3H+bbGoFhZkhCxfGMVsY46U2soj24P45tQSWPtgQUYs/WXMeh51yVOzn/ DLlLST0d47wrMIu/VmCw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3HmZ-001mjj-9d; Thu, 08 Dec 2022 14:21:51 +0000 Received: from relay6-d.mail.gandi.net ([2001:4b98:dc4:8::226]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3HlP-001lrk-Gt for linux-arm-kernel@lists.infradead.org; Thu, 08 Dec 2022 14:20:41 +0000 Received: (Authenticated sender: paul.kocialkowski@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id E8DDCC001E; Thu, 8 Dec 2022 14:20:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1670509237; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DcI0CE2vpt8M7xlyKhWsNrg5u9xwZtrv/Ts2Ew1lIMc=; b=NUTQupy9h9GiEVOPXOZIucyLmIa8F5OCH+jK9GuNbCCMRX/nWubMvp8590YSc0Di8t66N3 c2fqtdypEndYmjytjJuaVGrDAaqoDGn0nXhWWPCy4H9ECzo+lfVH3k9zxz3/MD/s/tK65c /DJlwZxNCSf9vdrmsttFr424GCXMTPg2OdNwh2LpTkIHtT4O7v4fMgsIA2rdInUh4sXFfb WwsXK5CHXnu12C4nteflqtOI3grHazyb0qjKY3oCQg4m8/AoB+n4GnRPcTYqgrXZhx0htd B8QX6wI3kpzjjRDi04QMNGibIjIbD21CC9MjrDDWebwJE+mPwrwSPfxC6cD+Yg== From: Paul Kocialkowski To: linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev Cc: Yong Deng , Paul Kocialkowski , Mauro Carvalho Chehab , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Thomas Petazzoni , Hans Verkuil , Sakari Ailus , Conor Dooley , Nathan Chancellor Subject: [PATCH v3 05/12] media: sun6i-mipi-csi2: Clarify return code handling in stream off path Date: Thu, 8 Dec 2022 15:19:59 +0100 Message-Id: <20221208142006.425809-6-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221208142006.425809-1-paul.kocialkowski@bootlin.com> References: <20221208142006.425809-1-paul.kocialkowski@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221208_062039_748675_5B080C06 X-CRM114-Status: GOOD ( 10.70 ) 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 Explicitly set ret to zero instead of assigning it and overwriting it later, which is a bit confusing to understand. Signed-off-by: Paul Kocialkowski --- .../media/platform/sunxi/sun6i-mipi-csi2/sun6i_mipi_csi2.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/sunxi/sun6i-mipi-csi2/sun6i_mipi_csi2.c b/drivers/media/platform/sunxi/sun6i-mipi-csi2/sun6i_mipi_csi2.c index 484ac5f054d5..a220ce849b41 100644 --- a/drivers/media/platform/sunxi/sun6i-mipi-csi2/sun6i_mipi_csi2.c +++ b/drivers/media/platform/sunxi/sun6i-mipi-csi2/sun6i_mipi_csi2.c @@ -188,7 +188,8 @@ static int sun6i_mipi_csi2_s_stream(struct v4l2_subdev *subdev, int on) return -ENODEV; if (!on) { - ret = v4l2_subdev_call(source_subdev, video, s_stream, 0); + v4l2_subdev_call(source_subdev, video, s_stream, 0); + ret = 0; goto disable; } @@ -280,8 +281,6 @@ static int sun6i_mipi_csi2_s_stream(struct v4l2_subdev *subdev, int on) return 0; disable: - if (!on) - ret = 0; phy_power_off(dphy); sun6i_mipi_csi2_disable(csi2_dev); From patchwork Thu Dec 8 14:20:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 13068486 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 7DB91C4332F for ; Thu, 8 Dec 2022 14:23:27 +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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=9xBARswLBNJqqA2yb4x9Aj7oQmWvZ72poRCNV9tefdY=; b=rIUkZHiDGydb0r zaiuUZ1koRnFWfUsERk4aW/oMlY3lE9krpd5Anw/rhW2ehzBy3auPbdp2adPfqTLCxMdkbEXHiVXk 0CHNFBMIFBn7kUtVNdDSrh7Dc+WCuK2FCd2Nn3nAKf2Xur00ROMG15xRD0ANdHVYkF3/hrtFS7D3v PkC3vNgm4QENskE/3Soq45NI0E3ht9gvqPjR8rOa0VVeBSX3rslxa5+ICN80wDuo234jeMRCclLTB 1Ba9bMue0xlG7vKwTIWoNdkQtaAvNTzhZYVZgPK32fzeDOnZV+WEZsz9OcLPJnYcRzTBacczrU0Qw s1K/R96CLmRLTalZD1qg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3Hmy-001n24-OE; Thu, 08 Dec 2022 14:22:17 +0000 Received: from relay6-d.mail.gandi.net ([217.70.183.198]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3HlR-001lti-FI for linux-arm-kernel@lists.infradead.org; Thu, 08 Dec 2022 14:20:42 +0000 Received: (Authenticated sender: paul.kocialkowski@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 0F7EFC0002; Thu, 8 Dec 2022 14:20:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1670509240; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0FPh8ptOOh3/7vfnCNdEW59LErgazMVmLGY6D+7mMsQ=; b=oIOdxsy2sgVs+9RbVNqY+Rl2s6zae0B00hC5Ux+LJdFzsGj040wWoFU/QVDqIACDa6jCz9 NszmD9pVELijGjHGHdqeNz0dmsWWKogbXJgJjMaNrsnQ0y7IDbeUgNnYBAFgVEGOPgPB9p K22Ax1+1ClYHNLKWCM/MEfYbmyVUkmwfyJ9QoA2+Taqb9uOJ4wtNyXoNg9JIuXnoqrS4/y m5rI47KuU1jl1CoPpAmgbPCkuinq39obTSs4fh8vdAKH0H+UHGua21GHrP/3fDkPJxaFqJ HphBcl2+ZZoGC70u7YuodQSMvvCSrhFpYTTOEfne5Y31wXdUgbJPAdF4Bx5V4w== From: Paul Kocialkowski To: linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev Cc: Yong Deng , Paul Kocialkowski , Mauro Carvalho Chehab , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Thomas Petazzoni , Hans Verkuil , Sakari Ailus , Conor Dooley , Nathan Chancellor Subject: [PATCH v3 06/12] media: sun8i-a83t-mipi-csi2: Clarify return code handling in stream off path Date: Thu, 8 Dec 2022 15:20:00 +0100 Message-Id: <20221208142006.425809-7-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221208142006.425809-1-paul.kocialkowski@bootlin.com> References: <20221208142006.425809-1-paul.kocialkowski@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221208_062041_669695_C89EDEDD X-CRM114-Status: GOOD ( 10.70 ) 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 Explicitly set ret to zero instead of assigning it and overwriting it later, which is a bit confusing to understand. Signed-off-by: Paul Kocialkowski --- .../sunxi/sun8i-a83t-mipi-csi2/sun8i_a83t_mipi_csi2.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/sunxi/sun8i-a83t-mipi-csi2/sun8i_a83t_mipi_csi2.c b/drivers/media/platform/sunxi/sun8i-a83t-mipi-csi2/sun8i_a83t_mipi_csi2.c index d993c09a4820..cd2e92ae2293 100644 --- a/drivers/media/platform/sunxi/sun8i-a83t-mipi-csi2/sun8i_a83t_mipi_csi2.c +++ b/drivers/media/platform/sunxi/sun8i-a83t-mipi-csi2/sun8i_a83t_mipi_csi2.c @@ -220,7 +220,8 @@ static int sun8i_a83t_mipi_csi2_s_stream(struct v4l2_subdev *subdev, int on) return -ENODEV; if (!on) { - ret = v4l2_subdev_call(source_subdev, video, s_stream, 0); + v4l2_subdev_call(source_subdev, video, s_stream, 0); + ret = 0; goto disable; } @@ -312,8 +313,6 @@ static int sun8i_a83t_mipi_csi2_s_stream(struct v4l2_subdev *subdev, int on) return 0; disable: - if (!on) - ret = 0; phy_power_off(dphy); sun8i_a83t_mipi_csi2_disable(csi2_dev); From patchwork Thu Dec 8 14:20:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 13068487 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 5B750C3A5A7 for ; Thu, 8 Dec 2022 14:23:56 +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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=s2VI7APZ/bhI/4PV2y4mQ7rhHY0PAf5P9LoFPbTFm9Q=; b=BxLu/cThyNfjQ6 MCRAJjkWA+HSD3q4CwVuf3vKdR5spEvjl3jB2Q6BlGgSSvmWP/XKsExgfBeKaJyZc1bAP1jhZdgdR /ZwnREmQrvO1lZNsRnGV21+rHwkGKkRlkZvNnG4MagzFZdi7+A30uxtlJKbzTTCLaoeryuHfd2Kpu 1pJNmya4Xpa2cqbzYcAt+OECLs2V5VqApP+VnoByGOSdMEpHWcCGxHZWhu+IHZvcrELynIYt63BcF GNsAtDNmzgmVdxgGEWfoI07mQtJQmRFO3cbsS+oIpASVeXEvUEc+BTAxIukX0YZ1fPIZWiSQymV6X Qt0k1D68iznpZmnQAPmQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3HnU-001nMB-5B; Thu, 08 Dec 2022 14:22:49 +0000 Received: from relay6-d.mail.gandi.net ([2001:4b98:dc4:8::226]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3HlT-001lvq-Dv for linux-arm-kernel@lists.infradead.org; Thu, 08 Dec 2022 14:20:44 +0000 Received: (Authenticated sender: paul.kocialkowski@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 4266EC000A; Thu, 8 Dec 2022 14:20:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1670509241; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qaVD0FADrXBGUP1SDekzCFjadqnGQazSN58ScFrhxkc=; b=OEoSIaw7PGuQdliNj0fxWV6fDXA7gLV2OUCqe0xh2F/gYXOVgDKpucj7//9KmHzgf2sH9M zJuuN8RuAdUbizT2JwE/iPeYnwOmQszBDKpCxNUGt/8pTiX2ravexp1Jh93QtVDTKzhC08 Ijsh692oQ1hx/wVABfDm3O42cLpjzmr5XSNfHVzFnLKf6Fa26npDikD1Wpq/OPyUhtKWU5 fEBVd/eCij3HSuG2gHFspbKcCCmagXDn2+W0g+TyHUniBwi8exJBnP1QAPzbsYbszJlcSE VBxKNW0mXsGN8/AUiyvBFvbEilB2BX/6QmK0ZdeIkerICFAnpojmG8CCUx/vcg== From: Paul Kocialkowski To: linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev Cc: Yong Deng , Paul Kocialkowski , Mauro Carvalho Chehab , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Thomas Petazzoni , Hans Verkuil , Sakari Ailus , Conor Dooley , Nathan Chancellor Subject: [PATCH v3 07/12] media: sun6i-isp: proc: Fix return code handling in stream off path Date: Thu, 8 Dec 2022 15:20:01 +0100 Message-Id: <20221208142006.425809-8-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221208142006.425809-1-paul.kocialkowski@bootlin.com> References: <20221208142006.425809-1-paul.kocialkowski@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221208_062043_628149_3B77C87D X-CRM114-Status: GOOD ( 12.31 ) 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 Explicitly set ret to zero on disable path to avoid a related smatch warning. This makes initialization at declaration useless. Signed-off-by: Paul Kocialkowski Fixes: e3185e1d7c14 ("media: staging: media: Add support for the Allwinner A31 ISP") --- drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_proc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_proc.c b/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_proc.c index d69d2be0add2..a95709d2c573 100644 --- a/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_proc.c +++ b/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_proc.c @@ -173,8 +173,7 @@ static int sun6i_isp_proc_s_stream(struct v4l2_subdev *subdev, int on) struct sun6i_isp_proc_source *source; struct v4l2_subdev *source_subdev; struct media_pad *remote_pad; - /* Initialize to 0 to use both in disable label (ret != 0) and off. */ - int ret = 0; + int ret; /* Source */ @@ -195,6 +194,7 @@ static int sun6i_isp_proc_s_stream(struct v4l2_subdev *subdev, int on) if (!on) { sun6i_isp_proc_irq_disable(isp_dev); v4l2_subdev_call(source_subdev, video, s_stream, 0); + ret = 0; goto disable; } From patchwork Thu Dec 8 14:20:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 13068488 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 552E9C4332F for ; Thu, 8 Dec 2022 14:24:43 +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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=k+1Oaa9WmpK4Hzs/WiAfOM/FRGhsCtLjlaCA1fqDbbI=; b=yCkX8fH0TWgS7N iWbki62FIT6WzTvw0m7UnNzeKEL46WsSjJ6tI0mDEOoIzA7mzlX24RXEnSerBojHYjUVWpf5WcXi6 zVybDBMyZaTGXhEn0DM46lqXxGoBed7yqCi8MvK/oXSLuVfQtdgWVbhFZwWjcgK8nQgNezYigfs5B shHJwkUTBcKbX0fdtu1HayYKrp1TueNrAW9MmgpSbVgg0W0IOW1CRKXpYYGmwwOXTAvoogOkQV9Xm EAdVFg2wk7ao7aMKLsSr2Ye5QlMKW1wLZbGoUpt0FCUWtQWNP+E8/Ai7FQZW0tJKsLBf53SUEDUZU 5fRUr8A7Pa0QwBlF/EIw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3Ho7-001nkX-2K; Thu, 08 Dec 2022 14:23:27 +0000 Received: from relay6-d.mail.gandi.net ([2001:4b98:dc4:8::226]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3HlV-001lxA-D5 for linux-arm-kernel@lists.infradead.org; Thu, 08 Dec 2022 14:20:46 +0000 Received: (Authenticated sender: paul.kocialkowski@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 1F653C0007; Thu, 8 Dec 2022 14:20:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1670509243; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LSzyeFFbgISZ/XcjaB38QewnBAIka+71vdPWj8SCHL4=; b=KVYG/tL1bPMselEeCN3b/I8Qw9g0WjPv/m2OQgIDTADcDDbRBVA0NAVDoSgyNeerL9ZFzs nFPWKVmw/4LeuyIPCj4Bx6J6pl0Zpsh6H++NIytcZTPBnLeKEUmU5yoogJeFL6CHFEhh+l kZGPQVCEsETlHo009nT/W5tpUgOTvwlE+GuCyUWowYMfpK2LaqEgIQ2GlGtGk3yd9zPQoB ilGh4D/ZOHRWMtB7aHKtvPZqdLQrEt8+I7WJY0hRVhbe2CBuLK5wmUI4aDjHz8V4HWRnj0 G4NI8K4vHuwe6JmEvn3UrsSvfwwFywW6ih7n74Acr9g2OaOVXIumq3tUPo+LCg== From: Paul Kocialkowski To: linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev Cc: Yong Deng , Paul Kocialkowski , Mauro Carvalho Chehab , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Thomas Petazzoni , Hans Verkuil , Sakari Ailus , Conor Dooley , Nathan Chancellor Subject: [PATCH v3 08/12] media: sun6i-isp: proc: Error out on invalid port to fix warning Date: Thu, 8 Dec 2022 15:20:02 +0100 Message-Id: <20221208142006.425809-9-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221208142006.425809-1-paul.kocialkowski@bootlin.com> References: <20221208142006.425809-1-paul.kocialkowski@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221208_062045_643247_D471B782 X-CRM114-Status: GOOD ( 11.35 ) 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 The enabled variable is only set for a valid port and used later, which triggers an uninitialized use smatch warning. Explicitly error out in that case to fix the warning. Signed-off-by: Paul Kocialkowski Fixes: e3185e1d7c14 ("media: staging: media: Add support for the Allwinner A31 ISP") --- drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_proc.c b/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_proc.c index a95709d2c573..4f34c1bc8be9 100644 --- a/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_proc.c +++ b/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_proc.c @@ -416,7 +416,7 @@ static int sun6i_isp_proc_notifier_bound(struct v4l2_async_notifier *notifier, enabled = !proc->source_csi0.expected; break; default: - break; + return -EINVAL; } source->subdev = remote_subdev; From patchwork Thu Dec 8 14:20:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 13068489 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 97033C4332F for ; Thu, 8 Dec 2022 14:25:10 +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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=S1xf/5c24t28CltmC6LrA13OISeJWdKYJFPgJMKx+18=; b=fULi0FHEkP7nao NaHkz/nKLtoMGnqk27TyvgnksjI1ikFGuT4Rw8EeR5sYOdHFCMPpJhdlxJ2Dnsns47ta5kVWt4kCI rrGcRLydRxxA0w8KaS5sfrM6J0mnA6KsmUfEAbjWkwQGpQEPsxvVVNXdbj2YL7Lf2hUuctDxkpYgD Y4JH1vfgyv8k1xgsThfkUOyua4+HSsQLc7W31Sug5duVoL9GumkTBguuXgXsZSKxu1D+b21wg1LAV wdvjl4f71NgQgm0vu8Ng7qz1AVA5oyWR7Y31GpLwh27NAZj9DBk04mFobU1sSo5X28m8cY7ba//Av h9sPsQRo0uDnGXtLPXSA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3Hof-001o9X-FS; Thu, 08 Dec 2022 14:24:01 +0000 Received: from relay6-d.mail.gandi.net ([217.70.183.198]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3HlX-001lyQ-Gh for linux-arm-kernel@lists.infradead.org; Thu, 08 Dec 2022 14:20:48 +0000 Received: (Authenticated sender: paul.kocialkowski@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 4D963C000E; Thu, 8 Dec 2022 14:20:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1670509246; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xGi8Taqna2w3VVFuAQ42j1jn1mocVgpg1u4jFmA8EU4=; b=j/a7kyFpKQ/In5J/o3vwp2eEahEkHf3nGSKMg5MlrAagi+OrfGZ+ZocI7knBcHPV1b/Ase nhwzi0dP0NylC2jggZ6n7Ja7zSoACw5SL/hEbWlRpn2eB9PrgVkq467w1JPgbMAoTiFTy/ uB92QJ+9PUfPgOMVUVaAP3yOiSJuRX50QHuhKUUZbH3AHLP/0zgI7Q+3kLnFFQ2mqrr/mN XKKuiiQHRKWqpXyyugjYUVo1uqg7wCKPO1PJGOMxco+0IuDQ3zOlVIi6cs6zkZfzciTMQK YwGv0/LPJVpaL1qvzLnVSYcCN1t+4XhlSF2HRD4pG0xb7KGaFL7aCt57XJgUlg== From: Paul Kocialkowski To: linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev Cc: Yong Deng , Paul Kocialkowski , Mauro Carvalho Chehab , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Thomas Petazzoni , Hans Verkuil , Sakari Ailus , Conor Dooley , Nathan Chancellor Subject: [PATCH v3 09/12] media: sun6i-isp: proc: Declare subdev ops as static Date: Thu, 8 Dec 2022 15:20:03 +0100 Message-Id: <20221208142006.425809-10-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221208142006.425809-1-paul.kocialkowski@bootlin.com> References: <20221208142006.425809-1-paul.kocialkowski@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221208_062047_729181_790FC41F X-CRM114-Status: GOOD ( 11.29 ) 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 The static keyword is missing in the v4l2 subdev ops definition for the proc. Signed-off-by: Paul Kocialkowski Fixes: e3185e1d7c14 ("media: staging: media: Add support for the Allwinner A31 ISP") --- drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_proc.c b/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_proc.c index 4f34c1bc8be9..1ca4673df2b3 100644 --- a/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_proc.c +++ b/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_proc.c @@ -342,7 +342,7 @@ static const struct v4l2_subdev_pad_ops sun6i_isp_proc_pad_ops = { .set_fmt = sun6i_isp_proc_set_fmt, }; -const struct v4l2_subdev_ops sun6i_isp_proc_subdev_ops = { +static const struct v4l2_subdev_ops sun6i_isp_proc_subdev_ops = { .video = &sun6i_isp_proc_video_ops, .pad = &sun6i_isp_proc_pad_ops, }; From patchwork Thu Dec 8 14:20:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 13068490 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 E1554C4332F for ; Thu, 8 Dec 2022 14:25:51 +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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=G4/9YMJcrPGAn8HnqTmrc6VDA42ltvJ7b0Qj42eaTdc=; b=LMEUaujQ2jjT7J RcQtLo30APxJfB2k/v3F/zhd+OeHtFstFE/0pwrSVZR3zVwfcIuqyoploL5ovdfTUabbLaQ4qfBcl yfE8w0QrlTcGicBjzDnoXVi73ao8Pf+ulsvNfJMvTq1Wd7lXgHvV1dne+OiS0Vz63HmH36lneykUT dU9eL/Aq751NNRZ9awYALdUla8S4/+8pEThu1GRWu/VPlYZdUzFiS+ozriIoW2AaufGh6GqbRZPjQ kItwN5Y8L3XRc1oI4MAxDZ393mJHZ0lNFwr2MuMgwte+uE0fpEvSY2bdFhHXFrmxwf8EoKKNXJlc2 UpJApSEi6IfKNv0AfQvg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3HpN-001oZh-Tg; Thu, 08 Dec 2022 14:24:46 +0000 Received: from relay6-d.mail.gandi.net ([217.70.183.198]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3HlZ-001m1v-Pl for linux-arm-kernel@lists.infradead.org; Thu, 08 Dec 2022 14:20:51 +0000 Received: (Authenticated sender: paul.kocialkowski@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 47A4BC000D; Thu, 8 Dec 2022 14:20:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1670509248; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MxNU8R0hlLPBF9tSthFNrX9x65pnLvPWMOB/8u2G9pw=; b=i5y8KAuAxBn0vHH8ZCOIGjzQYRalTXiPXwlbTriiSCczChCkKhSPkdoSe6cktlwxZvIAYH Jby1hCvQgI4n/8WHkfAGe38jHTpNxytOtArOavYCjxXtmcj+CK2ouJ1sZYgGF8JOB5bxAk IPsbmMCynNJT01h4LMQHIyU+8XpS5Q3wvA7QzJzXSPc+ADcQ0oAidqfCTmJRXeBobHWhN+ 6WXu9dMbwBXG87S11+SCp+06LuL1z1urnHnM/B5fuXvVbtXl6B98YSUx0WVfQy9RvDSE1a /BExhhH/giPAIlfRs7uGTPIisO/ixin+tihlrNtEffcgf5UR+kHIyD/Uh/uwow== From: Paul Kocialkowski To: linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev Cc: Yong Deng , Paul Kocialkowski , Mauro Carvalho Chehab , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Thomas Petazzoni , Hans Verkuil , Sakari Ailus , Conor Dooley , Nathan Chancellor Subject: [PATCH v3 10/12] media: sun6i-isp: capture: Fix uninitialized variable use Date: Thu, 8 Dec 2022 15:20:04 +0100 Message-Id: <20221208142006.425809-11-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221208142006.425809-1-paul.kocialkowski@bootlin.com> References: <20221208142006.425809-1-paul.kocialkowski@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221208_062050_001001_F533AB2A X-CRM114-Status: GOOD ( 11.17 ) 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 While the stride_chroma variable was previously initialized to zero, it's actually stride_chroma_div4 that is set to hardware registers. Initialize it to zero instead to avoid an uninitialized variable use and get rid of the associated smatch warning. Signed-off-by: Paul Kocialkowski Fixes: e3185e1d7c14 ("media: staging: media: Add support for the Allwinner A31 ISP") --- drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_capture.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_capture.c b/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_capture.c index 4b592820845a..1595a9607775 100644 --- a/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_capture.c +++ b/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_capture.c @@ -108,8 +108,8 @@ sun6i_isp_capture_buffer_configure(struct sun6i_isp_device *isp_dev, void sun6i_isp_capture_configure(struct sun6i_isp_device *isp_dev) { unsigned int width, height; - unsigned int stride_luma, stride_chroma = 0; - unsigned int stride_luma_div4, stride_chroma_div4; + unsigned int stride_luma, stride_chroma; + unsigned int stride_luma_div4, stride_chroma_div4 = 0; const struct sun6i_isp_capture_format *format; const struct v4l2_format_info *info; u32 pixelformat; From patchwork Thu Dec 8 14:20:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 13068491 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 E25E9C3A5A7 for ; Thu, 8 Dec 2022 14:26:31 +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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=9JsNP+76H0wYSUGiRj0aUGxIHDbWMFrHx6US6s5W+Ro=; b=xTYpxjgBjuEgRT oh+UcaY0lziU+A/2ZlYwO2Jr1Y17/SGIZAn6FCpgOKeQjh3u/E9IVakPwIgdYSEtc4pXxXksUE83v WRgV1zuMWEXX6PnZJ/+QHzS8bfFP4wz7g7g4J8+yjUuPFdQ2fgjU0d+upDZdszJXHWdk6ae9Qbmld brE98UikeS+USKS5wpdp83t3EIduy9Rke+OifcFi+whsd3b+UKF6MLQmwc7XK6gbemSphUeOWBMIw 70+mbNGdwh78GcC+07qkfUjFgu7BI7rVvD6Eu4HZs9WoXAzj7dFdYMgFVwionfp33lZvNCujOpr0v 4wctsorDkh92lL2PXEdA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3Hpz-001oyO-Ij; Thu, 08 Dec 2022 14:25:23 +0000 Received: from relay6-d.mail.gandi.net ([2001:4b98:dc4:8::226]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3Hlc-001m3a-Eu for linux-arm-kernel@lists.infradead.org; Thu, 08 Dec 2022 14:20:53 +0000 Received: (Authenticated sender: paul.kocialkowski@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 9850AC0013; Thu, 8 Dec 2022 14:20:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1670509250; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hRu2RP5587P17F9a9XccoML3QtTDv6tjVLS6SFKycnU=; b=hip9rGuH4oKSmShxI5ukthyrKzgtOA1aWYaEW+Wm3Xz3PcJd5CY6TiMWnN7Gt+7D6Gcta8 OIiyx7COVYWmRJp33gBeH5DGDyuD6rtTKJs6/7oQQW1Ydxm1DxVsujpywILdLlIlv24uTB dTB6ohC98ggXa1rNh5DeCI3wayt1MXKJmMWl6aWNieTaUsXgQnXA/aPkng6Rnt2PRr+5rQ HSzA7EHPQxvttZJfpeYIWP03hGJ77Gh7Azh3W5J742RqqvT1MuTEMCtyRP+mwTMGP/jJgG +6xIXx/GVAWmnLtppFJ/mcVrzbslsELwTKYVSbgfJ74mP4qH9ULXyhN6lZPADg== From: Paul Kocialkowski To: linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev Cc: Yong Deng , Paul Kocialkowski , Mauro Carvalho Chehab , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Thomas Petazzoni , Hans Verkuil , Sakari Ailus , Conor Dooley , Nathan Chancellor Subject: [PATCH v3 11/12] media: sun6i-isp: params: Fix incorrect indentation Date: Thu, 8 Dec 2022 15:20:05 +0100 Message-Id: <20221208142006.425809-12-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221208142006.425809-1-paul.kocialkowski@bootlin.com> References: <20221208142006.425809-1-paul.kocialkowski@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221208_062052_701290_38DF6769 X-CRM114-Status: GOOD ( 10.09 ) 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 Remove a heading whitespace that results in a smatch warning. Signed-off-by: Paul Kocialkowski Fixes: e3185e1d7c14 ("media: staging: media: Add support for the Allwinner A31 ISP") --- drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_params.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_params.c b/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_params.c index 8039e311cb1c..7b41a13162b9 100644 --- a/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_params.c +++ b/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_params.c @@ -183,8 +183,8 @@ void sun6i_isp_params_configure(struct sun6i_isp_device *isp_dev) if (state->configured) goto complete; - sun6i_isp_params_configure_modules(isp_dev, - &sun6i_isp_params_config_default); + sun6i_isp_params_configure_modules(isp_dev, + &sun6i_isp_params_config_default); state->configured = true; From patchwork Thu Dec 8 14:20:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 13068492 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 9BC93C3A5A7 for ; Thu, 8 Dec 2022 14:27:24 +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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=W9acY5AQBViIFHAQMXFAhIVPSQNdP0TF9IdsNysG3e4=; b=I8TnxX2L/Q/Fvm W73v1A8JCStcam64opaoz+3qzWhcQ/0MLZXexAPsDCc1+zhL1GgxB22EaRtbJNopj41CV7+Sdctgg 7nFNZIrpjG26DLWWQWaQK9Egzz2fwxRY7gW0o1Vj8SaL7xdOI9yeetBbr9zVZ+eGROscmzUa+LzD5 UlqS2LMx14dSOAQ83TvnWWE6Bj9ZlfX0Z6b85CkvP7AHaQrz8qHAtKphvKSep8i8+05qtLs8cdIOX sW8751EvkHkiUbhqTOCxjKwR/CK2KMVHWo+V84XQN5G1O0TmkxuAvsFGPxs9VE1O0FBJSACXqd8up jxjCCr65iQeY+1XFVq7w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3Hqf-001pOR-V5; Thu, 08 Dec 2022 14:26:06 +0000 Received: from relay6-d.mail.gandi.net ([217.70.183.198]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3Hle-001m5L-JK for linux-arm-kernel@lists.infradead.org; Thu, 08 Dec 2022 14:20:56 +0000 Received: (Authenticated sender: paul.kocialkowski@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 1E190C0010; Thu, 8 Dec 2022 14:20:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1670509253; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=l1d1C6XOR5CdMp7rtfdwwMdKTU/wg8Y6oozqFuEEadY=; b=ivdJdSy9X76V6OrTItBkoQRR+c4AdoISFooXkR8IGRL2MT3HVUScvIivkpWj1AdlsnPkc/ UKHvMn44v8XAb4kZHG2uEvuC9S3D42mj7i6jp4YYcmmJ7Q5qaGg7OkcDKBkrrqCd7pfULv il6rbTPxXVDP1VJKyBYbb3ouJQaIiJrK2dpqi2pk4EdR+GHrIWcbSQOXuRmzOIbZNKxmDB P+BIzv2n2K+mIIns3UvNnTbY5fMAhoaes9bxgZzzNOsP02Z8OsHlckCVTNca/AUMMzJ76f 3CO8V2NbEMBCDmo86DMYWnhoHJAqB6LAqRusyrYfnTcrS2fEXrc9gaXeAV+8HA== From: Paul Kocialkowski To: linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev Cc: Yong Deng , Paul Kocialkowski , Mauro Carvalho Chehab , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Thomas Petazzoni , Hans Verkuil , Sakari Ailus , Conor Dooley , Nathan Chancellor Subject: [PATCH v3 12/12] media: sun6i-isp: params: Unregister pending buffer on cleanup Date: Thu, 8 Dec 2022 15:20:06 +0100 Message-Id: <20221208142006.425809-13-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221208142006.425809-1-paul.kocialkowski@bootlin.com> References: <20221208142006.425809-1-paul.kocialkowski@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221208_062054_811067_72F71EBB X-CRM114-Status: GOOD ( 10.84 ) 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 The state cleanup helper should unregister the pending buffer from the state after returning it to v4l2, like it is done for other buffers in the wait queue. Before this change, the pending buffer from a previous run might have been returned at the beginning of the next run, causing an error. Signed-off-by: Paul Kocialkowski Fixes: e3185e1d7c14 ("media: staging: media: Add support for the Allwinner A31 ISP") --- drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_params.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_params.c b/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_params.c index 7b41a13162b9..e28be895b486 100644 --- a/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_params.c +++ b/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_params.c @@ -208,6 +208,8 @@ static void sun6i_isp_params_state_cleanup(struct sun6i_isp_device *isp_dev, vb2_buffer = &state->pending->v4l2_buffer.vb2_buf; vb2_buffer_done(vb2_buffer, error ? VB2_BUF_STATE_ERROR : VB2_BUF_STATE_QUEUED); + + state->pending = NULL; } list_for_each_entry(isp_buffer, &state->queue, list) {