From patchwork Tue Mar 13 13:06:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10278621 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 2CC7060231 for ; Tue, 13 Mar 2018 13:06:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1ECFE28FEF for ; Tue, 13 Mar 2018 13:06:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1385829001; Tue, 13 Mar 2018 13:06:57 +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=unavailable 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 8DBFE28FEF for ; Tue, 13 Mar 2018 13:06:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752275AbeCMNGn (ORCPT ); Tue, 13 Mar 2018 09:06:43 -0400 Received: from mout.kundenserver.de ([212.227.126.135]:51383 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752148AbeCMNGj (ORCPT ); Tue, 13 Mar 2018 09:06:39 -0400 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue003 [212.227.15.129]) with ESMTPA (Nemesis) id 0LsMbE-1eXM612Bqq-0121aF; Tue, 13 Mar 2018 14:06:21 +0100 From: Arnd Bergmann To: Mauro Carvalho Chehab , Daniel Scheller Cc: Arnd Bergmann , Binoy Jayan , Jasmin Jessich , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] media: ngene: avoid unused variable warning Date: Tue, 13 Mar 2018 14:06:03 +0100 Message-Id: <20180313130620.4040088-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:Myv6Px8M0WMU6D8ZJUfRw2C7jtFb+5aD4cEwDiK1xgDuxE4/V+0 WcFrWYK+NGQq8TyjwIdoUOzQQYYfj7oiunNLEl23XYYJfeY1+5tGTO+wDMQLeib1lG0jXlF 9srCiZGImcgRbCwEMrvR1Geyn+r9ckrggM1QhdwEg4aLr3Oid42NiMopM9gQaCwnK+n/FY/ VGRXP+we/EJovJBYK6AFw== X-UI-Out-Filterresults: notjunk:1; V01:K0:opZVlE3RE5c=:c/2RwKTPE5+mETkklB3zQ6 gA+L9gP/VehaXxIEotS+g4gJFnfIpvPze5HGXUgXoYf74yJXEYicz5O1XNUluZUnohw2PV5wP a5ab2ataLBHGQvj3qXKi3BGYW98JSsSWUCfLnNcZ2KasP+bVwIohuXjn34xqvtMg1A7Q7l7ST CgJlYeXbe+62+q0neKIbrBnVtR3oo1s8C3wGEA4pUYktHKebGdeQKqps3wb4/fXatulEUa3iM 7rsz3uB5DnqFttyitF6vw9duFQ5ky+8AD5xjMWsEIr/MlwcFsYGED84ILSsneh+C0yKM0VbMn 34nFviO4Fff/QF4AQ2henfv/X8kb6H6zYcrx6K1HWLdu6bcMYVNRiXKA1IogTinROLHKXyOoF xkA5gMHlWa4jteODp3QCs+R/3de2myhKl93OPEYqhx6f6Bkv5aMVWe1+TM5HWzdwYX18v7tRK O4uSj8v5fcYkpTE5NngADZv4yaqwO+NUJyyju5yiOV9yfdpqxmxeomkcnVH/zwawLSYvgfhnz 6Xeqb8u82Iey0slV8kbEYhYZ7bArMdum2dl21htYRdQTyJCpPj3VS39rMh3dmUaRYebrlUSyf +62dDpyQh8CX32qu2t+fSzxIA9RPavCWcCmhP0vG4KqrfltyGWCipVXt7W1c6nGLawmob1F7E 1FOlUnfrk3CwXaUHvAJSuVLUjOs6SOt++XEIYUISzOyjwBozQLAgKVK3xsl/wy3Db9tAT+pO7 KvEg4ybCYoKb42+2/gasE2DBY5NpjKXSJDlDYw== 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 newly added pdev variable is only used in an #ifdef, causing a build warning without CONFIG_PCI_MSI, unless we move the declaration inside the same #ifdef: drivers/media/pci/ngene/ngene-core.c: In function 'ngene_start': drivers/media/pci/ngene/ngene-core.c:1328:17: error: unused variable 'pdev' [-Werror=unused-variable] Fixes: 6795bf626482 ("media: ngene: convert kernellog printing from printk() to dev_*() macros") Signed-off-by: Arnd Bergmann Acked-by: Daniel Scheller --- drivers/media/pci/ngene/ngene-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/pci/ngene/ngene-core.c b/drivers/media/pci/ngene/ngene-core.c index 3b9a1bfaf6c0..25f16833a475 100644 --- a/drivers/media/pci/ngene/ngene-core.c +++ b/drivers/media/pci/ngene/ngene-core.c @@ -1325,7 +1325,6 @@ static int ngene_buffer_config(struct ngene *dev) static int ngene_start(struct ngene *dev) { - struct device *pdev = &dev->pci_dev->dev; int stat; int i; @@ -1359,6 +1358,7 @@ static int ngene_start(struct ngene *dev) #ifdef CONFIG_PCI_MSI /* enable MSI if kernel and card support it */ if (pci_msi_enabled() && dev->card_info->msi_supported) { + struct device *pdev = &dev->pci_dev->dev; unsigned long flags; ngwritel(0, NGENE_INT_ENABLE);