History

include/linux/dmar.h: replace single-char identifiers in macros

There are a few macros in IOMMU have single-char identifiers make the code hard to read and debug. Replace them with meaningful names.

Qian Cai committed 7 years ago

Commit a760f8a1 parent ae2c8881 file · +8 −6Browse files

Unified · Split

include/linux/dmar.h+8−6
@@ -92,12 +92,14 @@ static inline bool dmar_rcu_check(void) · 91 unmodified lines
92 92
93#define dmar_rcu_dereference(p) rcu_dereference_check((p), dmar_rcu_check())93#define dmar_rcu_dereference(p) rcu_dereference_check((p), dmar_rcu_check())
94 94
95#define for_each_dev_scope(a, c, p, d) \95#define for_each_dev_scope(devs, cnt, i, tmp) \
96 for ((p) = 0; ((d) = (p) < (c) ? dmar_rcu_dereference((a)[(p)].dev) : \96 for ((i) = 0; ((tmp) = (i) < (cnt) ? \
97 NULL, (p) < (c)); (p)++)97 dmar_rcu_dereference((devs)[(i)].dev) : NULL, (i) < (cnt)); \
98 98 (i)++)
99#define for_each_active_dev_scope(a, c, p, d) \99
100 for_each_dev_scope((a), (c), (p), (d)) if (!(d)) { continue; } else100#define for_each_active_dev_scope(devs, cnt, i, tmp) \
101 for_each_dev_scope((devs), (cnt), (i), (tmp)) \
102 if (!(tmp)) { continue; } else
101 103
102extern int dmar_table_init(void);104extern int dmar_table_init(void);
103extern int dmar_dev_scope_init(void);105extern int dmar_dev_scope_init(void);