x86: Fix missing brackets in macros

With the wider testing, some more violations have been spotted.  This
addresses violations of Rule 20.7 which requires macro parameters to be
bracketed.

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
This commit is contained in:
Andrew Cooper committed 2025-12-12 03:04:48 +00:00
1 parent f1b1860226
commit 0c40d08f7c
3 files changed
+9 -9

No files matched your search

+3 -3
View File
@@ -636,9 +636,9 @@ prev_pinned_shadow(struct page_info *page,
}
#define foreach_pinned_shadow(dom, pos, tmp) \
for ( pos = prev_pinned_shadow(NULL, (dom)); \
pos ? (tmp = prev_pinned_shadow(pos, (dom)), 1) : 0; \
pos = tmp )
for ( (pos) = prev_pinned_shadow(NULL, dom); \
(pos) ? ((tmp) = prev_pinned_shadow(pos, dom), 1) : 0;\
(pos) = (tmp) )
/*
* Pin a shadow page: take an extra refcount, set the pin bit,
+4 -4
View File
@@ -124,7 +124,7 @@ struct acpi_atsr_unit *acpi_find_matched_atsr_unit(const struct pci_dev *);
do { \
s_time_t start_time = NOW(); \
while (1) { \
sts = op(iommu->reg, offset); \
sts = op((iommu)->reg, offset); \
if ( cond ) \
break; \
if ( NOW() > start_time + DMAR_OPERATION_TIMEOUT ) { \
@@ -147,7 +147,7 @@ do { \
\
for ( ; ; ) \
{ \
sts = op(iommu->reg, offset); \
sts = op((iommu)->reg, offset); \
if ( cond ) \
break; \
if ( timeout && NOW() > timeout ) \
@@ -155,7 +155,7 @@ do { \
threshold |= threshold << 1; \
printk(XENLOG_WARNING VTDPREFIX \
" IOMMU#%u: %s flush taking too long\n", \
iommu->index, what); \
(iommu)->index, what); \
timeout = 0; \
} \
cpu_relax(); \
@@ -164,7 +164,7 @@ do { \
if ( !timeout ) \
printk(XENLOG_WARNING VTDPREFIX \
" IOMMU#%u: %s flush took %lums\n", \
iommu->index, what, (NOW() - start) / 10000000); \
(iommu)->index, what, (NOW() - start) / 10000000); \
} while ( false )
int vtd_hw_check(void);
+2 -2
View File
@@ -66,9 +66,9 @@ void vmcoreinfo_append_str(const char *fmt, ...)
#define VMCOREINFO_PAGESIZE(value) \
vmcoreinfo_append_str("PAGESIZE=%ld\n", value)
#define VMCOREINFO_SYMBOL(name) \
vmcoreinfo_append_str("SYMBOL(%s)=%lx\n", #name, (unsigned long)&name)
vmcoreinfo_append_str("SYMBOL(%s)=%lx\n", #name, (unsigned long)&(name))
#define VMCOREINFO_SYMBOL_ALIAS(alias, name) \
vmcoreinfo_append_str("SYMBOL(%s)=%lx\n", #alias, (unsigned long)&name)
vmcoreinfo_append_str("SYMBOL(%s)=%lx\n", #alias, (unsigned long)&(name))
#define VMCOREINFO_STRUCT_SIZE(name) \
vmcoreinfo_append_str("SIZE(%s)=%zu\n", #name, sizeof(struct name))
#define VMCOREINFO_OFFSET(name, field) \
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.