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 X-Spam-Level: X-Spam-Status: No, score=-14.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E1033C47080 for ; Tue, 1 Jun 2021 12:48:30 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id AE173613BD for ; Tue, 1 Jun 2021 12:48:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AE173613BD Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=j5DuYRaCT/wH587T7wGa5AQ2u3zfPkutCMxkCCoFhiU=; b=F6RUo9SrOQhNNl zLiczqd9X04k75daJyiheoh7hOs22MEiPTt9kG7qNIXbJfaK2yhGLGCDsaV8SIN3pzBqnufE6g23x TuEsMfDw4+dX+7AVDIkLUjf5HE1Z+gB48wR943/2MSTIJOcPcyy7ZygAqWMY/lGoXcN1XJBygC4R8 6oIffUJNb+5wBDDT7PP5sq3/pJiiG/+FJRJ1w9Ql6uhcy7/Be2wMp4kUaNDolBZS2ubYcOTViENk2 bN/I9eXlNB3TebXCgTQvwEA5HeH/Du+NRx4kMXT0YwlBlTmBzLFUEkP2ZWvupGLTUUzmOitqCTHNE nqCycZ9nP7TnQaEu07iQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lo3nR-00GaD9-3s; Tue, 01 Jun 2021 12:47:01 +0000 Received: from perceval.ideasonboard.com ([2001:4b98:dc2:55:216:3eff:fef7:d647]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lo3nM-00GaAd-Rq for linux-arm-kernel@lists.infradead.org; Tue, 01 Jun 2021 12:46:58 +0000 Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id D3C0F88C; Tue, 1 Jun 2021 14:46:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1622551613; bh=pEVvmyFStsOwrTtf+TJW7eOTlI/2Bu2ObexnAPsjg1Q=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LVH9e96ZzxEBe9OxvsKUkdLcT1KcuKyzPyLZxa9IR7alvgqTs5TVS1G//vlZ9I9Ym sBArtMpicHvJcJss2Yhm89DYJZh78gqirWFfsHX6xKOgq9uNsFA/j9+41eJl0g0Va7 25N8BfrhGtz4PB8PsCDN1AA/q2W875ZIxxceUzbE= Date: Tue, 1 Jun 2021 15:46:42 +0300 From: Laurent Pinchart To: trix@redhat.com Cc: rmfrfs@gmail.com, slongerbeam@gmail.com, p.zabel@pengutronix.de, mchehab@kernel.org, gregkh@linuxfoundation.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, linux-media@vger.kernel.org, linux-staging@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] media: imx: imx7_mipi_csis: convert some switch cases to the default Message-ID: References: <20210531174300.2594109-1-trix@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210531174300.2594109-1-trix@redhat.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210601_054657_089210_3E60ED6D X-CRM114-Status: GOOD ( 18.26 ) 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: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Tom, Thank you for the patch. On Mon, May 31, 2021 at 10:43:00AM -0700, trix@redhat.com wrote: > From: Tom Rix > > Static analysis reports this false positive > imx7-mipi-csis.c:1027:2: warning: 4th function call argument is > an uninitialized value > > The variable 'align' is falsely reported as uninitialized. > Even though all the cases are covered in the > switch (csis_fmt->width % 8) { > > Because there is no default case, it is reported as uninialized. > > Improve the switch by converting the most numerous set of cases > to the default and silence the false positive. > > Signed-off-by: Tom Rix Reviewed-by: Laurent Pinchart > --- > drivers/staging/media/imx/imx7-mipi-csis.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/staging/media/imx/imx7-mipi-csis.c b/drivers/staging/media/imx/imx7-mipi-csis.c > index d573f3475d28..330f283030ec 100644 > --- a/drivers/staging/media/imx/imx7-mipi-csis.c > +++ b/drivers/staging/media/imx/imx7-mipi-csis.c > @@ -1016,10 +1016,8 @@ static int mipi_csis_set_fmt(struct v4l2_subdev *sd, > case 6: > align = 2; > break; > - case 1: > - case 3: > - case 5: > - case 7: > + default: > + /* 1, 3, 5, 7 */ > align = 3; > break; > } -- Regards, Laurent Pinchart _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel