From patchwork Mon Apr 16 16:37:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 10343471 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B8232601D7 for ; Mon, 16 Apr 2018 16:37:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AA82428815 for ; Mon, 16 Apr 2018 16:37:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9F5442881C; Mon, 16 Apr 2018 16:37:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 55C1C28815 for ; Mon, 16 Apr 2018 16:37:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752578AbeDPQh3 (ORCPT ); Mon, 16 Apr 2018 12:37:29 -0400 Received: from osg.samsung.com ([64.30.133.232]:48051 "EHLO osg.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752058AbeDPQhT (ORCPT ); Mon, 16 Apr 2018 12:37:19 -0400 Received: from localhost (localhost [127.0.0.1]) by osg.samsung.com (Postfix) with ESMTP id D492226E8B; Mon, 16 Apr 2018 09:37:18 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at dev.s-opensource.com X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from osg.samsung.com ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kuY9tNcr6s0H; Mon, 16 Apr 2018 09:37:17 -0700 (PDT) Received: from smtp.s-opensource.com (unknown [201.86.164.1]) by osg.samsung.com (Postfix) with ESMTPSA id 111D426E56; Mon, 16 Apr 2018 09:37:16 -0700 (PDT) Received: from mchehab by smtp.s-opensource.com with local (Exim 4.90_1) (envelope-from ) id 1f877x-0004Ae-Bp; Mon, 16 Apr 2018 12:37:13 -0400 From: Mauro Carvalho Chehab Cc: Mauro Carvalho Chehab , Linux Media Mailing List , Mauro Carvalho Chehab , Alan Cox , Sakari Ailus , Greg Kroah-Hartman , Andy Shevchenko , Hans Verkuil , Arvind Yadav , "Guillermo O. Freschi" , Aishwarya Pant , devel@driverdev.osuosl.org Subject: [PATCH 4/9] media: staging: atomisp-gc2235: don't fill an unused var Date: Mon, 16 Apr 2018 12:37:07 -0400 Message-Id: <3adf2de3ce8958229a1322c01e180351086d06b1.1523896259.git.mchehab@s-opensource.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: References: In-Reply-To: References: To: unlisted-recipients:; (no To-header on input) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The code with uses the dummy var is commented out. So, coment out its definition/initialization. Fix this warning: drivers/staging/media/atomisp/i2c/atomisp-gc2235.c: In function 'gc2235_get_intg_factor': drivers/staging/media/atomisp/i2c/atomisp-gc2235.c:249:26: warning: variable 'dummy' set but not used [-Wunused-but-set-variable] u16 reg_val, reg_val_h, dummy; ^~~~~ Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/media/atomisp/i2c/atomisp-gc2235.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c b/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c index 93f9c618f3d8..4b6b6568b3cf 100644 --- a/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c +++ b/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c @@ -246,7 +246,7 @@ static int gc2235_get_intg_factor(struct i2c_client *client, struct v4l2_subdev *sd = i2c_get_clientdata(client); struct gc2235_device *dev = to_gc2235_sensor(sd); struct atomisp_sensor_mode_data *buf = &info->data; - u16 reg_val, reg_val_h, dummy; + u16 reg_val, reg_val_h; int ret; if (!info) @@ -316,7 +316,9 @@ static int gc2235_get_intg_factor(struct i2c_client *client, if (ret) return ret; - dummy = (reg_val_h << 8) | reg_val; +#if 0 + u16 dummy = (reg_val_h << 8) | reg_val; +#endif ret = gc2235_read_reg(client, GC2235_8BIT, GC2235_SH_DELAY_H, ®_val_h);