Skip to contentSkip to conversation

x86/dmar: place the initdata annotation after the variable type

PATCH In review Roger Pau Monne 4 participants 4 messages Jan 26, 2017 – Feb 8, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/dmar: place the initdata annotation after the variable type

clang cannot cope with the annotation being in the middle of the variable declaration.

---
Cc: Kevin Tian <[email protected]>
Cc: Feng Wu <[email protected]>
Cc: Jan Beulich <[email protected]>
Cc: Andrew Cooper <[email protected]>

---
 xen/drivers/passthrough/vtd/dmar.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
xen/drivers/passthrough/vtd/dmar.c +2 -2
index 831fe1a..4a6a819 100644
@@ -871,8 +871,8 @@ struct user_rmrr {
     u32 sbdf[MAX_USER_RMRR_DEV];
 };
 
-static __initdata unsigned int nr_rmrr;
-static struct __initdata user_rmrr user_rmrrs[MAX_USER_RMRR];
+static unsigned int __initdata nr_rmrr;
+static struct user_rmrr __initdata user_rmrrs[MAX_USER_RMRR];
 
 /* Macro for RMRR inclusive range formatting. */
 #define ERMRRU_FMT "[%lx-%lx]"
Signature · 7 lines
2.10.1 (Apple Git-78)


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Reviewed-by on v1 1/1
#2 lore raw
In reply to Roger Pau Monne
Quoted 5 lines
Quoted 1 line
Quoted 1 line · On 26.01.17 at 17:18, <[email protected]> wrote:

clang cannot cope with the annotation being in the middle of the variable declaration.

xen/drivers/passthrough/vtd/dmar.c struct user_rmrr { · line 875

Quoted 10 lines
xen/drivers/passthrough/vtd/dmar.c +2 -2
@@ -871,8 +871,8 @@ struct user_rmrr {
     u32 sbdf[MAX_USER_RMRR_DEV];
 };
 
-static __initdata unsigned int nr_rmrr;
-static struct __initdata user_rmrr user_rmrrs[MAX_USER_RMRR];
+static unsigned int __initdata nr_rmrr;
+static struct user_rmrr __initdata user_rmrrs[MAX_USER_RMRR];

I'm sorry for not spotting this during review - while I wasn't aware that this actively breaks clang, it's still stylistically better even with gcc. I'm surprised though that (by implication) these are the only offenders in our tree.

Jan

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel