mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] iommu/amd: define 'amd_ivhd_dev_flags_list' in header
@ 2026-01-08 10:25 Ben Dooks
  2026-01-10  9:49 ` Jörg Rödel
  0 siblings, 1 reply; 2+ messages in thread
From: Ben Dooks @ 2026-01-08 10:25 UTC (permalink / raw)
  To: linux-kernel, iommu
  Cc: robin.murphy, will, suravee.suthikulpanit, joro, Ben Dooks

The 'amd_ivhd_dev_flags_list' is used in the amd_iommu_types.h
header but not defined, so add the definition to remove the
following sparse warning:

drivers/iommu/amd/init.c:182:1: warning: symbol 'amd_ivhd_dev_flags_list' was not declared. Should it be static?

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
 drivers/iommu/amd/amd_iommu_types.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/iommu/amd/amd_iommu_types.h b/drivers/iommu/amd/amd_iommu_types.h
index 320733e7d8b4..2ccb629e3243 100644
--- a/drivers/iommu/amd/amd_iommu_types.h
+++ b/drivers/iommu/amd/amd_iommu_types.h
@@ -454,6 +454,7 @@ extern bool amdr_ivrs_remap_support;
 #define for_each_pdom_dev_data_safe(pdom_dev_data, next, pdom) \
 	list_for_each_entry_safe((pdom_dev_data), (next), &pdom->dev_data_list, list)
 
+extern struct list_head amd_ivhd_dev_flags_list;
 #define for_each_ivhd_dte_flags(entry) \
 	list_for_each_entry((entry), &amd_ivhd_dev_flags_list, list)
 
-- 
2.37.2.352.g3c44437643


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

* Re: [PATCH] iommu/amd: define 'amd_ivhd_dev_flags_list' in header
  2026-01-08 10:25 [PATCH] iommu/amd: define 'amd_ivhd_dev_flags_list' in header Ben Dooks
@ 2026-01-10  9:49 ` Jörg Rödel
  0 siblings, 0 replies; 2+ messages in thread
From: Jörg Rödel @ 2026-01-10  9:49 UTC (permalink / raw)
  To: Ben Dooks; +Cc: linux-kernel, iommu, robin.murphy, will, suravee.suthikulpanit

On Thu, Jan 08, 2026 at 10:25:41AM +0000, Ben Dooks wrote:
> The 'amd_ivhd_dev_flags_list' is used in the amd_iommu_types.h
> header but not defined, so add the definition to remove the
> following sparse warning:

I think it is better to just move the for_each_ivhd_dte_flags macro over to
init.c. There is no need for this list to be visible across the entire driver.

-Joerg

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

end of thread, other threads:[~2026-01-10  9:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-08 10:25 [PATCH] iommu/amd: define 'amd_ivhd_dev_flags_list' in header Ben Dooks
2026-01-10  9:49 ` Jörg Rödel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®