Received: by 10.192.165.148 with SMTP id m20csp41797imm; Fri, 20 Apr 2018 02:40:48 -0700 (PDT) X-Google-Smtp-Source: AIpwx49kwCdZotTtlt5sXJygx1HtoP1Hhvd1N3QAKcagiD+n8x9HW4F66qMR1oXAT+OYs1xGFeGC X-Received: by 2002:a17:902:529:: with SMTP id 38-v6mr9632414plf.64.1524217247989; Fri, 20 Apr 2018 02:40:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524217247; cv=none; d=google.com; s=arc-20160816; b=Oen1/UBuBgc9vxVxgTHat4VnzO5ipMu9u8ajJztQbJXnEqCPCO8oLoLeeL3EWupnnB xiopqc4+j8bqrNRw3ttD+DwMgCOpLjXpdfwx98tyIxrmdwMFkj55zaRV7pI0Qmt4u+pC ewglehLF4CDbIS7XytUdqjGHum8wnmNOLkgRXB5njnPBrZ2CQ6rCeTwFbdlp16FT14CG taAP7BHLJpuv6+k/a0ddeyTb2cwJniIUgte7NnNssJMc3vX3p14eJFJWAYaq1oG6R4/E vP2Qd1nxAWLIdjhbGQhi92HvntTpH4qIamNKDv87d+4wKhSFL1BcDYrz/4/HcJLMCnu+ fEMA== 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 :dkim-signature:arc-authentication-results; bh=ZbYb6Ql/82VEL3Kv5SOYpDsSGR1zQfeiadlFxeAo9RE=; b=vZrtVaNs9m5E52eHzcBUAbdCKqJhVZNYHYs0kDdd4wVOjsK1tCFWD1QHnyoAgV4+2P 7oUM8npHAgHGUzNvqxfMpXLAMzHyUi/Gyg1CqKyYReawJNzwGcR8TYz8jozpym4uecEr Kll6nh/sXrsY4yAFeDSIyjglN6XqeOHPcVMvCC/rHTrVB5p46JRo+gCsOeVojNaCoWVp Mn4O1aEmqdBqz6puBmEGLfGcVekgJr77dX0B2Te/5shctODD11h1M1R4jcf0+Qhwp042 eLKZCVYd8AmKE4mB/QtnlTw7T9KtsvzXTluN0fKr9RkpWOnW4R0ubAVn5OPfQvx4SS9q I2cQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=L3+1CT9q; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x19si2327532pgx.378.2018.04.20.02.40.33; Fri, 20 Apr 2018 02:40:47 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=L3+1CT9q; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754360AbeDTJiF (ORCPT + 99 others); Fri, 20 Apr 2018 05:38:05 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:45389 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754229AbeDTJiE (ORCPT ); Fri, 20 Apr 2018 05:38:04 -0400 Received: by mail-wr0-f196.google.com with SMTP id u11-v6so21202260wri.12 for ; Fri, 20 Apr 2018 02:38:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=ZbYb6Ql/82VEL3Kv5SOYpDsSGR1zQfeiadlFxeAo9RE=; b=L3+1CT9qKb5JCoXqBKebcmc8vVDRP3bRt5BmT5ei8rEin5a8UWxUHTt1hu1mqDvTj+ 7sY6sPh1C63oz9+o+XiUyp1Yx7MNnc8WygtNHlNb5FlbD6d+1mkQxVLJSwR2xNF+8zq/ bM8/t9Dhk8yKTO49cZ2RofXoMFdpK2+Q/e8rgBJDvgr9Rc7i5culRP03/kMT9b8IlPrY ulxj2/dAczv90uJFpYBjEbTKQc0bRRiid3nAVctKcGdgq9KvwpNCPgKUY/T+pAcHd+ZB tXHW5Y+xJ7BUwyjcI8ole2QYBrO9ORyQ/TryHjjhJ90uemg8TFywDyJ26DkEMbCNQG5r 1Jqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=ZbYb6Ql/82VEL3Kv5SOYpDsSGR1zQfeiadlFxeAo9RE=; b=ANtgBMzphddNOB+NLJiOyDABSlA6awQi45uxRfDwcoGHXyAjNwblvj7YOH8PYU4GfB KOedse/jiReJoeoSbYn6aI7MPlCRr/F0ZM4S7s8ZH2SNxyKvpYBli1O2Po88V/A9mZct qd9cqy3BmyMEDe7aWSGPE7e+SFKsN0fK8gQ6bFI64w6pRe5IyFuGPzgWYgLubEMOy9a8 VPNjyA/Dc9eB8JRwOssZ7OVSNYOHsMyxsxsMbzrwlmGHYLdLGCnrdNblu1ygj/FCqwXQ jJC/RN62CHwbs8mqstKTwjR6CGXatYfyBqJuBVtpZZhrt5kQhZsQNSbsPaet9gPzknwM E37g== X-Gm-Message-State: ALQs6tCfuXgLHCYDRRXZAW1jwW6hpaad3optXMSD+/376P8s1kWwhmVV HzVjPDI8XrSgUr+yQQdVgCA= X-Received: by 2002:adf:d1d1:: with SMTP id m17-v6mr3174078wri.96.1524217083292; Fri, 20 Apr 2018 02:38:03 -0700 (PDT) Received: from [127.0.1.1] ([83.243.48.53]) by smtp.gmail.com with ESMTPSA id o17-v6sm9096970wrc.71.2018.04.20.02.38.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Apr 2018 02:38:02 -0700 (PDT) From: Tobias Regnery To: joro@8bytes.org, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Cc: bigeasy@linutronix.de, Tobias Regnery Subject: [PATCH] iommu/amd: fix unused-variable warning Date: Fri, 20 Apr 2018 11:28:36 +0200 Message-Id: <20180420092836.12219-1-tobias.regnery@gmail.com> X-Mailer: git-send-email 2.17.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The iommu_table_lock is only used by code inside an ifdef CONFIG_IRQ_REMAP block. This leads to the following warning with CONFIG_IRQ_REMAP=n: amd_iommu.c:86:24: warning: 'iommu_table_lock' defined but not used [-Wunused-variable] Guard the spinlock definition with the same ifdef. Fixes: ea6166f4b83e9 ("iommu/amd: Split irq_lookup_table out of the amd_iommu_devtable_lock") Signed-off-by: Tobias Regnery --- drivers/iommu/amd_iommu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index 2a99f0f14795..5ba141768000 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c @@ -83,7 +83,9 @@ static DEFINE_SPINLOCK(amd_iommu_devtable_lock); static DEFINE_SPINLOCK(pd_bitmap_lock); +#ifdef CONFIG_IRQ_REMAP static DEFINE_SPINLOCK(iommu_table_lock); +#endif /* List of all available dev_data structures */ static LLIST_HEAD(dev_data_list); -- 2.17.0