[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20160802113556.27131-1-baolex.ni@intel.com>
Date: Tue, 2 Aug 2016 19:35:56 +0800
From: Baole Ni <baolex.ni@...el.com>
To: lee.jones@...aro.org, chaitra.basappa@...adcom.com,
suganath-prabu.subramani@...adcom.com, mchehab@...hat.com,
m.chehab@...sung.com, pawel@...iak.com, m.szyprowski@...sung.com,
kyungmin.park@...sung.com, k.kozlowski@...sung.com
Cc: linux-kernel@...r.kernel.org, chuansheng.liu@...el.com,
baolex.ni@...el.com
Subject: [PATCH 0676/1285] Replace numeric parameter like 0444 with macro
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@...el.com>
Signed-off-by: Baole Ni <baolex.ni@...el.com>
---
drivers/mfd/pcf50633-core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mfd/pcf50633-core.c b/drivers/mfd/pcf50633-core.c
index 6155d12..37f41c5 100644
--- a/drivers/mfd/pcf50633-core.c
+++ b/drivers/mfd/pcf50633-core.c
@@ -111,7 +111,7 @@ static ssize_t show_dump_regs(struct device *dev, struct device_attribute *attr,
return buf1 - buf;
}
-static DEVICE_ATTR(dump_regs, 0400, show_dump_regs, NULL);
+static DEVICE_ATTR(dump_regs, S_IRUSR, show_dump_regs, NULL);
static ssize_t show_resume_reason(struct device *dev,
struct device_attribute *attr, char *buf)
@@ -128,7 +128,7 @@ static ssize_t show_resume_reason(struct device *dev,
return n;
}
-static DEVICE_ATTR(resume_reason, 0400, show_resume_reason, NULL);
+static DEVICE_ATTR(resume_reason, S_IRUSR, show_resume_reason, NULL);
static struct attribute *pcf_sysfs_entries[] = {
&dev_attr_dump_regs.attr,
--
2.9.2
Powered by blists - more mailing lists