From patchwork Mon Apr 16 16:37:11 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: 10343597 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 298D86039A for ; Mon, 16 Apr 2018 17:30:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1869C28845 for ; Mon, 16 Apr 2018 17:30:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0C87128847; Mon, 16 Apr 2018 17:30:58 +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 7E46428845 for ; Mon, 16 Apr 2018 17:30:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752713AbeDPRa4 (ORCPT ); Mon, 16 Apr 2018 13:30:56 -0400 Received: from osg.samsung.com ([64.30.133.232]:63299 "EHLO osg.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751398AbeDPRa4 (ORCPT ); Mon, 16 Apr 2018 13:30:56 -0400 Received: from localhost (localhost [127.0.0.1]) by osg.samsung.com (Postfix) with ESMTP id A0A112703A; Mon, 16 Apr 2018 10:30:55 -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 HstEn9fzUhrw; Mon, 16 Apr 2018 10:30:54 -0700 (PDT) Received: from smtp.s-opensource.com (unknown [201.86.164.1]) by osg.samsung.com (Postfix) with ESMTPSA id 4879127031; Mon, 16 Apr 2018 10:30:54 -0700 (PDT) Received: from mchehab by smtp.s-opensource.com with local (Exim 4.90_1) (envelope-from ) id 1f877x-0004Au-FK; 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 , Hans de Goede , Aishwarya Pant , devel@driverdev.osuosl.org Subject: [PATCH 8/9] media: atomisp-mt9m114: remove dead data Date: Mon, 16 Apr 2018 12:37:11 -0400 Message-Id: <875091fd30e1db325d2a2ecaacd5a15b64d69b52.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 It seems that, originally, the logic would allow selecting between fine and coarse integration. However, only coarse seems to be implemented. Get rid of this warning: drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c: In function 'mt9m114_s_exposure': drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c:1003:6: warning: variable 'exposure_local' set but not used [-Wunused-but-set-variable] u16 exposure_local[3]; ^~~~~~~~~~~~~~ Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c b/drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c index 44db9f9f1fc5..454a5c31a206 100644 --- a/drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c +++ b/drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c @@ -995,12 +995,10 @@ static long mt9m114_s_exposure(struct v4l2_subdev *sd, struct mt9m114_device *dev = to_mt9m114_sensor(sd); int ret = 0; unsigned int coarse_integration = 0; - unsigned int fine_integration = 0; unsigned int FLines = 0; unsigned int FrameLengthLines = 0; /* ExposureTime.FrameLengthLines; */ unsigned int AnalogGain, DigitalGain; u32 AnalogGainToWrite = 0; - u16 exposure_local[3]; dev_dbg(&client->dev, "%s(0x%X 0x%X 0x%X)\n", __func__, exposure->integration_time[0], exposure->gain[0], @@ -1032,10 +1030,7 @@ static long mt9m114_s_exposure(struct v4l2_subdev *sd, return -EINVAL; } - /* set coarse/fine integration */ - exposure_local[0] = REG_EXPO_COARSE; - exposure_local[1] = (u16)coarse_integration; - exposure_local[2] = (u16)fine_integration; + /* set coarse integration */ /* 3A provide real exposure time. should not translate to any value here. */ ret = mt9m114_write_reg(client, MISENSOR_16BIT,