Re: + procfs-add-vmflags-field-in-smaps-output-v3-fix-2.patch added to -mm tree

2012-10-24 Thread Cyrill Gorcunov
On Wed, Oct 24, 2012 at 09:26:20PM +1100, Stephen Rothwell wrote: > > Hi Stephen, could you please elaborate, which bad usage hiding could be > > there? > > I though it might suppress a warning if someone added an entry with a >2 > character string, but testing shows that it does not, so that is

Re: + procfs-add-vmflags-field-in-smaps-output-v3-fix-2.patch added to -mm tree

2012-10-24 Thread Stephen Rothwell
Hi Cyrill, On Wed, 24 Oct 2012 13:59:59 +0400 Cyrill Gorcunov wrote: > > On Wed, Oct 24, 2012 at 08:47:46PM +1100, Stephen Rothwell wrote: > > > > On Wed, 24 Oct 2012 12:45:15 +0400 Cyrill Gorcunov > > wrote: > > > > > > static void show_smap_vma_flags(struct seq_file *m, struct > > >

Re: + procfs-add-vmflags-field-in-smaps-output-v3-fix-2.patch added to -mm tree

2012-10-24 Thread Cyrill Gorcunov
On Wed, Oct 24, 2012 at 08:47:46PM +1100, Stephen Rothwell wrote: > Hi Cyrill, > > On Wed, 24 Oct 2012 12:45:15 +0400 Cyrill Gorcunov > wrote: > > > > static void show_smap_vma_flags(struct seq_file *m, struct vm_area_struct > > *vma) > > { > > +#define __VM_FLAG(_f, _s) [ilog2(_f)] =

Re: + procfs-add-vmflags-field-in-smaps-output-v3-fix-2.patch added to -mm tree

2012-10-24 Thread Cyrill Gorcunov
On Wed, Oct 24, 2012 at 11:24:04AM +0200, Peter Zijlstra wrote: > On Wed, 2012-10-24 at 12:45 +0400, Cyrill Gorcunov wrote: > > for (i = 0; i < BITS_PER_LONG; i++) { > > - if (vma->vm_flags & (1 << i)) > > + if (vma->vm_flags & (1ul << i)) { > >

Re: + procfs-add-vmflags-field-in-smaps-output-v3-fix-2.patch added to -mm tree

2012-10-24 Thread Stephen Rothwell
Hi Cyrill, On Wed, 24 Oct 2012 12:45:15 +0400 Cyrill Gorcunov wrote: > > static void show_smap_vma_flags(struct seq_file *m, struct vm_area_struct > *vma) > { > +#define __VM_FLAG(_f, _s)[ilog2(_f)] = {(const char [2]){_s}} I really don't think you need the cast (and it may hide bad

Re: + procfs-add-vmflags-field-in-smaps-output-v3-fix-2.patch added to -mm tree

2012-10-24 Thread Peter Zijlstra
On Wed, 2012-10-24 at 12:45 +0400, Cyrill Gorcunov wrote: > for (i = 0; i < BITS_PER_LONG; i++) { > - if (vma->vm_flags & (1 << i)) > + if (vma->vm_flags & (1ul << i)) { for_each_set_bit(i, >vm_flags, BITS_PER_LONG) { >

Re: + procfs-add-vmflags-field-in-smaps-output-v3-fix-2.patch added to -mm tree

2012-10-24 Thread Cyrill Gorcunov
On Tue, Oct 23, 2012 at 03:02:59PM -0700, a...@linux-foundation.org wrote: > > The patch titled > Subject: procfs-add-vmflags-field-in-smaps-output-v3-fix-2 > has been added to the -mm tree. Its filename is > procfs-add-vmflags-field-in-smaps-output-v3-fix-2.patch > >

Re: + procfs-add-vmflags-field-in-smaps-output-v3-fix-2.patch added to -mm tree

2012-10-24 Thread Cyrill Gorcunov
On Tue, Oct 23, 2012 at 03:02:59PM -0700, a...@linux-foundation.org wrote: The patch titled Subject: procfs-add-vmflags-field-in-smaps-output-v3-fix-2 has been added to the -mm tree. Its filename is procfs-add-vmflags-field-in-smaps-output-v3-fix-2.patch

Re: + procfs-add-vmflags-field-in-smaps-output-v3-fix-2.patch added to -mm tree

2012-10-24 Thread Peter Zijlstra
On Wed, 2012-10-24 at 12:45 +0400, Cyrill Gorcunov wrote: for (i = 0; i BITS_PER_LONG; i++) { - if (vma-vm_flags (1 i)) + if (vma-vm_flags (1ul i)) { for_each_set_bit(i, vma-vm_flags, BITS_PER_LONG) { seq_printf(m, %c%c

Re: + procfs-add-vmflags-field-in-smaps-output-v3-fix-2.patch added to -mm tree

2012-10-24 Thread Stephen Rothwell
Hi Cyrill, On Wed, 24 Oct 2012 12:45:15 +0400 Cyrill Gorcunov gorcu...@openvz.org wrote: static void show_smap_vma_flags(struct seq_file *m, struct vm_area_struct *vma) { +#define __VM_FLAG(_f, _s)[ilog2(_f)] = {(const char [2]){_s}} I really don't think you need the cast (and it may

Re: + procfs-add-vmflags-field-in-smaps-output-v3-fix-2.patch added to -mm tree

2012-10-24 Thread Cyrill Gorcunov
On Wed, Oct 24, 2012 at 11:24:04AM +0200, Peter Zijlstra wrote: On Wed, 2012-10-24 at 12:45 +0400, Cyrill Gorcunov wrote: for (i = 0; i BITS_PER_LONG; i++) { - if (vma-vm_flags (1 i)) + if (vma-vm_flags (1ul i)) { for_each_set_bit(i,

Re: + procfs-add-vmflags-field-in-smaps-output-v3-fix-2.patch added to -mm tree

2012-10-24 Thread Cyrill Gorcunov
On Wed, Oct 24, 2012 at 08:47:46PM +1100, Stephen Rothwell wrote: Hi Cyrill, On Wed, 24 Oct 2012 12:45:15 +0400 Cyrill Gorcunov gorcu...@openvz.org wrote: static void show_smap_vma_flags(struct seq_file *m, struct vm_area_struct *vma) { +#define __VM_FLAG(_f, _s) [ilog2(_f)] =

Re: + procfs-add-vmflags-field-in-smaps-output-v3-fix-2.patch added to -mm tree

2012-10-24 Thread Stephen Rothwell
Hi Cyrill, On Wed, 24 Oct 2012 13:59:59 +0400 Cyrill Gorcunov gorcu...@openvz.org wrote: On Wed, Oct 24, 2012 at 08:47:46PM +1100, Stephen Rothwell wrote: On Wed, 24 Oct 2012 12:45:15 +0400 Cyrill Gorcunov gorcu...@openvz.org wrote: static void show_smap_vma_flags(struct seq_file

Re: + procfs-add-vmflags-field-in-smaps-output-v3-fix-2.patch added to -mm tree

2012-10-24 Thread Cyrill Gorcunov
On Wed, Oct 24, 2012 at 09:26:20PM +1100, Stephen Rothwell wrote: Hi Stephen, could you please elaborate, which bad usage hiding could be there? I though it might suppress a warning if someone added an entry with a 2 character string, but testing shows that it does not, so that is OK.