Re: [PATCH] fix sparse problems with ARRAY_SIZE

2007-07-12 Thread Adel Gadllah
Al Viro wrote: On Tue, Jul 10, 2007 at 09:58:18PM +0100, Al Viro wrote: On Tue, Jul 10, 2007 at 11:40:33PM +0400, Alexey Dobriyan wrote: On Tue, Jul 10, 2007 at 06:09:48PM +0200, Adel Gadllah wrote: --- linux-2.6.orig/include/linux/kernel.h +++ linux-2.6/include/linux/kernel.h @

Re: [PATCH] fix sparse problems with ARRAY_SIZE

2007-07-10 Thread Al Viro
On Tue, Jul 10, 2007 at 09:58:18PM +0100, Al Viro wrote: > On Tue, Jul 10, 2007 at 11:40:33PM +0400, Alexey Dobriyan wrote: > > On Tue, Jul 10, 2007 at 06:09:48PM +0200, Adel Gadllah wrote: > > > --- linux-2.6.orig/include/linux/kernel.h > > > +++ linux-2.6/include/linux/kernel.h > > > @@ -35,7 +35

Re: [PATCH] fix sparse problems with ARRAY_SIZE

2007-07-10 Thread Al Viro
On Tue, Jul 10, 2007 at 11:40:33PM +0400, Alexey Dobriyan wrote: > On Tue, Jul 10, 2007 at 06:09:48PM +0200, Adel Gadllah wrote: > > --- linux-2.6.orig/include/linux/kernel.h > > +++ linux-2.6/include/linux/kernel.h > > @@ -35,7 +35,11 @@ extern const char linux_proc_banner[]; > > #define ALIGN(x,

Re: [PATCH] fix sparse problems with ARRAY_SIZE

2007-07-10 Thread Alexey Dobriyan
On Tue, Jul 10, 2007 at 06:09:48PM +0200, Adel Gadllah wrote: > --- linux-2.6.orig/include/linux/kernel.h > +++ linux-2.6/include/linux/kernel.h > @@ -35,7 +35,11 @@ extern const char linux_proc_banner[]; > #define ALIGN(x,a) __ALIGN_MASK(x,(typeof(x))(a)-1) > #define __ALIGN_MASK(x,mas

Re: [PATCH] fix sparse problems with ARRAY_SIZE

2007-07-10 Thread Adel Gadllah
Adel Gadllah wrote: ARRAY_SIZE seems to create sparse warnings when used on global variables. The attached patch fixes this by using a ARRAY_SIZE macro that does not use __must_be_array(arr) for sparse. See: http://marc.info/?t=11810344917&r=1&w=2 P.S: please CC me resend the working one