Re: [PATCH] checkpatch: don't require octal permissions for "0"

From: Joe Perches
Date: Sun Dec 10 2017 - 17:56:55 EST


On Sun, 2017-12-10 at 15:04 +0100, Bartosz Golaszewski wrote:
> If the permission value is 0, don't raise the NON_OCTAL_PERMISSIONS
> error. There's no possibility of an error if there are no permissions.

Hi Bartosz

This response below is the same as another email thread

-------------

Personally, I prefer 4 digit octal in most cases as it
shows the coder knows that the argument is a permissions
use and not just some generic 0.

There are not many uses of 0 for permissions outside of
module_param*.

I suppose all the variants of module_param calls, as a
0 there is specifically a "not to appear in sysfs" flag,
could or should be excluded from that octal test.