From patchwork Thu Dec 3 22:28:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 336949 Delivered-To: patch@linaro.org Received: by 2002:a92:5e16:0:0:0:0:0 with SMTP id s22csp673029ilb; Thu, 3 Dec 2020 14:30:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJyl5fGhmHat1F3HWmn6Xe5aUTMyh726CAcDWQ4waXbuKMBUeUPAi8cpjbYOG4dTLkd0TWDj X-Received: by 2002:aa7:d750:: with SMTP id a16mr1033325eds.252.1607034621794; Thu, 03 Dec 2020 14:30:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607034621; cv=none; d=google.com; s=arc-20160816; b=xK4o/rbKUKaEYze95jeaB6SgJiey25cq43BT4NCWqOD+HVXCf+qvtCNZ7ldvPnrX3J kOP616/4U6RfJpxWgXFP7VzDK+8zQKr1rmTIXLk+CuZOBQ2FB4MJczEJqiJaqdINT/EL tT7U8VHKzjB8XQX9bM8yWQlfzICFbOcxSSgfQ8iUShwIVWmvGDHpJtwxPL9KP7NrBGfM 2dO3JO3i3FQU98j7/mbAJ62v6lKNFeI+E1Cjhu/5dVDToVabI6f03+5I8gme83THhLvu 5JobXtd+n5+GCP2zbi90hpFbpSASg4D10HJnYfTPDh1z7YFyYl/lm/h7GzViR9p/c14G Qs8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=NKJY09ybt/ynGvrFqD7c/AvZ6lUDGTlr3ONm62xo5/8=; b=FadzxMhbp1XMxOs/Rwz4mNdPH952D01sG7rMnfbsvKpJWJZGR8d0uhlqv5tAVHVLpP Z1UjwBsXLqd4wpxY8vgFgcMBGb8KRktKKHpMI426y792smVO1h0fEFV0ZMkS6RbrOZm9 DThRNGOnigdludSPdQHZVRPOB1y/YHCOOP7/U9PL6LGI2pthyntZPaGJfX5uhnAquuU+ x4eqp2Ypm3QzKWt2ixL5jQUML2jg21FkYmVVazyUUuwL18lonXrETcsplG3t+PDEKNXh eEJwu39OMkaM9qzixRneedjp7c3p1S1kZNwZEGSMz0r3digTfLiXjnm5HPUY1HmVXQMq YuRQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-media-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-media-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k5si839281edj.176.2020.12.03.14.30.21; Thu, 03 Dec 2020 14:30:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-media-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-media-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-media-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727842AbgLCW3N (ORCPT + 4 others); Thu, 3 Dec 2020 17:29:13 -0500 Received: from mail.kernel.org ([198.145.29.99]:54108 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726405AbgLCW3N (ORCPT ); Thu, 3 Dec 2020 17:29:13 -0500 From: Arnd Bergmann Authentication-Results: mail.kernel.org; dkim=permerror (bad message/signature format) To: Sakari Ailus , Mauro Carvalho Chehab Cc: Arnd Bergmann , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] media: smiapp: avoid printing an uninitialized variable Date: Thu, 3 Dec 2020 23:28:16 +0100 Message-Id: <20201203222828.1029943-1-arnd@kernel.org> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org 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"") Signed-off-by: Arnd Bergmann --- drivers/media/i2c/ccs/ccs-core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 2.27.0 diff --git a/drivers/media/i2c/ccs/ccs-core.c b/drivers/media/i2c/ccs/ccs-core.c index 69e7990c65f3..58a42459109d 100644 --- a/drivers/media/i2c/ccs/ccs-core.c +++ b/drivers/media/i2c/ccs/ccs-core.c @@ -257,7 +257,6 @@ static int ccs_read_frame_fmt(struct ccs_sensor *sensor) u32 pixels; char *which; char *what; - u32 reg; if (fmt_model_type == CCS_FRAME_FORMAT_MODEL_TYPE_2_BYTE) { desc = CCS_LIM_AT(sensor, FRAME_FORMAT_DESCRIPTOR, i); @@ -311,7 +310,7 @@ static int ccs_read_frame_fmt(struct ccs_sensor *sensor) } dev_dbg(&client->dev, - "0x%8.8x %s pixels: %d %s (pixelcode %u)\n", reg, + "%s pixels: %d %s (pixelcode %u)\n", what, pixels, which, pixelcode); if (i < ncol_desc) {