Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1453829
| From | Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 0063/1285] Replace numeric parameter like 0444 with macro |
| Date | 2016-08-02 13:40 +0200 |
| Message-ID | <s1Gdc-3Oh-3@gated-at.bofh.it> (permalink) |
| References | <s1FTR-3Ey-57@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hello.
On 8/2/2016 1:37 PM, 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/ata/pata_legacy.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/ata/pata_legacy.c b/drivers/ata/pata_legacy.c
> index bce2a8c..1dc0beb 100644
> --- a/drivers/ata/pata_legacy.c
> +++ b/drivers/ata/pata_legacy.c
> @@ -76,7 +76,7 @@
> #define NR_HOST 6
>
> static int all;
> -module_param(all, int, 0444);
> +module_param(all, int, S_IRUSR | S_IRGRP | S_IROTH);
There's S_IRUGO for this case, no?
MBR, Sergei
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0063/1285] Replace numeric parameter like 0444 with macro Baole Ni <baolex.ni@intel.com> - 2016-08-02 13:20 +0200
Re: [PATCH 0063/1285] Replace numeric parameter like 0444 with macro Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-08-02 13:40 +0200
Re: [PATCH 0063/1285] Replace numeric parameter like 0444 with macro Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-08-02 14:40 +0200
Re: [PATCH 0063/1285] Replace numeric parameter like 0444 with macro Steven Rostedt <rostedt@goodmis.org> - 2016-08-02 15:30 +0200
Re: [PATCH 0063/1285] Replace numeric parameter like 0444 with macro Marcel Holtmann <marcel@holtmann.org> - 2016-08-02 16:00 +0200
Re: [PATCH 0063/1285] Replace numeric parameter like 0444 with macro David Miller <davem@davemloft.net> - 2016-08-02 20:40 +0200
Re: [PATCH 0063/1285] Replace numeric parameter like 0444 with macro Tejun Heo <tj@kernel.org> - 2016-08-02 20:40 +0200
csiph-web