[PATCH] powerpc: Use octal numbers for file permissions

Cyril Bur cyrilbur at gmail.com
Wed Jan 18 11:05:05 AEDT 2017


On Tue, 2017-01-17 at 20:52 +1100, Michael Ellerman wrote:
> Cyril Bur <cyrilbur at gmail.com> writes:
> 
> > On Thu, 2017-01-12 at 14:54 +1100, Russell Currey wrote:
> > > Symbolic macros are unintuitive and hard to read, whereas octal constants
> > > are much easier to interpret.  Replace macros for the basic permission
> > > flags (user/group/other read/write/execute) with numeric constants
> > > instead, across the whole powerpc tree.
> > > 
> > > Introducing a significant number of changes across the tree for no runtime
> > > benefit isn't exactly desirable, but so long as these macros are still
> > > used in the tree people will keep sending patches that add them.  Not only
> > > are they hard to parse at a glance, there are multiple ways of coming to
> > > the same value (as you can see with 0444 and 0644 in this patch) which
> > > hurts readability.
> > > 
> > > Signed-off-by: Russell Currey <ruscur at russell.cc>
> > 
> > Reviewed-by: Cyril Bur <cyrilbur at gmail.com>
> 
> Did you really really review every single change?
> 

Yes. I just went through it again and still didn't find any mistakes.

> Because if you did then I don't have to, and that would be *great* :)
> 

My pleasure :)

Interestingly enough, reviewing this patch taught me to quickly parse
the symbolics, which, for me now makes this patch less important haha.
I'm still in favour! No matter how fast you get at the symolics the
octal is still faster, also there's only one way to write the octal
permissions!


> cheers


More information about the Linuxppc-dev mailing list