public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0677/1285] Replace numeric parameter like 0444 with macro
@ 2016-08-02 11:36 Baole Ni
  2016-08-03  7:51 ` Lee Jones
  0 siblings, 1 reply; 2+ messages in thread
From: Baole Ni @ 2016-08-02 11:36 UTC (permalink / raw)
  To: lee.jones, chaitra.basappa, suganath-prabu.subramani, mchehab,
	m.chehab, pawel, m.szyprowski, kyungmin.park, k.kozlowski
  Cc: 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/mfd/sm501.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/sm501.c b/drivers/mfd/sm501.c
index 65cd0d2..6837aa3 100644
--- a/drivers/mfd/sm501.c
+++ b/drivers/mfd/sm501.c
@@ -1216,7 +1216,7 @@ static ssize_t sm501_dbg_regs(struct device *dev,
 }
 
 
-static DEVICE_ATTR(dbg_regs, 0444, sm501_dbg_regs, NULL);
+static DEVICE_ATTR(dbg_regs, S_IRUSR | S_IRGRP | S_IROTH, sm501_dbg_regs, NULL);
 
 /* sm501_init_reg
  *
-- 
2.9.2

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

end of thread, other threads:[~2016-08-03  7:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-02 11:36 [PATCH 0677/1285] Replace numeric parameter like 0444 with macro Baole Ni
2016-08-03  7:51 ` Lee Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox