Re: [PATCH v2] arch/x86/tools/gen-insn-attr-x86.awk: remove duplicate const

2012-12-09 Thread H. Peter Anvin
Sorry, you're right. I blame the font on my phone. Masami Hiramatsu wrote: >(2012/12/10 10:34), H. Peter Anvin wrote: >> You're changing the array from an array of insn_attr_t to pointers to >insn_attr_t? > >No, please look at the code carefully, > >- print "const insn_attr_t const *inat_e

Re: [PATCH v2] arch/x86/tools/gen-insn-attr-x86.awk: remove duplicate const

2012-12-09 Thread Masami Hiramatsu
(2012/12/10 10:34), H. Peter Anvin wrote: > You're changing the array from an array of insn_attr_t to pointers to > insn_attr_t? No, please look at the code carefully, - print "const insn_attr_t const *inat_escape_tables[INAT_ESC_MAX + 1]" \ ^^ +

Re: [PATCH v2] arch/x86/tools/gen-insn-attr-x86.awk: remove duplicate const

2012-12-09 Thread H. Peter Anvin
You're changing the array from an array of insn_attr_t to pointers to insn_attr_t? Masami Hiramatsu wrote: >(2012/12/10 10:03), H. Peter Anvin wrote: >> Yes, if you add a * it becomes an array of pointers. > >Right, I would like to make each pointer in the array read-only. > >And, of course, th

Re: [PATCH v2] arch/x86/tools/gen-insn-attr-x86.awk: remove duplicate const

2012-12-09 Thread Masami Hiramatsu
(2012/12/10 10:03), H. Peter Anvin wrote: > Yes, if you add a * it becomes an array of pointers. Right, I would like to make each pointer in the array read-only. And, of course, the data itself which pointed by the pointer is already protected. You can see this in (builddir)/arch/x86/lib/inat_tab

Re: Re: [PATCH v2] arch/x86/tools/gen-insn-attr-x86.awk: remove duplicate const

2012-12-09 Thread H. Peter Anvin
Yes, if you add a * it becomes an array of pointers. Masami Hiramatsu wrote: >(2012/12/10 0:50), H. Peter Anvin wrote: >> No, that would really be wrong - changing the type. > >What would be wrong? IMHO, this is just a fix to add a fool >proof 'const' to array instance itself. >...Or, am I misse

Re: Re: [PATCH v2] arch/x86/tools/gen-insn-attr-x86.awk: remove duplicate const

2012-12-09 Thread Masami Hiramatsu
(2012/12/10 0:50), H. Peter Anvin wrote: > No, that would really be wrong - changing the type. What would be wrong? IMHO, this is just a fix to add a fool proof 'const' to array instance itself. ...Or, am I missed anything? Thank you, > Masami Hiramatsu wrote: > >> (2012/12/08 8:17), Cong Ding

Re: [PATCH v2] arch/x86/tools/gen-insn-attr-x86.awk: remove duplicate const

2012-12-09 Thread H. Peter Anvin
No, that would really be wrong - changing the type. Masami Hiramatsu wrote: >(2012/12/08 8:17), Cong Ding wrote: >>> Patch description please? >> there are 2 consts in the definition of one variable >> > > Please put in an actual patch description. The first line >(subject >

Re: [PATCH v2] arch/x86/tools/gen-insn-attr-x86.awk: remove duplicate const

2012-12-09 Thread Cong Ding
On Sun, Dec 09, 2012 at 02:24:55PM +0900, Masami Hiramatsu wrote: > (2012/12/08 8:17), Cong Ding wrote: > >> Patch description please? > > there are 2 consts in the definition of one variable > > > > Please put in an actual patch description. The first line (subject > li

Re: [PATCH v2] arch/x86/tools/gen-insn-attr-x86.awk: remove duplicate const

2012-12-08 Thread Masami Hiramatsu
(2012/12/08 8:17), Cong Ding wrote: >> Patch description please? > there are 2 consts in the definition of one variable > Please put in an actual patch description. The first line (subject line) is a title; the patch should make sense without it. >>> sorry for that. so l

Re: [PATCH v2] arch/x86/tools/gen-insn-attr-x86.awk: remove duplicate const

2012-12-07 Thread H. Peter Anvin
On 12/07/2012 03:17 PM, Cong Ding wrote: On Fri, Dec 07, 2012 at 03:06:13PM -0800, H. Peter Anvin wrote: On 12/07/2012 03:03 PM, Cong Ding wrote: On Fri, Dec 07, 2012 at 02:56:16PM -0800, H. Peter Anvin wrote: On 12/07/2012 02:49 PM, Cong Ding wrote: On Fri, Dec 07, 2012 at 02:45:43PM -0800,

[PATCH v2] arch/x86/tools/gen-insn-attr-x86.awk: remove duplicate const

2012-12-07 Thread Cong Ding
On Fri, Dec 07, 2012 at 03:06:13PM -0800, H. Peter Anvin wrote: > On 12/07/2012 03:03 PM, Cong Ding wrote: > >On Fri, Dec 07, 2012 at 02:56:16PM -0800, H. Peter Anvin wrote: > >>On 12/07/2012 02:49 PM, Cong Ding wrote: > >>>On Fri, Dec 07, 2012 at 02:45:43PM -0800, H. Peter Anvin wrote: > Patch