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=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no 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 92339C4361A for ; Thu, 3 Dec 2020 22:57:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 34A54223E4 for ; Thu, 3 Dec 2020 22:57:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388178AbgLCW4z (ORCPT ); Thu, 3 Dec 2020 17:56:55 -0500 Received: from mga09.intel.com ([134.134.136.24]:19998 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725912AbgLCW4z (ORCPT ); Thu, 3 Dec 2020 17:56:55 -0500 IronPort-SDR: sqq01kPgv1iP7xrNursPixfHS1txqIFibS0X7aypE0rv1nifyWc9nrp6VTssH+GTLK/3qejBmS uDDMzCUS8I9A== X-IronPort-AV: E=McAfee;i="6000,8403,9824"; a="173449010" X-IronPort-AV: E=Sophos;i="5.78,390,1599548400"; d="scan'208";a="173449010" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2020 14:55:14 -0800 IronPort-SDR: BlLXb2daAGH6gO1pWQ05HxS+B4qkaFHe+vTk8wuk0phOB3AhT6jWHSL+HxwhLyTSWKtjiBuru4 1xLtmtAiVUtQ== X-IronPort-AV: E=Sophos;i="5.78,390,1599548400"; d="scan'208";a="374097572" Received: from paasikivi.fi.intel.com ([10.237.72.42]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2020 14:55:12 -0800 Received: by paasikivi.fi.intel.com (Postfix, from userid 1000) id 100FF21E1A; Fri, 4 Dec 2020 00:55:10 +0200 (EET) Date: Fri, 4 Dec 2020 00:55:10 +0200 From: Sakari Ailus To: Arnd Bergmann Cc: Mauro Carvalho Chehab , Arnd Bergmann , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] media: smiapp: avoid printing an uninitialized variable Message-ID: <20201203225509.GP852@paasikivi.fi.intel.com> References: <20201203222828.1029943-1-arnd@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201203222828.1029943-1-arnd@kernel.org> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Arnd, Thanks for the patch. On Thu, Dec 03, 2020 at 11:28:16PM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann > > There is no intialization for the 'reg' variable, so printing > it produces undefined behavior as well as a compile-time warning: > > drivers/media/i2c/ccs/ccs-core.c:314:49: error: variable 'reg' is uninitialized when used here [-Werror,-Wuninitialized] > "0x%8.8x %s pixels: %d %s (pixelcode %u)\n", reg, > > Remove the variable and stop printing it. > > Fixes: b24cc2a18c50 ("media: smiapp: Rename as "ccs"") The patch introducing this was fd9065812c7b ("media: smiapp: Obtain frame descriptor from CCS limits") so I'll use it instead. Also s/smiapp/ccs/ in the subject. Interesting that GCC 8.3 didn't complain. -- Kind regards, Sakari Ailus