Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1454586 > unrolled thread
| Started by | Lukas Wunner <lukas@wunner.de> |
|---|---|
| First post | 2016-08-02 16:40 +0200 |
| Last post | 2016-08-02 16:40 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [Intel-gfx] [PATCH 0197/1285] Replace numeric parameter like 0444 with macro Lukas Wunner <lukas@wunner.de> - 2016-08-02 16:40 +0200
| From | Lukas Wunner <lukas@wunner.de> |
|---|---|
| Date | 2016-08-02 16:40 +0200 |
| Subject | Re: [Intel-gfx] [PATCH 0197/1285] Replace numeric parameter like 0444 with macro |
| Message-ID | <s1J1o-5FG-41@gated-at.bofh.it> |
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@intel.com>
> > Signed-off-by: Baole Ni <baolex.ni@intel.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
Back to top | Article view | linux.kernel
csiph-web