From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 329792F3D; Thu, 8 Dec 2022 13:57:26 +0000 (UTC) Received: (Authenticated sender: paul.kocialkowski@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 7BE0540009; Thu, 8 Dec 2022 13:57:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1670507845; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Mr7vzB06ht6izeqsLHAia6JSQyQ1GNVqrccqV8dELgw=; b=DCDRHaqHKOtHFvSe0xYDJk3kFFuNCF608DJmF1Ke49OrphC+kEsbFvOFWPlw3VPNrRZI+1 ZU9aKAaF+ZODnViGtoxXxFmr+L+gXshALTNDSWbF91Jm7sOhqzjS+QlBLAzLi2MDuGXKG+ nIAl2Ljwd1oSA+IBIU14we++A59VNUDAh5Jw8YcvYy382VRl1GCZi5Flq1tG+5AWai0AGn wKE9Z4jjRN+alZWX/vL//ioFfzRY63K6gpOM/llOvgic6mHbINMMauKybI5u+YQbIRfLWc cM8MCLMGt25iy+iHwLefsjtMnQu/58Jne5S3MJkPooyesnbI/10NsBr6DXz+PA== Date: Thu, 8 Dec 2022 14:57:22 +0100 From: Paul Kocialkowski To: Conor Dooley Cc: Nathan Chancellor , Mauro Carvalho Chehab , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev, Rob Herring , Krzysztof Kozlowski , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Sakari Ailus , Hans Verkuil , Laurent Pinchart , Maxime Ripard , Thomas Petazzoni , llvm@lists.linux.dev Subject: Re: [PATCH v8 3/6] staging: media: Add support for the Allwinner A31 ISP Message-ID: References: <20221103163717.246217-1-paul.kocialkowski@bootlin.com> <20221103163717.246217-4-paul.kocialkowski@bootlin.com> Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Eq1pwegXvM8VevdS" Content-Disposition: inline In-Reply-To: --Eq1pwegXvM8VevdS Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Conor, Nathan, On Wed 07 Dec 22, 10:06, Conor Dooley wrote: > On Sun, Nov 27, 2022 at 11:31:41PM -0700, Nathan Chancellor wrote: > > Hi Paul, > >=20 > > On Thu, Nov 03, 2022 at 05:37:14PM +0100, Paul Kocialkowski wrote: > > > Some Allwinner platforms come with an Image Signal Processor, which > > > supports various features in order to enhance and transform data > > > received by image sensors into good-looking pictures. In most cases, > > > the data is raw bayer, which gets internally converted to RGB and > > > finally YUV, which is what the hardware produces. > > >=20 > > > This driver supports ISPs that are similar to the A31 ISP, which was > > > the first standalone ISP found in Allwinner platforms. Simpler ISP > > > blocks were found in the A10 and A20, where they are tied to a CSI > > > controller. Newer generations of Allwinner SoCs (starting with the > > > H6, H616, etc) come with a new camera subsystem and revised ISP. > > > Even though these previous and next-generation ISPs are somewhat > > > similar to the A31 ISP, they have enough significant differences to > > > be out of the scope of this driver. > > >=20 > > > While the ISP supports many features, including 3A and many > > > enhancement blocks, this implementation is limited to the following: > > > - V3s (V3/S3) platform support; > > > - Bayer media bus formats as input; > > > - Semi-planar YUV (NV12/NV21) as output; > > > - Debayering with per-component gain and offset configuration; > > > - 2D noise filtering with configurable coefficients. > > >=20 > > > Since many features are missing from the associated uAPI, the driver > > > is aimed to integrate staging until all features are properly > > > described. > > >=20 > > > On the technical side, it uses the v4l2 and media controller APIs, > > > with a video node for capture, a processor subdev and a video node > > > for parameters submission. A specific uAPI structure and associated > > > v4l2 meta format are used to configure parameters of the supported > > > modules. > > >=20 > > > One particular thing about the hardware is that configuration for > > > module registers needs to be stored in a DMA buffer and gets copied > > > to actual registers by the hardware at the next vsync, when instructed > > > by a flag. This is handled by the "state" mechanism in the driver. > > >=20 > > > Signed-off-by: Paul Kocialkowski > >=20 > > This patch is now in -next as commit e3185e1d7c14 ("media: staging: > > media: Add support for the Allwinner A31 ISP"), where it causes the > > following clang warnings: >=20 > FWIW, this is (as yet) unfixed & thus breaking allmodconfig w/ clang. > I had a quick look on lore but could not see a proposed fix other than > what Nathan has pasted below. Sorry for the inconvenience. I've just sent a fix series which should resol= ve these issues (and other ones too): "Allwinner A31/A83T CSI/ISP/MIPI CSI-2 m= edia fixes" (version 2). Thanks for the report! Paul > > > +void sun6i_isp_capture_configure(struct sun6i_isp_device *isp_dev) > > > +{ > > > + unsigned int width, height; > > > + unsigned int stride_luma, stride_chroma =3D 0; > > > + unsigned int stride_luma_div4, stride_chroma_div4; > > > + const struct sun6i_isp_capture_format *format; > > > + const struct v4l2_format_info *info; > > > + u32 pixelformat; > > > + > > > + sun6i_isp_capture_dimensions(isp_dev, &width, &height); > > > + sun6i_isp_capture_format(isp_dev, &pixelformat); > > > + > > > + format =3D sun6i_isp_capture_format_find(pixelformat); > > > + if (WARN_ON(!format)) > > > + return; > > > + > > > + sun6i_isp_load_write(isp_dev, SUN6I_ISP_MCH_SIZE_CFG_REG, > > > + SUN6I_ISP_MCH_SIZE_CFG_WIDTH(width) | > > > + SUN6I_ISP_MCH_SIZE_CFG_HEIGHT(height)); > > > + > > > + info =3D v4l2_format_info(pixelformat); > > > + if (WARN_ON(!info)) > > > + return; > > > + > > > + stride_luma =3D width * info->bpp[0]; > > > + stride_luma_div4 =3D DIV_ROUND_UP(stride_luma, 4); > > > + > > > + if (info->comp_planes > 1) { > > > + stride_chroma =3D width * info->bpp[1] / info->hdiv; > > > + stride_chroma_div4 =3D DIV_ROUND_UP(stride_chroma, 4); > > > + } > > > + > > > + sun6i_isp_load_write(isp_dev, SUN6I_ISP_MCH_CFG_REG, > > > + SUN6I_ISP_MCH_CFG_EN | > > > + SUN6I_ISP_MCH_CFG_OUTPUT_FMT(format->output_format) | > > > + SUN6I_ISP_MCH_CFG_STRIDE_Y_DIV4(stride_luma_div4) | > > > + SUN6I_ISP_MCH_CFG_STRIDE_UV_DIV4(stride_chroma_div4)); > > > +} > >=20 > >=20 > > drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_capture.c:135:6: erro= r: variable 'stride_chroma_div4' is used uninitialized whenever 'if' condit= ion is false [-Werror,-Wsometimes-uninitialized] > > if (info->comp_planes > 1) { > > ^~~~~~~~~~~~~~~~~~~~~ > > drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_capture.c:144:42: not= e: uninitialized use occurs here > > SUN6I_ISP_MCH_CFG_STRIDE_UV_DIV4(stride_c= hroma_div4)); > > ^~~~~~~= ~~~~~~~~~~~ > > drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_reg.h:249:48: note: e= xpanded from macro 'SUN6I_ISP_MCH_CFG_STRIDE_UV_DIV4' > > #define SUN6I_ISP_MCH_CFG_STRIDE_UV_DIV4(v) (((v) << 20) & GENMAS= K(30, 20)) > > ^ > > drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_capture.c:135:2: note= : remove the 'if' if its condition is always true > > if (info->comp_planes > 1) { > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~ > > drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_capture.c:112:51: not= e: initialize the variable 'stride_chroma_div4' to silence this warning > > unsigned int stride_luma_div4, stride_chroma_div4; > > ^ > > =3D 0 > >=20 > > Does stride_chroma_div4 want to just be initialized to zero? > >=20 > > > +static int sun6i_isp_proc_notifier_bound(struct v4l2_async_notifier = *notifier, > > > + struct v4l2_subdev *remote_subdev, > > > + struct v4l2_async_subdev *async_subdev) > > > +{ > > > + struct sun6i_isp_device *isp_dev =3D > > > + container_of(notifier, struct sun6i_isp_device, proc.notifier); > > > + struct sun6i_isp_proc_async_subdev *proc_async_subdev =3D > > > + container_of(async_subdev, struct sun6i_isp_proc_async_subdev, > > > + async_subdev); > > > + struct sun6i_isp_proc *proc =3D &isp_dev->proc; > > > + struct sun6i_isp_proc_source *source =3D proc_async_subdev->source; > > > + bool enabled; > > > + > > > + switch (source->endpoint.base.port) { > > > + case SUN6I_ISP_PORT_CSI0: > > > + source =3D &proc->source_csi0; > > > + enabled =3D true; > > > + break; > > > + case SUN6I_ISP_PORT_CSI1: > > > + source =3D &proc->source_csi1; > > > + enabled =3D !proc->source_csi0.expected; > > > + break; > > > + default: > > > + break; > > > + } > > > + > > > + source->subdev =3D remote_subdev; > > > + > > > + return sun6i_isp_proc_link(isp_dev, SUN6I_ISP_PROC_PAD_SINK_CSI, > > > + remote_subdev, enabled); > > > +} > >=20 > > drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_proc.c:418:2: error: = variable 'enabled' is used uninitialized whenever switch default is taken [= -Werror,-Wsometimes-uninitialized] > > default: > > ^~~~~~~ > > drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_proc.c:425:23: note: = uninitialized use occurs here > > remote_subdev, enabled); > > ^~~~~~~ > > drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_proc.c:407:14: note: = initialize the variable 'enabled' to silence this warning > > bool enabled; > > ^ > > =3D 0 > >=20 > > Should there be an early return in the default case? > >=20 > > I do not mind sending patches if you are unable to, assuming I have the > > right fixes. > >=20 > > Cheers, > > Nathan > >=20 --=20 Paul Kocialkowski, Bootlin Embedded Linux and kernel engineering https://bootlin.com --Eq1pwegXvM8VevdS Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEJZpWjZeIetVBefti3cLmz3+fv9EFAmOR7UIACgkQ3cLmz3+f v9HUhgf+MqWFRHpJteq7pbYqsoMp5NzKApq8Hab85Kt4+jkrdLX2dh6CaKTamgE/ 40oyJ2sy5UkWIMNxPsfOdsDPV4d5K5VE430Rqd8EnA7Vu3uPV6Mwbl7YtMcsIIhh QKFpamExdTcvdL3wUE8pUylLl4ivuwXeJYblWp9JdzzqhBQYE0hcuCdryF0hPm0l R2h3rc0+jnlq6Lmv38MMTM1WFh8j6Fz9rPz8yEEoKBq4WSRGKn1Tdt6Ksmv7hmKh uz3RTdIauzhkUziTluMjhmBgWjI843kki2vXNo6X6pUk05zM6qxF7Iiat2jIgRW2 iyAWJvWttMBPhfa1UzYG2Rn8BFiiYw== =Vl1z -----END PGP SIGNATURE----- --Eq1pwegXvM8VevdS-- From mboxrd@z Thu Jan 1 00:00:00 1970 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 3BAE1C4332F for ; Thu, 8 Dec 2022 14:03:04 +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-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=42uDYocgogXdaufbJoWgIe2EisNo3tavWh/Uic85UFI=; b=NMJcyDhh/JhOjgvJuIqrcgXZnC du/RbJWjxvRsDJbjig1ij7ROuUG2XHzLs2eqUEWGlWXZdlLDs8w00XWTtCnagcsdHAwPEUN6cnOvy TD5zuUsDyphyNGuKcU7WPvEWeOq5wbgROVc4yBWHO/jSmvJ9UiSgT0OHztrvv0UAQs+p6bLVssRr6 wl1oRf/7q6Ay7WCaR2HabbHv0aaNS6aM3G3HMKls77ZhbcVgr4q5mwTUw4Zrg2Nkdb+urVWtXN742 BX0zxoF94i7un1CM6Kc9/I7y3MXSpRoIaUlEDbW+iXU8HjSNw0M9m1ISuOQkzRezOK17Vt1/gEMAz jL5qtXow==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3HSq-001V4A-QD; Thu, 08 Dec 2022 14:01:28 +0000 Received: from relay2-d.mail.gandi.net ([2001:4b98:dc4:8::222]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3HOx-001SMq-QU for linux-arm-kernel@lists.infradead.org; Thu, 08 Dec 2022 13:57:30 +0000 Received: (Authenticated sender: paul.kocialkowski@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 7BE0540009; Thu, 8 Dec 2022 13:57:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1670507845; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Mr7vzB06ht6izeqsLHAia6JSQyQ1GNVqrccqV8dELgw=; b=DCDRHaqHKOtHFvSe0xYDJk3kFFuNCF608DJmF1Ke49OrphC+kEsbFvOFWPlw3VPNrRZI+1 ZU9aKAaF+ZODnViGtoxXxFmr+L+gXshALTNDSWbF91Jm7sOhqzjS+QlBLAzLi2MDuGXKG+ nIAl2Ljwd1oSA+IBIU14we++A59VNUDAh5Jw8YcvYy382VRl1GCZi5Flq1tG+5AWai0AGn wKE9Z4jjRN+alZWX/vL//ioFfzRY63K6gpOM/llOvgic6mHbINMMauKybI5u+YQbIRfLWc cM8MCLMGt25iy+iHwLefsjtMnQu/58Jne5S3MJkPooyesnbI/10NsBr6DXz+PA== Date: Thu, 8 Dec 2022 14:57:22 +0100 From: Paul Kocialkowski To: Conor Dooley Cc: Nathan Chancellor , Mauro Carvalho Chehab , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev, Rob Herring , Krzysztof Kozlowski , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Sakari Ailus , Hans Verkuil , Laurent Pinchart , Maxime Ripard , Thomas Petazzoni , llvm@lists.linux.dev Subject: Re: [PATCH v8 3/6] staging: media: Add support for the Allwinner A31 ISP Message-ID: References: <20221103163717.246217-1-paul.kocialkowski@bootlin.com> <20221103163717.246217-4-paul.kocialkowski@bootlin.com> MIME-Version: 1.0 In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221208_055728_239709_4B37E08A X-CRM114-Status: GOOD ( 44.02 ) 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: , Content-Type: multipart/mixed; boundary="===============2788234142521862094==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============2788234142521862094== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Eq1pwegXvM8VevdS" Content-Disposition: inline --Eq1pwegXvM8VevdS Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Conor, Nathan, On Wed 07 Dec 22, 10:06, Conor Dooley wrote: > On Sun, Nov 27, 2022 at 11:31:41PM -0700, Nathan Chancellor wrote: > > Hi Paul, > >=20 > > On Thu, Nov 03, 2022 at 05:37:14PM +0100, Paul Kocialkowski wrote: > > > Some Allwinner platforms come with an Image Signal Processor, which > > > supports various features in order to enhance and transform data > > > received by image sensors into good-looking pictures. In most cases, > > > the data is raw bayer, which gets internally converted to RGB and > > > finally YUV, which is what the hardware produces. > > >=20 > > > This driver supports ISPs that are similar to the A31 ISP, which was > > > the first standalone ISP found in Allwinner platforms. Simpler ISP > > > blocks were found in the A10 and A20, where they are tied to a CSI > > > controller. Newer generations of Allwinner SoCs (starting with the > > > H6, H616, etc) come with a new camera subsystem and revised ISP. > > > Even though these previous and next-generation ISPs are somewhat > > > similar to the A31 ISP, they have enough significant differences to > > > be out of the scope of this driver. > > >=20 > > > While the ISP supports many features, including 3A and many > > > enhancement blocks, this implementation is limited to the following: > > > - V3s (V3/S3) platform support; > > > - Bayer media bus formats as input; > > > - Semi-planar YUV (NV12/NV21) as output; > > > - Debayering with per-component gain and offset configuration; > > > - 2D noise filtering with configurable coefficients. > > >=20 > > > Since many features are missing from the associated uAPI, the driver > > > is aimed to integrate staging until all features are properly > > > described. > > >=20 > > > On the technical side, it uses the v4l2 and media controller APIs, > > > with a video node for capture, a processor subdev and a video node > > > for parameters submission. A specific uAPI structure and associated > > > v4l2 meta format are used to configure parameters of the supported > > > modules. > > >=20 > > > One particular thing about the hardware is that configuration for > > > module registers needs to be stored in a DMA buffer and gets copied > > > to actual registers by the hardware at the next vsync, when instructed > > > by a flag. This is handled by the "state" mechanism in the driver. > > >=20 > > > Signed-off-by: Paul Kocialkowski > >=20 > > This patch is now in -next as commit e3185e1d7c14 ("media: staging: > > media: Add support for the Allwinner A31 ISP"), where it causes the > > following clang warnings: >=20 > FWIW, this is (as yet) unfixed & thus breaking allmodconfig w/ clang. > I had a quick look on lore but could not see a proposed fix other than > what Nathan has pasted below. Sorry for the inconvenience. I've just sent a fix series which should resol= ve these issues (and other ones too): "Allwinner A31/A83T CSI/ISP/MIPI CSI-2 m= edia fixes" (version 2). Thanks for the report! Paul > > > +void sun6i_isp_capture_configure(struct sun6i_isp_device *isp_dev) > > > +{ > > > + unsigned int width, height; > > > + unsigned int stride_luma, stride_chroma =3D 0; > > > + unsigned int stride_luma_div4, stride_chroma_div4; > > > + const struct sun6i_isp_capture_format *format; > > > + const struct v4l2_format_info *info; > > > + u32 pixelformat; > > > + > > > + sun6i_isp_capture_dimensions(isp_dev, &width, &height); > > > + sun6i_isp_capture_format(isp_dev, &pixelformat); > > > + > > > + format =3D sun6i_isp_capture_format_find(pixelformat); > > > + if (WARN_ON(!format)) > > > + return; > > > + > > > + sun6i_isp_load_write(isp_dev, SUN6I_ISP_MCH_SIZE_CFG_REG, > > > + SUN6I_ISP_MCH_SIZE_CFG_WIDTH(width) | > > > + SUN6I_ISP_MCH_SIZE_CFG_HEIGHT(height)); > > > + > > > + info =3D v4l2_format_info(pixelformat); > > > + if (WARN_ON(!info)) > > > + return; > > > + > > > + stride_luma =3D width * info->bpp[0]; > > > + stride_luma_div4 =3D DIV_ROUND_UP(stride_luma, 4); > > > + > > > + if (info->comp_planes > 1) { > > > + stride_chroma =3D width * info->bpp[1] / info->hdiv; > > > + stride_chroma_div4 =3D DIV_ROUND_UP(stride_chroma, 4); > > > + } > > > + > > > + sun6i_isp_load_write(isp_dev, SUN6I_ISP_MCH_CFG_REG, > > > + SUN6I_ISP_MCH_CFG_EN | > > > + SUN6I_ISP_MCH_CFG_OUTPUT_FMT(format->output_format) | > > > + SUN6I_ISP_MCH_CFG_STRIDE_Y_DIV4(stride_luma_div4) | > > > + SUN6I_ISP_MCH_CFG_STRIDE_UV_DIV4(stride_chroma_div4)); > > > +} > >=20 > >=20 > > drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_capture.c:135:6: erro= r: variable 'stride_chroma_div4' is used uninitialized whenever 'if' condit= ion is false [-Werror,-Wsometimes-uninitialized] > > if (info->comp_planes > 1) { > > ^~~~~~~~~~~~~~~~~~~~~ > > drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_capture.c:144:42: not= e: uninitialized use occurs here > > SUN6I_ISP_MCH_CFG_STRIDE_UV_DIV4(stride_c= hroma_div4)); > > ^~~~~~~= ~~~~~~~~~~~ > > drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_reg.h:249:48: note: e= xpanded from macro 'SUN6I_ISP_MCH_CFG_STRIDE_UV_DIV4' > > #define SUN6I_ISP_MCH_CFG_STRIDE_UV_DIV4(v) (((v) << 20) & GENMAS= K(30, 20)) > > ^ > > drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_capture.c:135:2: note= : remove the 'if' if its condition is always true > > if (info->comp_planes > 1) { > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~ > > drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_capture.c:112:51: not= e: initialize the variable 'stride_chroma_div4' to silence this warning > > unsigned int stride_luma_div4, stride_chroma_div4; > > ^ > > =3D 0 > >=20 > > Does stride_chroma_div4 want to just be initialized to zero? > >=20 > > > +static int sun6i_isp_proc_notifier_bound(struct v4l2_async_notifier = *notifier, > > > + struct v4l2_subdev *remote_subdev, > > > + struct v4l2_async_subdev *async_subdev) > > > +{ > > > + struct sun6i_isp_device *isp_dev =3D > > > + container_of(notifier, struct sun6i_isp_device, proc.notifier); > > > + struct sun6i_isp_proc_async_subdev *proc_async_subdev =3D > > > + container_of(async_subdev, struct sun6i_isp_proc_async_subdev, > > > + async_subdev); > > > + struct sun6i_isp_proc *proc =3D &isp_dev->proc; > > > + struct sun6i_isp_proc_source *source =3D proc_async_subdev->source; > > > + bool enabled; > > > + > > > + switch (source->endpoint.base.port) { > > > + case SUN6I_ISP_PORT_CSI0: > > > + source =3D &proc->source_csi0; > > > + enabled =3D true; > > > + break; > > > + case SUN6I_ISP_PORT_CSI1: > > > + source =3D &proc->source_csi1; > > > + enabled =3D !proc->source_csi0.expected; > > > + break; > > > + default: > > > + break; > > > + } > > > + > > > + source->subdev =3D remote_subdev; > > > + > > > + return sun6i_isp_proc_link(isp_dev, SUN6I_ISP_PROC_PAD_SINK_CSI, > > > + remote_subdev, enabled); > > > +} > >=20 > > drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_proc.c:418:2: error: = variable 'enabled' is used uninitialized whenever switch default is taken [= -Werror,-Wsometimes-uninitialized] > > default: > > ^~~~~~~ > > drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_proc.c:425:23: note: = uninitialized use occurs here > > remote_subdev, enabled); > > ^~~~~~~ > > drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_proc.c:407:14: note: = initialize the variable 'enabled' to silence this warning > > bool enabled; > > ^ > > =3D 0 > >=20 > > Should there be an early return in the default case? > >=20 > > I do not mind sending patches if you are unable to, assuming I have the > > right fixes. > >=20 > > Cheers, > > Nathan > >=20 --=20 Paul Kocialkowski, Bootlin Embedded Linux and kernel engineering https://bootlin.com --Eq1pwegXvM8VevdS Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEJZpWjZeIetVBefti3cLmz3+fv9EFAmOR7UIACgkQ3cLmz3+f v9HUhgf+MqWFRHpJteq7pbYqsoMp5NzKApq8Hab85Kt4+jkrdLX2dh6CaKTamgE/ 40oyJ2sy5UkWIMNxPsfOdsDPV4d5K5VE430Rqd8EnA7Vu3uPV6Mwbl7YtMcsIIhh QKFpamExdTcvdL3wUE8pUylLl4ivuwXeJYblWp9JdzzqhBQYE0hcuCdryF0hPm0l R2h3rc0+jnlq6Lmv38MMTM1WFh8j6Fz9rPz8yEEoKBq4WSRGKn1Tdt6Ksmv7hmKh uz3RTdIauzhkUziTluMjhmBgWjI843kki2vXNo6X6pUk05zM6qxF7Iiat2jIgRW2 iyAWJvWttMBPhfa1UzYG2Rn8BFiiYw== =Vl1z -----END PGP SIGNATURE----- --Eq1pwegXvM8VevdS-- --===============2788234142521862094== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============2788234142521862094==--