From patchwork Wed Apr 4 10:56:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 132810 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp4902720ljb; Wed, 4 Apr 2018 03:57:35 -0700 (PDT) X-Google-Smtp-Source: AIpwx49zdv+r448GOCQLkHpawZOSP5pALPtGp8BYzMV/ly6cjQYfgkoimaqmBfGTPLafQJouBfLu X-Received: by 2002:a17:902:4303:: with SMTP id i3-v6mr17979848pld.302.1522839455544; Wed, 04 Apr 2018 03:57:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522839455; cv=none; d=google.com; s=arc-20160816; b=umeq3K+2e1riAc4rP/kOjA/J2KOpYPPHws2qJXVcZzOIfYB0MMBLtFesa7R9MNorkb 2X/Pj/k9o/Z/MrYDyMK0xhvcGqWVNqz/PY6x3FpYoiMiGS+p1Pe4xdwTIiKAC6aw+Pjp wYIIP3Z6x6zrDj+qqQE6SLZG/YDGFnm4vnVB074VNFN2MhtFMtvTX97UkxoZRvH3rS38 d1g8dTWtWwUFCfSvNSKVqIZB7dGijGn9MSG1wxZUr9KHdhCfNWdCp+IiEH3p8FoWmBiH +crmk7H6mAMzwjcqf5omfKZKhx1ZISgRTuxUMEjMUNAWHCcSYT1kMa8382t3R1Z7Wucj LzyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=abMFqgbFvz+9ZflMvUQi+7gVxE6RniRuVRvol07/YK4=; b=Mj3yTkaj1cgOPpbM+uhSCsDAiV0fjaDwPGrslQ38SP5/Db2/W/DSRpA8wvVxHF3Y3G 0+WmvWV6dhNyBKpMAmHjAQFf7urn8pJSpGBMDD86mdbfs12fHITAgiw51RHem4SI11Xf tOjT/kQf3wQH4CYbGCNjiwz38Pya1aiKjO3wZ1B1Nw3P5P6eSvPQC1CydJMg+eAgOTZ7 A6pQ1uQvAsZJoEgKakC8kfZjPH9btlwrCe1V6XKUcLV15CzG6OTTCF8VeO0ofqLylhnI OszyKcqe/YIGhOqCTGKsKhAbv83/68+k/S4g4TS7sfU1tujES9fqIc/9fRZWCZ0yZAWm 6AeQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q61-v6si2824192plb.719.2018.04.04.03.57.35; Wed, 04 Apr 2018 03:57:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751262AbeDDK5b (ORCPT + 29 others); Wed, 4 Apr 2018 06:57:31 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:42145 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750827AbeDDK5a (ORCPT ); Wed, 4 Apr 2018 06:57:30 -0400 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue002 [212.227.15.129]) with ESMTPA (Nemesis) id 0LyeIB-1ePiDF3swh-0164UD; Wed, 04 Apr 2018 12:57:15 +0200 From: Arnd Bergmann To: Joerg Roedel Cc: Arnd Bergmann , Thomas Gleixner , Sebastian Andrzej Siewior , Baoquan He , Alex Williamson , Suravee Suthikulpanit , Tom Lendacky , Gary R Hook , iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: [PATCH] iommu: amd: hide unused iommu_table_lock Date: Wed, 4 Apr 2018 12:56:59 +0200 Message-Id: <20180404105713.633983-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K1:9m3F+GVtT2RhfBdB82J7fDve0hFnZipG28ohUdk69s2bif2oGZq U2n0c//iRtvTKcTYhDvVUIIbAGwfl9EXW7fXEqffNkUczRDRjS+6phVNxI9g97KC/zd9L0Q AxKznUJoy3OIlLB+VJDm+Nk1mXntS6DJoPCXhk/zZSFPL9F+dLxthYhP4YFfVS7jl85puaL w4Q+NhpvmzamoZs/Ixebw== X-UI-Out-Filterresults: notjunk:1; V01:K0:/KeVQVQycDY=:BHuvvx8E9+CoxvpU1PtCj2 gF6XQ2wDIpfltcAbwgYxqw8UUO5NPOl0LcTig4R4z4gCD5Rcjmiq6iTs76LB34kLG4JJXKHMU 4Qm2qrQJqJUWJ8I2RrxZsyJ59ykLcdY77LDxq/21VYQ5/OYcatxXRrPEi5WujuqEwzs1TIotV IGl4wvIqhepGuOLUxXyG6J/stIMF5IrD8M3qAukBRyHYv7OyQMET4BqPHZDCQVNIrA4dr5ees y8FLBKmiMeayhsh3GpxOMflDbndSuGxwgkprJM0Z9OKXlJ1ddE1jz9+vQ2nYRqIsEO0+8SfOm 4Sj921t+oRSQswnWK0b/vm8SlIh0v972U6seOY9hgjY0S+PhDBx0Ch5KoPzKiMOCzEynHOUeA 3hRodIImI9A8oW8i0qfEGCg8W5RH21bCnGdYxTVkzvYgFNai6GUJ8jlw8ZAX9HJRAtRu0cinL cA0HD4znJquCNsrQCb8vcaoDQr6WeZPelJ2V4AgfFuoQi1GMFl42xDalLt+agp4w9DvLKhJek kB3UVT3yAt1t0ogVWR5EvxYlZNTc4a0vcHS4A5DL1/qz5LOqLqUzBcS2lQvVoacwM+mm7Ymov gRiBPh/2u2/Lz8ImExdmQ0ZXAKqJAuBb+iezHG8RCJ+/WYCfrROLWH0r+6glCsMgnCXu70Hd+ 53LhMfCOq+8oytoD0R8SCBXtP4VvlfqipdmfgwLRQdMpo7RDHI4QHMRunUQk6AaAa2EjyzEIh vfL9eRzb3Lty/OilpHaq2YaBhHwlwiAWqIelnw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The newly introduced lock is only used when CONFIG_IRQ_REMAP is enabled: drivers/iommu/amd_iommu.c:86:24: error: 'iommu_table_lock' defined but not used [-Werror=unused-variable] static DEFINE_SPINLOCK(iommu_table_lock); This moves the definition next to the user, within the #ifdef protected section of the file. Fixes: ea6166f4b83e ("iommu/amd: Split irq_lookup_table out of the amd_iommu_devtable_lock") Signed-off-by: Arnd Bergmann --- drivers/iommu/amd_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.9.0 Acked-by: Sebastian Andrzej Siewior diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index 2a99f0f14795..8fb8c737fffe 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c @@ -83,7 +83,6 @@ static DEFINE_SPINLOCK(amd_iommu_devtable_lock); static DEFINE_SPINLOCK(pd_bitmap_lock); -static DEFINE_SPINLOCK(iommu_table_lock); /* List of all available dev_data structures */ static LLIST_HEAD(dev_data_list); @@ -3562,6 +3561,7 @@ EXPORT_SYMBOL(amd_iommu_device_info); *****************************************************************************/ static struct irq_chip amd_ir_chip; +static DEFINE_SPINLOCK(iommu_table_lock); static void set_dte_irq_entry(u16 devid, struct irq_remap_table *table) {