Skip to contentSkip to conversation

iommu/amd: define 'amd_ivhd_dev_flags_list' in header

PATCH In review Ben Dooks 2 participants 2 messages Jan 8 – Jan 10

Subsystems (2)
lore
Share & tools
lore

Ben Dooks

author
#0 lore raw

PATCH 1/1 iommu/amd: define 'amd_ivhd_dev_flags_list' in header

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?

---
 drivers/iommu/amd/amd_iommu_types.h | 1 +
 1 file changed, 1 insertion(+)
drivers/iommu/amd/amd_iommu_types.h +1 -0
index 320733e7d8b4..2ccb629e3243 100644
@@ -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)
 
Signature · 1 line
2.37.2.352.g3c44437643
maintainer
#1 lore raw
Quoted 3 lines · 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:

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