From patchwork Fri Dec 15 15:18:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhi, Yong" X-Patchwork-Id: 10115353 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 2FCE860231 for ; Fri, 15 Dec 2017 15:18:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 145B22811A for ; Fri, 15 Dec 2017 15:18:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 04AE028A4D; Fri, 15 Dec 2017 15:18:08 +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 E1C672811A for ; Fri, 15 Dec 2017 15:18:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932111AbdLOPSF (ORCPT ); Fri, 15 Dec 2017 10:18:05 -0500 Received: from mga14.intel.com ([192.55.52.115]:43812 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932085AbdLOPSE (ORCPT ); Fri, 15 Dec 2017 10:18:04 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Dec 2017 07:18:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,405,1508828400"; d="scan'208,223";a="3106324" Received: from orsmsx106.amr.corp.intel.com ([10.22.225.133]) by orsmga006.jf.intel.com with ESMTP; 15 Dec 2017 07:18:03 -0800 Received: from orsmsx113.amr.corp.intel.com (10.22.240.9) by ORSMSX106.amr.corp.intel.com (10.22.225.133) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 15 Dec 2017 07:18:03 -0800 Received: from orsmsx106.amr.corp.intel.com ([169.254.1.178]) by ORSMSX113.amr.corp.intel.com ([169.254.9.187]) with mapi id 14.03.0319.002; Fri, 15 Dec 2017 07:18:02 -0800 From: "Zhi, Yong" To: Mauro Carvalho Chehab , Sakari Ailus CC: "linux-media@vger.kernel.org" , "Mani, Rajmohan" Subject: RE: [RESEND GIT PULL for 4.16] Intel IPU3 CIO2 CSI-2 receiver driver Thread-Topic: [RESEND GIT PULL for 4.16] Intel IPU3 CIO2 CSI-2 receiver driver Thread-Index: AQHTarEcsg0QFUbqE06YCYFfyhFu96M6Gw6AgAAG5dCACne5Ug== Date: Fri, 15 Dec 2017 15:18:02 +0000 Message-ID: References: <20171201143135.c6r2e2iaoxcvyxpi@valkosipuli.retiisi.org.uk> <20171208125937.07bb3302@vento.lan>, In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: x-originating-ip: [10.19.9.46] 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 Hi, Mauro and Sakari, Sorry for the late response, the fix of the 2 warnings is attached. Best regards, Yong From d7e9baf13b1a8c8308906a7ed213f75d12756c24 Mon Sep 17 00:00:00 2001 From: Yong Zhi Date: Tue, 12 Dec 2017 10:16:31 -0600 Subject: [PATCH] [PATCH v8] intel-ipu3: cio2: fix two warnings in the code Fix two warnings reported by Mauro Carvalho Chehab: ipu3-cio2.c:1899:16: warning: Variable length array is used. In function 'cio2_pci_probe': ipu3-cio2.c:1726:14: warning: variable 'phys' set but not used [-Wunused-but-set-variable] Hi, Sakari, can you squash the patch to your tree? Signed-off-by: Yong Zhi --- drivers/media/pci/intel/ipu3/ipu3-cio2.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/drivers/media/pci/intel/ipu3/ipu3-cio2.c b/drivers/media/pci/intel/ipu3/ipu3-cio2.c index 4295bdb8b192..941caa987dab 100644 --- a/drivers/media/pci/intel/ipu3/ipu3-cio2.c +++ b/drivers/media/pci/intel/ipu3/ipu3-cio2.c @@ -1723,7 +1723,6 @@ static int cio2_pci_probe(struct pci_dev *pci_dev, const struct pci_device_id *id) { struct cio2_device *cio2; - phys_addr_t phys; void __iomem *const *iomap; int r; @@ -1741,8 +1740,6 @@ static int cio2_pci_probe(struct pci_dev *pci_dev, dev_info(&pci_dev->dev, "device 0x%x (rev: 0x%x)\n", pci_dev->device, pci_dev->revision); - phys = pci_resource_start(pci_dev, CIO2_PCI_BAR); - r = pcim_iomap_regions(pci_dev, 1 << CIO2_PCI_BAR, pci_name(pci_dev)); if (r) { dev_err(&pci_dev->dev, "failed to remap I/O memory (%d)\n", r); @@ -1896,7 +1893,6 @@ static void arrange(void *ptr, size_t elem_size, size_t elems, size_t start) { 0, start - 1 }, { start, elems - 1 }, }; - u8 tmp[elem_size]; #define arr_size(a) ((a)->end - (a)->begin + 1) @@ -1915,12 +1911,12 @@ static void arrange(void *ptr, size_t elem_size, size_t elems, size_t start) /* Swap the entries in two parts of the array. */ for (i = 0; i < size0; i++) { - memcpy(tmp, ptr + elem_size * (arr[1].begin + i), - elem_size); - memcpy(ptr + elem_size * (arr[1].begin + i), - ptr + elem_size * (arr[0].begin + i), elem_size); - memcpy(ptr + elem_size * (arr[0].begin + i), tmp, - elem_size); + u8 *d = ptr + elem_size * (arr[1].begin + i); + u8 *s = ptr + elem_size * (arr[0].begin + i); + size_t j; + + for (j = 0; j < elem_size; j++) + swap(d[j], s[j]); } if (arr_size(&arr[0]) > arr_size(&arr[1])) { -- 2.7.4