Message ID | 20170126161810.11835-1-roger.pau@citrix.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 26/01/17 16:18, Roger Pau Monne wrote: > clang cannot cope with the annotation being in the middle of the variable > declaration. > > Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
>>> On 26.01.17 at 17:18, <roger.pau@citrix.com> wrote: > clang cannot cope with the annotation being in the middle of the variable > declaration. > > Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> Reviewed-by: Jan Beulich <jbeulich@suse.com> > --- a/xen/drivers/passthrough/vtd/dmar.c > +++ b/xen/drivers/passthrough/vtd/dmar.c > @@ -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
> From: Roger Pau Monne [mailto:roger.pau@citrix.com] > Sent: Friday, January 27, 2017 12:18 AM > > clang cannot cope with the annotation being in the middle of the variable > declaration. > > Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> Acked-by: Kevin Tian <kevin.tian@intel.com>
diff --git a/xen/drivers/passthrough/vtd/dmar.c b/xen/drivers/passthrough/vtd/dmar.c index 831fe1a..4a6a819 100644 --- a/xen/drivers/passthrough/vtd/dmar.c +++ b/xen/drivers/passthrough/vtd/dmar.c @@ -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]"
clang cannot cope with the annotation being in the middle of the variable declaration. Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> --- Cc: Kevin Tian <kevin.tian@intel.com> Cc: Feng Wu <feng.wu@intel.com> Cc: Jan Beulich <jbeulich@suse.com> Cc: Andrew Cooper <andrew.cooper3@citrix.com> --- xen/drivers/passthrough/vtd/dmar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)