netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1086/1285] Replace numeric parameter like 0444 with macro
@ 2016-08-02 12:15 Baole Ni
       [not found] ` <20160802121513.22526-1-baolex.ni-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Baole Ni @ 2016-08-02 12:15 UTC (permalink / raw)
  To: mareklindner-rVWd3aGhH2z5bpWLKbzFeg,
	sw-2YrNx6rUIHYiY0qSoAWiAoQuADTiUCJX, a,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q, jiangshanlai-Re5JQEeQqe8AvxtiuMwx3w,
	m.chehab-Sze3O3UU22JBDgjK7y7TUQ,
	gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
	m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ,
	kyungmin.park-Sze3O3UU22JBDgjK7y7TUQ,
	k.kozlowski-Sze3O3UU22JBDgjK7y7TUQ
  Cc: aarcange-H+wXaHxf7aLQT0dZR+AlfA, mhocko-IBi9RG/b67k,
	gang.chen.5i5j-Re5JQEeQqe8AvxtiuMwx3w,
	netdev-u79uwXL29TY76Z2rM5mHXA,
	b.a.t.m.a.n-ZwoEplunGu2X36UT3dwllkB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	baolex.ni-ral2JQCrhuEAvxtiuMwx3w,
	aryabinin-5HdwGun5lf+gSpxsJD1C4w,
	chuansheng.liu-ral2JQCrhuEAvxtiuMwx3w,
	koct9i-Re5JQEeQqe8AvxtiuMwx3w

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-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Baole Ni <baolex.ni-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
 net/batman-adv/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/batman-adv/main.c b/net/batman-adv/main.c
index 5f2974b..25759b9 100644
--- a/net/batman-adv/main.c
+++ b/net/batman-adv/main.c
@@ -1313,7 +1313,7 @@ static struct kparam_string batadv_param_string_ra = {
 };
 
 module_param_cb(routing_algo, &batadv_param_ops_ra, &batadv_param_string_ra,
-		0644);
+		S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 module_init(batadv_init);
 module_exit(batadv_exit);
 
-- 
2.9.2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-08-02 13:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-02 12:15 [PATCH 1086/1285] Replace numeric parameter like 0444 with macro Baole Ni
     [not found] ` <20160802121513.22526-1-baolex.ni-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-08-02 13:38   ` Sven Eckelmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).