From patchwork Thu Dec 8 11:47:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 13068332 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 70E33C4332F for ; Thu, 8 Dec 2022 11:50:26 +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=lvFMjGyycsirgZcq/SQpbnsbEeiPPtYlEbH7RjM39DQ=; b=gGVPz5CRdjJKst CosiZVG7odvTjaXJfuS7Y4gGU8C5RN5lDazoN9gd8QqGr6Ao3lGb1nJQ5CtvzLC6xwACuoIeIVkM0 3l/f0IO39vOqJ/xJ3/H618uTbLC3PrgORhTcz+Cz+ElQ3IS8nOvYn2w+tA0m4uCiLAKTglBt3QKFK BZs2E4LJSR6CBtp08wQV4rDiM2SqpgX/ENeBBcOMEuU3HDBXQTbM6ckqQcAcqhQROH88Gc1aQULCv ViBN6WGFm3W3pNJ6VBx1/i3aitIBvS1iuHYC371tAEZdH1jDJvC9XbesfRFgnGehrJP4Ie5VWyeaV K8f0w5dsUQOhRwiOd99g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3FOs-00FqsR-Ft; Thu, 08 Dec 2022 11:49:14 +0000 Received: from relay1-d.mail.gandi.net ([217.70.183.193]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3FNn-00FpEs-M3 for linux-arm-kernel@lists.infradead.org; Thu, 08 Dec 2022 11:48:10 +0000 Received: (Authenticated sender: paul.kocialkowski@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 9E5A6240007; Thu, 8 Dec 2022 11:48:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1670500083; 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=g8Fr5IFDx706AN895Lw8QOX+f28RaNPliLSLDFSc9/k=; b=a00ISrOkO4WtKc9pf6mbqrhA9oNkl/MdSK032EXIU09xlDA5iQla8rZ+eIK5vaJ2VPBwNY /FHhG8dL1xktAzEgM3wIOQw3SKCtaxOINV8ax+UK2HFbm9jDvhvbCJlzCZz2dysjqw82MQ +CHNpNH0LTbK8qye7D8kKcwAQ6tlOc1ppDk7Kxo2ZtZPom0uf/c9D2hYzBiWQuVf5TCzI8 +9lmS8s0r/kALXJXOuhhwymTb6bK9wCad0HmDOM5dJ89zgt3u1W+jmnj6FJTqfZsjaG6/D x+m/33v1b4h26XvfYr6X4AAV6iBz1xyxrKjXXBdenkj8NGMYLaPPG5qlGDYWSA== 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 Subject: [PATCH 1/9] media: sun6i-csi: bridge: Fix return code handling in stream off path Date: Thu, 8 Dec 2022 12:47:34 +0100 Message-Id: <20221208114742.399461-2-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221208114742.399461-1-paul.kocialkowski@bootlin.com> References: <20221208114742.399461-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_034807_883744_F9FD5B68 X-CRM114-Status: GOOD ( 11.71 ) 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 --- 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 11:47:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 13068333 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 976EDC4332F for ; Thu, 8 Dec 2022 11:50:48 +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=1Y7KVaSAgD4PrJ 7bbnYVeWpGl2z7CJ5UuH8NZ4lC8FFf5q+ACOwQH+kFf074Vah9/p89Ff8NC4dRpJvQkgN2J9JcjHR hMhPpPqpz9a0WYtEWVWskAHA/2OZuaserLjFxZnLEWDY4+Rza8dpdHE+8EbQB/QrwWOKm/n6OfefH b1GlMujXEjSguaj7izjp0nhjcljXQytW3W6RPl/EVo/a3AAw+SbEb/iTMHS4Z8TynsTvSgq02bCaB BB5ImWLRNItReYPWiMbKcU739HzsVGjITNJj4+5UbRhfY/VS8ZhsZWyme72/2D7ZV3l6o5zVDSL++ 9CNSFbiGGTUdVlPvjYRA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3FPE-00FrUs-AX; Thu, 08 Dec 2022 11:49:36 +0000 Received: from relay1-d.mail.gandi.net ([2001:4b98:dc4:8::221]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3FNo-00FpHo-RT for linux-arm-kernel@lists.infradead.org; Thu, 08 Dec 2022 11:48:10 +0000 Received: (Authenticated sender: paul.kocialkowski@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 763A8240005; Thu, 8 Dec 2022 11:48:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1670500085; 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=ao4e4f7P+lJKy9qfYHzHIF7eAn1YDeHe1Wt9uSb6KhpWzuCq1/jRdfb3iZPDFpxMdzLmHx yfpvtKpaDZyfOWneurQREbwg5Ws1BqT4kIlOvTaGIH7H2YbSl4SX7otgyx9JwfUtfpq7aU ixeElXx6iV2GawAbAyjpO7G5UJtDPTJmh3gWG7gug/fbYZKD9nbl6qRvBv/GZ7kxGu5UNl vTl5RtQoSYITURDbmRHAq9BZpfZT0Jzy9zwc/cJihzhXaTzMcxn6z+zppoXULfK0r8sj42 oea3bxwsremp89F+p8ndsMEmphVs1QydErCL1ZX9HtJFjE35YFWvBGXQkH/RTA== 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 Subject: [PATCH 2/9] media: sun6i-csi: capture: Remove useless ret initialization Date: Thu, 8 Dec 2022 12:47:35 +0100 Message-Id: <20221208114742.399461-3-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221208114742.399461-1-paul.kocialkowski@bootlin.com> References: <20221208114742.399461-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_034809_110287_8C821C83 X-CRM114-Status: GOOD ( 11.77 ) 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 11:47:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 13068330 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 923F0C63703 for ; Thu, 8 Dec 2022 11:49: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=cUlTEulhzQHkeVC7LicgouEQ+PDojtc5Dlgv7Z6e39w=; b=LFhhpqT9L0S99t gii3bl8uJovmAbRWa/uDCes2QUHsZHP1Y9fEYOsaDBHfmu1NIuOKNsSMNF0o86Cyo70A57hyT0f1g AyP0D8A5pkOqIh1dr/tFZE/oJmSHWXkBkaAi4EB7E+FjZrnHvi/ZUyNTrZAHpbPj+vk86I02MEjky H9PGcQe7Qx+wQma0PKvQoYLXoySlRVE0AChRenuKvdLas6zz55tq80wzudJUt4YqSx6QKlOyULucA obbz18SI7bnGfoDA3bYIe9lBqqFyN2rULlWLd14dMus0oTc315sNqloEAh351jWAcjIfsv5NaQ6qG Mukly6u9CBaVDevsOo1Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3FNx-00FpUB-0D; Thu, 08 Dec 2022 11:48:18 +0000 Received: from relay1-d.mail.gandi.net ([217.70.183.193]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3FNo-00FpKX-L8 for linux-arm-kernel@lists.infradead.org; Thu, 08 Dec 2022 11:48:10 +0000 Received: (Authenticated sender: paul.kocialkowski@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 4523B24000F; Thu, 8 Dec 2022 11:48:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1670500087; 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=G6S8oJ3aFtNCcZoU3kaxCoOFZa8bIBnBoUJ/ngEwAfA=; b=dUWD1ZGv9IFpByixdjm7gJRgcw5SjjHfkd6ABN3i8v5wYathBEODJDb0Tms3YqwJUPLlRF tGP8LlqVTbFp4iykF4Cx9VkPdKLr3eSzR9Jy/plnGlEN1ZF0W883+/HEdPPWa+PmNMlujP D1i/wBPeZpKni3KK+1mPH1vKaX3Y9BfBtWLx+Xy7rfRqdTqwSaj9Mg3KM+OdC8F3LSnxYZ XzAiJGPOsVdL3GvomGO2wmIHvu9FoQqXwraQrx84Ez12QB1bythbGFxMQJwTdWfAj0TrSV N9NEpX40Ilc0J55PCC1PoOxkkWurcxbc+GCCqLdKTRGpa+iv4naZdnbnOFOYcQ== 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 Subject: [PATCH 3/9] media: sun6i-csi: bridge: Error out on invalid port to fix warning Date: Thu, 8 Dec 2022 12:47:36 +0100 Message-Id: <20221208114742.399461-4-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221208114742.399461-1-paul.kocialkowski@bootlin.com> References: <20221208114742.399461-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_034808_891847_7EE1ED10 X-CRM114-Status: GOOD ( 10.32 ) 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 --- 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 11:47:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 13068334 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 8BE47C3A5A7 for ; Thu, 8 Dec 2022 11:51:12 +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=KCx637eqlPsay0 7/L/r+wMCdPyNgR3edEvCsNRYQXAysn3teKLWal6TVX310SHFbtjdmyCa/gmS+xJjPkhoc9Yx92i3 FUB44ZHap/lPHNCjZIxwZgr2eHDm2y/QUNALE8Dq4nomJXqG7jsHUjN/1sY87s4F/g676oyEP0Yqb 4AECAWITuP7DQRnaMk9SGXjcMXuRU0rWmbUH0L4VNg2Ckg5CnTVAGRpl+33NHwJhgeBrdX4pviE0l 2LW6Cdu1ReIqEk1aXOTJJpHvd+Q8vDh48Ti4kqfOx0ZCzpe/gPwRrWLPhzYWe9A1sTKJyLqJSxMFF FtVodkfgBp1pVqPEVCPA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3FPb-00Fs3E-6Y; Thu, 08 Dec 2022 11:49:59 +0000 Received: from relay1-d.mail.gandi.net ([217.70.183.193]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3FNq-00FpPP-8E for linux-arm-kernel@lists.infradead.org; Thu, 08 Dec 2022 11:48:12 +0000 Received: (Authenticated sender: paul.kocialkowski@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 653F5240003; Thu, 8 Dec 2022 11:48:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1670500088; 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=j/CgJV8VPsYt7NneQB0+ZoLdhthaIF5W1Ou+PGIwRuksgooZvVI5DdWSosR97KskYOF4m0 cIDkQUEpD8K0xnbfTWtnWHpGhhK0tFGE/iWmP4+OgIyEWSqAutpiiTAS1mfvToAVVfDAv1 Wti8vVTku4ZHWymGk7hr9h5+ZnLgX/O/obyC3MP378wZtxEYw1RX4t0z2CF/qwnli9LvjN gLpOuSI5u1sr13cGHmlXYTiHGXVDpPnmJ8Us1snHPmcK6cx7VEiGH/wSzLuZ/GY+IYwOpc YoeUyXkrHIHRattvifx9KcQqtRatYxxsTKBca9mEwL1YHlsM9nml2LHiV/pIpQ== 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 Subject: [PATCH 4/9] media: sun6i-mipi-csi2: Fix return code handling in stream off path Date: Thu, 8 Dec 2022 12:47:37 +0100 Message-Id: <20221208114742.399461-5-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221208114742.399461-1-paul.kocialkowski@bootlin.com> References: <20221208114742.399461-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_034810_496045_8A7A2BB9 X-CRM114-Status: GOOD ( 10.59 ) 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 11:47:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 13068335 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 8DFC3C3A5A7 for ; Thu, 8 Dec 2022 11:51: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=9xBARswLBNJqqA2yb4x9Aj7oQmWvZ72poRCNV9tefdY=; b=h6D356eu3pgGSb bDYn441sOE/jhJ0CYcSgHM0v1ZpcymgO++e3RC2W1IAOB1sTRS4XfXjsO3ZCWbCP9gZkgGd9/ncH9 BNsflp9iVBrgIgh4Vku+oIFABY4H2FHs6XvxjRd9N7qCePnE7XOZZE+LH6aHgX4XaCemzRFVvKfie RqWXuprbrEdg1b/acva79E1jGqo+fb0KAG3RpclHN2IgguwHy2DMxuZa6bFDLTuG7lOTETmAf8qOq njXI77qC0r1IsuaWWTZNnxTXaKAk8y/hiN4apXA3/qOBZbWthOmekwk2En042CVI7EPjpji5uZTa6 3jgVt1f6K+0c16Uk7jUQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3FQ2-00FsgO-Oz; Thu, 08 Dec 2022 11:50:27 +0000 Received: from relay1-d.mail.gandi.net ([2001:4b98:dc4:8::221]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3FNs-00FpS8-84 for linux-arm-kernel@lists.infradead.org; Thu, 08 Dec 2022 11:48:14 +0000 Received: (Authenticated sender: paul.kocialkowski@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 1A47524000C; Thu, 8 Dec 2022 11:48:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1670500090; 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=Vz3FisI+TWdgUpXSmKJiPTe02vG17f0vmNae7kyIJC7joJLRHqanBB3W5fBrkIShBXtpw/ g89LyPAN2g/Umz6R9EOjH/kX0fv60Il6dZ+9MHsjReZQGs4yFvl17q0Q+sr9P+0mE+VgoY 8qr05bsEUmteOWYRNh4c4jO7CjMHEH17X/DQnYq73+qUJGw8bNk3GjVRy78gl8MMJvrJFd JsW0Xdqn6fePfro4RWZcqY43PfDKmnKJEC9owc18+yyT2xeGcir0CoxiqUhJ44DrSguJA+ KV8xScsZFumWIARKR6p3l17lH1rEQJUYU/wJtueUb6k6biq42pHZfQ7iKhsriA== 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 Subject: [PATCH 5/9] media: sun8i-a83t-mipi-csi2: Fix return code handling in stream off path Date: Thu, 8 Dec 2022 12:47:38 +0100 Message-Id: <20221208114742.399461-6-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221208114742.399461-1-paul.kocialkowski@bootlin.com> References: <20221208114742.399461-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_034812_496170_DFC494E6 X-CRM114-Status: GOOD ( 10.79 ) 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 11:47:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 13068336 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 66DA0C4332F for ; Thu, 8 Dec 2022 11:52:09 +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=FBhtrDAkPomcRDYojJW4kwu7TTJURwfrQ6E9NILdsB8=; b=2cirhpDC9mqbDH mYeUcGeKfLv4BXhbczzZvw/GFK+2c6zi0LFgNi8fQMgKFAEH5h7qtHeXbEVJHFJKY5RYEB22MZpgX Nbqp6dM4GKQQD+4sO/ickZdCEYZ9meJkOp5un0iQlMFc97AnJxJ3FqRhO1Ggq7mH0yd41HS68JF6+ 0xpEBsHT7WfePOcLzidSxT1IBPjfVz/bh3JyyIRcASmfNHgEgiamRR40HP9YbKnq+vH4PdV+EZMwq OdZ7yiQPxMrxk5dKQs0rwtC6hU9g01uEmjJmOq4iXc//7nSVZZTk9VoNydx34LyRiPbqTZfiqhPJC 9JQQgmUHB6g3i6mo0xSA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3FQU-00FtHG-1Q; Thu, 08 Dec 2022 11:50:54 +0000 Received: from relay1-d.mail.gandi.net ([217.70.183.193]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3FNu-00FpUI-7I for linux-arm-kernel@lists.infradead.org; Thu, 08 Dec 2022 11:48:16 +0000 Received: (Authenticated sender: paul.kocialkowski@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id DC0A324000B; Thu, 8 Dec 2022 11:48:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1670500092; 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=NirQ4Z0H8CCFNO8YF35iEuHBJ67K2AC07Y4K8xGkunI=; b=dlGNyauohT4CoLW3XYw+fCDaDPtU8a3v2UOKSI0wqcvevc6rxyFnt2g3zIQ+DYQa4e37tM srYnxcABuEk1VtpY9Kq5FSUBb5B36aUJ4XVrPLth6APh8HbO5TQBkXBUTLSer+UkrSk2of 0dAMaayNJi3YQuE8eT6rNq7m8xZtg7okPfB+HvTcllTwn6SK3v8SpOdLLTDs5bFw3Oja6c P5urxxIIt/IgIZAuWRaIKyOrFa/rBYW5WqKJFx7kMmkwCwc+eiBcfs0Omg+qD8LhwWqScI xBrRc4RVSykMkkBuzcfZU+2qvtzdU7k/qIfKGBS9aD6vfMoPou/clp4Cz+WVnA== 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 Subject: [PATCH 6/9] media: sun6i-isp: bridge: Fix return code handling in stream off path Date: Thu, 8 Dec 2022 12:47:39 +0100 Message-Id: <20221208114742.399461-7-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221208114742.399461-1-paul.kocialkowski@bootlin.com> References: <20221208114742.399461-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_034814_481446_90196FE7 X-CRM114-Status: GOOD ( 11.71 ) 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 --- 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 11:47:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 13068343 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 B20DAC4332F for ; Thu, 8 Dec 2022 11:52: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=j0U+pmpbbqHEUChRAUlSMrM1dgmoJ/F9FhiRjMa7gxY=; b=Th3TkOUVvD6/Ba OltuYUTX6PmQQcrkGAEOPND7Pics3jtIDu5mSOUEEj9+JJaWn9S6YhpPf3iRLs7M/zmllcNY4t5de M5wej73LdmRrdserkTq1rQCBOT+P8tra3jyrGywFm2HwS+1272/4V95J/lFUNTDIYdipdNGnmjIYh 8YcFnp7Q9lk4qja9ytvQDZhJxdaBQQt7lJhv/gSZIJ6TW3TSz9hRGInrtEQfcYppUPBEf2Kqnx5At fFo/tfg70rl2TjCpUp/HV3hZNYEmSiScy7vnjMmcFdgqZqlEltnIH0LINKn0Wj3HmUs7VrQAerRxu oY5Kn+jCgPFLjxqzV5PQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3FR7-00Fu0H-Re; Thu, 08 Dec 2022 11:51:34 +0000 Received: from relay1-d.mail.gandi.net ([217.70.183.193]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3FNw-00FpWm-Al for linux-arm-kernel@lists.infradead.org; Thu, 08 Dec 2022 11:48:18 +0000 Received: (Authenticated sender: paul.kocialkowski@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id D1A01240011; Thu, 8 Dec 2022 11:48:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1670500094; 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=AdvPC73c9zwfkFT3idm11mKPKt/UTJmdPBrpsnJ9sEg=; b=DtiFiffK3Z98ZaFmBXwerOQeFzge8eRkBWde/Pd1X3KqrPJKGWFDwDVKVtpGS/eiMk9/5E TorFM8o8IyCQ2MvECljMaTW6U1RFBqHCGt5BvVK9K9e+wf5gjJ229V2pcvZXTq5Od5r9kt ++SnRgVYIEetCpQ8n9mj0WIBH4LeCnWIFTtEaYBzk1crXGFjs5SO9a3xfIhVwS7SrcGgpi +GIXb573ZWdyHhxJAaaOkq4XYbEQaSFRBVxpEpG2ri7/vVRi/jvuGm16+v/dkNjPaLppf+ u/W+BheJsV1Jly/MvH57Vo5TpJCnNjX09LWFI5OckHEex8C/jIFh/54+N7l7tg== 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 Subject: [PATCH 7/9] media: sun6i-isp: bridge: Error out on invalid port to fix warning Date: Thu, 8 Dec 2022 12:47:40 +0100 Message-Id: <20221208114742.399461-8-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221208114742.399461-1-paul.kocialkowski@bootlin.com> References: <20221208114742.399461-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_034816_573548_B8430336 X-CRM114-Status: GOOD ( 10.75 ) 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 --- 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 11:47:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 13068344 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 2B70AC4332F for ; Thu, 8 Dec 2022 11:53:16 +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=ZFCuVTGCwJJHweUHaJm3psMWPgGNHVgFm0rOzBPwpwY=; b=a6g+PcTEohMQpY NRUtDpbQphJqkWijfPTqCtCSQBzlbp6+cwLmiAXZxk5hqVhQ/fQcdG8z/JjMFRQKMwPyKIWlsK2jm uqHxdHqvmW8pwJJ7RX7vPToDE5wHJzjpMCo1JoN3FAo6WeCVVJfAQpNBtbCt6tdE/bcCUR0Hh8wET IqngiMB/DCUzAOJ8j53jpTxG09E0PsVFix4/NMTQoH5nh+QjZU9x4fIj/vdSkHQsF+YixRrtUYo3a BTTz4csK8Gt2u7yI0JIHyBOHJbI1tV/F+0UjDXBUplBlOCo+7wA1XNU2SPa7VWvBZR7gnVz24kK3V Oh6mebpagJT6ZHZ6PRdA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3FRZ-00FuT8-Uc; Thu, 08 Dec 2022 11:52:02 +0000 Received: from relay1-d.mail.gandi.net ([217.70.183.193]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3FNy-00FpYg-QJ for linux-arm-kernel@lists.infradead.org; Thu, 08 Dec 2022 11:48:20 +0000 Received: (Authenticated sender: paul.kocialkowski@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id EE608240007; Thu, 8 Dec 2022 11:48:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1670500097; 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=Nq7On3/y97eL5Yt3PQUNo7Mzs47XouX8Q1gOqpBPXDc=; b=ESnn3CLB9UXs+pb/6kjzhtYQHR/ob4VE/Q9MpLKgbAZNd5T8pMnicF/JIpWQAJQo7ISVAi lnhkngQ5QoD5Q8UtiNvrCjdWpy+tphZECKD6yEjaMPWLiGuMUoEQrph8DKwl3QjtM69fv6 SBrg/MNDBL8RUXJzSRJSmiX9Y/PnBzkZVg1KwklD0xit34uoHgRarI89qcgV4DkM/ikWuV YskLD6Hhz1yqKaVWuf5pcVZk9M7fQTXv0cRn/v2nMEuSSlLWySxa1OesxhC2xb6pmzUhtJ DbhQ4mYv3ctamd4WN9vqmn83yqiIcMGeEgdeAcM45zxK1MOnFXj5I8Xjt1vx0A== 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 Subject: [PATCH 8/9] media: sun6i-isp: capture: Fix uninitialized variable use Date: Thu, 8 Dec 2022 12:47:41 +0100 Message-Id: <20221208114742.399461-9-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221208114742.399461-1-paul.kocialkowski@bootlin.com> References: <20221208114742.399461-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_034819_110380_DCBA0EBE X-CRM114-Status: GOOD ( 10.57 ) 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 --- 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 11:47:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 13068345 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 A9DAFC3A5A7 for ; Thu, 8 Dec 2022 11:54:03 +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=3Avu3n65vOg9WKp9K0GQLkAPFGfXxwQwEh9+B3tHNcA=; b=5Gzu2uVzI6GZFs K4t/Bw9DFgNk4pAIrz10faItbMN+v2oepXqAPMIsYDCVXlR/VTpkH3UcVmnIupr64IafOiMhDd4sk o6Ahl5q/RuOoM2MMZwGTRU3QPwWeI7c0OEdkK3rW84sYxh6JMpPbnJr4zlXA87LKb5hWK++wGMVuP X0aYS8VXB/f1qlSmpZduph3Y6If8IqwozbbY7O/hAS5Tf/3h5p7OlIf9pKsBw7TnUSmpYwQtjVnt3 nLb9sfFnEY954vahuVuIhGJ8Ziwue309QN8ZczzRW6zOUQUOlhYxil29pIifUe9MvVqI0R69IljHm KkeWGzPVluoiR7FbGetg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3FSA-00Fv7V-Eu; Thu, 08 Dec 2022 11:52:39 +0000 Received: from relay1-d.mail.gandi.net ([2001:4b98:dc4:8::221]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3FO0-00Fpaz-Uw for linux-arm-kernel@lists.infradead.org; Thu, 08 Dec 2022 11:48:22 +0000 Received: (Authenticated sender: paul.kocialkowski@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 5ABB2240003; Thu, 8 Dec 2022 11:48:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1670500099; 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=o81YP8iaZF1sop9pwY0IwP4XTu0ePsqSN3S/jSq8oYA=; b=Gyumw+GixaiC3XEvP2m0jiuXtKSMmOoPQYdBHwKffcmJvOD0547GyaPAKmImac3mfSwIgT rew5O9Bu+fpPpLMCElY2ncv9sv0/4g0WIn/FWfnTxvDy5YboXrLrv7D2AXL3tIqBmRK1fl N2nOo+BfLthi2Y5BMhBh7lFwtNcUbtzZLF6zoEj6AoVhCgBwj36p75O/3+rWgKxP2YZJhx 8n6PZU0xNSRIvqIH1pBHw+IQgRBW7dLuLDLGnu75DYRyb9emhaznkyirz2pTyahAaV0KiN Ni0Ej24+fgpmFVQPUTvh3FV6H7SJCM4XSyvPVcLTTjxCdYKIsSpu0t6YTFLQuw== 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 Subject: [PATCH 9/9] media: sun6i-isp: params: Fix incorrect indentation Date: Thu, 8 Dec 2022 12:47:42 +0100 Message-Id: <20221208114742.399461-10-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221208114742.399461-1-paul.kocialkowski@bootlin.com> References: <20221208114742.399461-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_034821_202080_CF116B19 X-CRM114-Status: UNSURE ( 9.49 ) X-CRM114-Notice: Please train this message. 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 --- 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;