Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1454802
| From | Greg KH <gregkh@linuxfoundation.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 0029/1285] Replace numeric parameter like 0444 with macro |
| Date | 2016-08-02 17:40 +0200 |
| Message-ID | <s1Jb5-5Jj-69@gated-at.bofh.it> (permalink) |
| References | <s1FTR-3Ey-59@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Aug 02, 2016 at 06:35:37PM +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>
> ---
> arch/tile/kernel/sysfs.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/arch/tile/kernel/sysfs.c b/arch/tile/kernel/sysfs.c
> index 825867c..cef3937 100644
> --- a/arch/tile/kernel/sysfs.c
> +++ b/arch/tile/kernel/sysfs.c
> @@ -38,7 +38,7 @@ static ssize_t chip_width_show(struct device *dev,
> {
> return sprintf(page, "%u\n", smp_width);
> }
> -static DEVICE_ATTR(chip_width, 0444, chip_width_show, NULL);
> +static DEVICE_ATTR(chip_width, S_IRUSR | S_IRGRP | S_IROTH, chip_width_show, NULL);
You do know about S_IRUGO, right? Why not use that?
Same goes for your other replacements, use the correct #define, not a
mix of values | together.
And you are sending hundreds of patches with the same identical subject
line, that's not ok, you need to make it unique for every patch.
Usually that is done with the subsystem and driver name, see examples of
this in the kernel changelogs.
Please fix up and try again, in a much smaller series, before trying to
do this across the whole kernel tree.
good luck!
greg k-h
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0029/1285] Replace numeric parameter like 0444 with macro Baole Ni <baolex.ni@intel.com> - 2016-08-02 13:20 +0200
Re: [PATCH 0029/1285] Replace numeric parameter like 0444 with macro Rich Felker <dalias@libc.org> - 2016-08-02 16:50 +0200
Re: [PATCH 0029/1285] Replace numeric parameter like 0444 with macro Greg KH <gregkh@linuxfoundation.org> - 2016-08-02 17:40 +0200
Re: [PATCH 0029/1285] Replace numeric parameter like 0444 with macro Linus Torvalds <torvalds@linux-foundation.org> - 2016-08-02 19:30 +0200
csiph-web