Re: [patch 07/26] Add INIT_ARRAY() to kernel.h

2008-01-25 Thread Mathieu Desnoyers
* H. Peter Anvin ([EMAIL PROTECTED]) wrote: > Mathieu Desnoyers wrote: >> Try opening such code in vim, and the syntax highlighting gets all >> messed up :-/ >> The other option is to do the *right thing* and fix vim, of course, but >> this change won't be in distros for a while. > > Let's get this

Re: [patch 07/26] Add INIT_ARRAY() to kernel.h

2008-01-25 Thread Jan Engelhardt
On Jan 24 2008 16:04, Mathieu Desnoyers wrote: >* Randy Dunlap ([EMAIL PROTECTED]) wrote: > >Try opening such code in vim, and the syntax highlighting gets all >messed up :-/ Then we'd also have to fix dcache.h: #define DCACHE_NFSFS_RENAMED 0x0002/* this dentry has been "silly

Re: [patch 07/26] Add INIT_ARRAY() to kernel.h

2008-01-24 Thread H. Peter Anvin
Mathieu Desnoyers wrote: Try opening such code in vim, and the syntax highlighting gets all messed up :-/ The other option is to do the *right thing* and fix vim, of course, but this change won't be in distros for a while. Let's get this straight... You're suggesting introducing a pointless

Re: [patch 07/26] Add INIT_ARRAY() to kernel.h

2008-01-24 Thread H. Peter Anvin
Mathieu Desnoyers wrote: Add initialization of an array, which needs brackets that would pollute kernel code, to kernel.h "brackets which would pollute kernel code"??? -hpa -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PRO

Re: [patch 07/26] Add INIT_ARRAY() to kernel.h (update 2)

2008-01-24 Thread Alexey Dobriyan
On Thu, Jan 24, 2008 at 05:10:54PM -0500, Mathieu Desnoyers wrote: > Array initializers in the body of a function causes unbalanced brackets which > syntax highlighting editors such as vim have problems with. Fix this by > creating > the INIT_ARRAY() macro. > > It is used to declare arguments pas

Re: [patch 07/26] Add INIT_ARRAY() to kernel.h (update 2)

2008-01-24 Thread Mathieu Desnoyers
Array initializers in the body of a function causes unbalanced brackets which syntax highlighting editors such as vim have problems with. Fix this by creating the INIT_ARRAY() macro. It is used to declare arguments passed as function parameters such as: text_poke(addr, INIT_ARRAY(unsigned char, 0x

Re: [patch 07/26] Add INIT_ARRAY() to kernel.h

2008-01-24 Thread Stefan Richter
On 24 Jan, Mathieu Desnoyers wrote: > * Randy Dunlap ([EMAIL PROTECTED]) wrote: >> Maybe you have explained this previously, but please give a short >> explanation of "brackets that would pollute kernel code". >> >> Thanks. >> > > Try opening such code in vim, and the syntax highlighting gets al

Re: [patch 07/26] Add INIT_ARRAY() to kernel.h (updated)

2008-01-24 Thread Mathieu Desnoyers
* Jan Engelhardt ([EMAIL PROTECTED]) wrote: > > On Jan 24 2008 15:54, Mathieu Desnoyers wrote: > > > >Add initialization of an array, which needs brackets that would pollute > >kernel > >code, to kernel.h. It is used to declare arguments passed as function > >parameters > >such as: > >text_poke(

Re: [patch 07/26] Add INIT_ARRAY() to kernel.h (updated)

2008-01-24 Thread Jan Engelhardt
On Jan 24 2008 15:54, Mathieu Desnoyers wrote: > >Add initialization of an array, which needs brackets that would pollute kernel >code, to kernel.h. It is used to declare arguments passed as function >parameters >such as: >text_poke(addr, INIT_ARRAY(unsigned char, 0xf0, len), len); > >Changelog :

Re: [patch 07/26] Add INIT_ARRAY() to kernel.h

2008-01-24 Thread Mathieu Desnoyers
* Randy Dunlap ([EMAIL PROTECTED]) wrote: > On Thu, 24 Jan 2008 15:27:13 -0500 Mathieu Desnoyers wrote: > > > Add initialization of an array, which needs brackets that would pollute > > kernel > > code, to kernel.h. It is used to declare arguments passed as function > > parameters > > Hi Mathie

Re: [patch 07/26] Add INIT_ARRAY() to kernel.h

2008-01-24 Thread Randy Dunlap
On Thu, 24 Jan 2008 15:27:13 -0500 Mathieu Desnoyers wrote: > Add initialization of an array, which needs brackets that would pollute kernel > code, to kernel.h. It is used to declare arguments passed as function > parameters Hi Mathieu, Maybe you have explained this previously, but please give

Re: [patch 07/26] Add INIT_ARRAY() to kernel.h (updated)

2008-01-24 Thread Mathieu Desnoyers
Add initialization of an array, which needs brackets that would pollute kernel code, to kernel.h. It is used to declare arguments passed as function parameters such as: text_poke(addr, INIT_ARRAY(unsigned char, 0xf0, len), len); Changelog : - [len] -> [] - Remove whitespaces. - Fixed Jan's suggest

Re: [patch 07/26] Add INIT_ARRAY() to kernel.h

2008-01-24 Thread Jan Engelhardt
On Jan 24 2008 15:27, Mathieu Desnoyers wrote: >such as: >text_poke(addr, INIT_ARRAY(unsigned char, 0xf0, len), len); text_poke(addr, (unsigned char[]){[0 ... len-1] = val}); Well ugliness is debatable, but at least: >+#define INIT_ARRAY(type, val, len) ((type [len]) { [0 ... (len)-1] = (val) }

[patch 07/26] Add INIT_ARRAY() to kernel.h

2008-01-24 Thread Mathieu Desnoyers
Add initialization of an array, which needs brackets that would pollute kernel code, to kernel.h. It is used to declare arguments passed as function parameters such as: text_poke(addr, INIT_ARRAY(unsigned char, 0xf0, len), len); Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]> --- include/lin