lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 2 Aug 2016 16:27:23 +0200
From:	Lukas Wunner <lukas@...ner.de>
To:	Ville Syrjälä <ville.syrjala@...ux.intel.com>
Cc:	Baole Ni <baolex.ni@...el.com>, wuninsu@...il.com,
	k.kozlowski@...sung.com, treding@...dia.com,
	intel-gfx@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
	kyungmin.park@...sung.com, kgene@...nel.org, bp@...en8.de,
	dri-devel@...ts.freedesktop.org, dougthompson@...ssion.com,
	daniel.vetter@...el.com, chuansheng.liu@...el.com
Subject: Re: [Intel-gfx] [PATCH 0197/1285] Replace numeric parameter like
 0444 with macro

On Tue, Aug 02, 2016 at 02:37:37PM +0300, Ville Syrjälä wrote:
> On Tue, Aug 02, 2016 at 06:48:47PM +0800, Baole Ni wrote:
> > I find that the developers often just specified the numeric value
> > when calling a macro which is defined with a parameter for access permission.
> > As we know, these numeric value for access permission have had the corresponding macro,
> > and that using macro can improve the robustness and readability of the code,
> > thus, I suggest replacing the numeric parameter with the macro.
> > 
> > Signed-off-by: Chuansheng Liu <chuansheng.liu@...el.com>
> > Signed-off-by: Baole Ni <baolex.ni@...el.com>
> > ---
> >  drivers/gpu/drm/i915/i915_params.c | 64 +++++++++++++++++++-------------------
> >  1 file changed, 32 insertions(+), 32 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/i915_params.c b/drivers/gpu/drm/i915/i915_params.c
> > index 1779f02..7184e06 100644
> > --- a/drivers/gpu/drm/i915/i915_params.c
> > +++ b/drivers/gpu/drm/i915/i915_params.c
> > @@ -60,22 +60,22 @@ struct i915_params i915 __read_mostly = {
> >  	.inject_load_failure = 0,
> >  };
> >  
> > -module_param_named(modeset, i915.modeset, int, 0400);
> > +module_param_named(modeset, i915.modeset, int, S_IRUSR);
> 
> At least I can't read those macros. Octal is much clearer IMO.

It's also easier to grep for, say, 644, rather than formulating a
regex with all possible ordering permutations of these macros.

Best regards,

Lukas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ