LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] iommu: amd: hide unused iommu_table_lock
@ 2018-04-04 10:56 Arnd Bergmann
  2018-04-13 15:03 ` Sebastian Andrzej Siewior
  2018-05-03 12:48 ` Joerg Roedel
  0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2018-04-04 10:56 UTC (permalink / raw)
  To: Joerg Roedel
  Cc: Arnd Bergmann, Thomas Gleixner, Sebastian Andrzej Siewior,
	Baoquan He, Alex Williamson, Suravee Suthikulpanit, Tom Lendacky,
	Gary R Hook, iommu, linux-kernel

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 <arnd@arndb.de>
---
 drivers/iommu/amd_iommu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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)
 {
-- 
2.9.0

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] iommu: amd: hide unused iommu_table_lock
  2018-04-04 10:56 [PATCH] iommu: amd: hide unused iommu_table_lock Arnd Bergmann
@ 2018-04-13 15:03 ` Sebastian Andrzej Siewior
  2018-05-03 12:48 ` Joerg Roedel
  1 sibling, 0 replies; 3+ messages in thread
From: Sebastian Andrzej Siewior @ 2018-04-13 15:03 UTC (permalink / raw)
  To: Arnd Bergmann, Joerg Roedel
  Cc: Thomas Gleixner, Baoquan He, Alex Williamson,
	Suravee Suthikulpanit, Tom Lendacky, Gary R Hook, iommu,
	linux-kernel

On 2018-04-04 12:56:59 [+0200], Arnd Bergmann wrote:
> 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 <arnd@arndb.de>
Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>

Thank you Arnd.

Sebastian

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] iommu: amd: hide unused iommu_table_lock
  2018-04-04 10:56 [PATCH] iommu: amd: hide unused iommu_table_lock Arnd Bergmann
  2018-04-13 15:03 ` Sebastian Andrzej Siewior
@ 2018-05-03 12:48 ` Joerg Roedel
  1 sibling, 0 replies; 3+ messages in thread
From: Joerg Roedel @ 2018-05-03 12:48 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Thomas Gleixner, Sebastian Andrzej Siewior, Baoquan He,
	Alex Williamson, Suravee Suthikulpanit, Tom Lendacky,
	Gary R Hook, iommu, linux-kernel

On Wed, Apr 04, 2018 at 12:56:59PM +0200, Arnd Bergmann wrote:
> 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 <arnd@arndb.de>
> ---
>  drivers/iommu/amd_iommu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-05-03 12:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-04 10:56 [PATCH] iommu: amd: hide unused iommu_table_lock Arnd Bergmann
2018-04-13 15:03 ` Sebastian Andrzej Siewior
2018-05-03 12:48 ` Joerg Roedel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).