x86/dmar: place the initdata annotation after the variable type
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
@@ -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
Quoted 4 lines · Roger Pau Monne
clang cannot cope with the annotation being in the middle of the variable declaration.
Signed-off-by Roger Pau Monné <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
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.
Signed-off-by Roger Pau Monné <[email protected]>
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
Quoted 7 lines
From: Roger Pau Monne [mailto:[email protected]]
Sent: Friday, January 27, 2017 12:18 AMclang cannot cope with the annotation being in the middle of the variable declaration.
Signed-off-by Roger Pau Monné <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel