From patchwork Wed Apr 12 18:20:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Cox X-Patchwork-Id: 9678153 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 2986660383 for ; Wed, 12 Apr 2017 18:20:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1FF0F28630 for ; Wed, 12 Apr 2017 18:20:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 14A3C28695; Wed, 12 Apr 2017 18:20:43 +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=-6.9 required=2.0 tests=BAYES_00,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 9234228630 for ; Wed, 12 Apr 2017 18:20:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754824AbdDLSUl (ORCPT ); Wed, 12 Apr 2017 14:20:41 -0400 Received: from mga07.intel.com ([134.134.136.100]:45787 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754659AbdDLSUl (ORCPT ); Wed, 12 Apr 2017 14:20:41 -0400 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga105.jf.intel.com with ESMTP; 12 Apr 2017 11:20:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,191,1488873600"; d="scan'208";a="1118702322" Received: from acox1-desk1.ger.corp.intel.com ([10.252.16.134]) by orsmga001.jf.intel.com with ESMTP; 12 Apr 2017 11:20:39 -0700 Subject: [PATCH 04/14] staging: atomisp: replace "&isp->asd[i]" with "asd" in __get_asd_from_port() From: Alan Cox To: greg@kroah.com, linux-media@vger.kernel.org Date: Wed, 12 Apr 2017 19:20:36 +0100 Message-ID: <149202123050.16615.10422203645444637150.stgit@acox1-desk1.ger.corp.intel.com> In-Reply-To: <149202119790.16615.4841216953457109397.stgit@acox1-desk1.ger.corp.intel.com> References: <149202119790.16615.4841216953457109397.stgit@acox1-desk1.ger.corp.intel.com> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 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 From: Daeseok Youn The address of isp->asd[i] is already assigned to local "asd" variable. "&isp->asd[i]" would be replaced with just "asd". Signed-off-by: Daeseok Youn Signed-off-by: Alan Cox --- .../media/atomisp/pci/atomisp2/atomisp_cmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c index 08606cb..d98a6ea 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c @@ -536,9 +536,9 @@ __get_asd_from_port(struct atomisp_device *isp, mipi_port_ID_t port) struct camera_mipi_info *mipi_info = atomisp_to_sensor_mipi_info( isp->inputs[asd->input_curr].camera); - if (isp->asd[i].streaming == ATOMISP_DEVICE_STREAMING_ENABLED && + if (asd->streaming == ATOMISP_DEVICE_STREAMING_ENABLED && __get_mipi_port(isp, mipi_info->port) == port) { - return &isp->asd[i]; + return asd; } }