* [PATCH 0068/1285] Replace numeric parameter like 0444 with macro
@ 2016-08-02 10:38 Baole Ni
2016-08-02 11:52 ` Aw: " Lino Sanfilippo
0 siblings, 1 reply; 2+ messages in thread
From: Baole Ni @ 2016-08-02 10:38 UTC (permalink / raw)
To: 3chas3, tj, lenb, x86, hpa
Cc: linux-atm-general, netdev, linux-kernel, chuansheng.liu, baolex.ni
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/atm/ambassador.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/atm/ambassador.c b/drivers/atm/ambassador.c
index f1a9198..30bf0a1 100644
--- a/drivers/atm/ambassador.c
+++ b/drivers/atm/ambassador.c
@@ -2358,7 +2358,7 @@ MODULE_AUTHOR(maintainer_string);
MODULE_DESCRIPTION(description_string);
MODULE_LICENSE("GPL");
MODULE_FIRMWARE("atmsar11.fw");
-module_param(debug, ushort, 0644);
+module_param(debug, ushort, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
module_param(cmds, uint, 0);
module_param(txs, uint, 0);
module_param_array(rxs, uint, NULL, 0);
--
2.9.2
^ permalink raw reply [flat|nested] 2+ messages in thread* Aw: [PATCH 0068/1285] Replace numeric parameter like 0444 with macro
2016-08-02 10:38 [PATCH 0068/1285] Replace numeric parameter like 0444 with macro Baole Ni
@ 2016-08-02 11:52 ` Lino Sanfilippo
0 siblings, 0 replies; 2+ messages in thread
From: Lino Sanfilippo @ 2016-08-02 11:52 UTC (permalink / raw)
To: Baole Ni
Cc: 3chas3, tj, lenb, x86, hpa, linux-atm-general, netdev,
linux-kernel, chuansheng.liu, baolex.ni
Hi,
> Gesendet: Dienstag, 02. August 2016 um 12:38 Uhr
> Von: "Baole Ni" <baolex.ni@intel.com>
> An: 3chas3@gmail.com, tj@kernel.org, lenb@kernel.org, x86@kernel.org, hpa@zytor.com
> Cc: linux-atm-general@lists.sourceforge.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, chuansheng.liu@intel.com, baolex.ni@intel.com
> Betreff: [PATCH 0068/1285] Replace numeric parameter like 0444 with macro
>
just a note: you are using the same patch description for several different
patches which makes it difficult to distinguish between them.
You should add the driver name in the description, even better also the subystem
like "atm: ambassador: Replace numeric parameter like 0444 with macro"
Regards,
Lino
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-08-02 16:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-02 10:38 [PATCH 0068/1285] Replace numeric parameter like 0444 with macro Baole Ni
2016-08-02 11:52 ` Aw: " Lino Sanfilippo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®