From: dev-harsh1998 <harshitjain6751@gmail.com>
To: trivial@kernel.org
Cc: Harshit Jain <harshitjain6751@gmail.com>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Andi Shyti <andi@etezian.org>,
Simon Budig <simon.budig@kernelconcepts.de>,
Luca Ceresoli <luca@lucaceresoli.net>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 01/11] touchscreen: ft5x06: Use octal permissions
Date: Mon, 23 Jul 2018 18:49:27 +0530 [thread overview]
Message-ID: <20180723131954.30739-11-harshitjain6751@gmail.com> (raw)
In-Reply-To: <20180723131954.30739-1-harshitjain6751@gmail.com>
WARNING: Symbolic permissions 'S_IWUSR | S_IRUGO' are not preferred. Consider using octal permissions '0644'.
+static EDT_ATTR(gain, S_IWUSR | S_IRUGO, WORK_REGISTER_GAIN,
WARNING: Symbolic permissions 'S_IWUSR | S_IRUGO' are not preferred. Consider using octal permissions '0644'.
+static EDT_ATTR(offset, S_IWUSR | S_IRUGO, WORK_REGISTER_OFFSET,
WARNING: Symbolic permissions 'S_IWUSR | S_IRUGO' are not preferred. Consider using octal permissions '0644'.
+static EDT_ATTR(threshold, S_IWUSR | S_IRUGO, WORK_REGISTER_THRESHOLD,
WARNING: Symbolic permissions 'S_IWUSR | S_IRUGO' are not preferred. Consider using octal permissions '0644'.
+static EDT_ATTR(report_rate, S_IWUSR | S_IRUGO, WORK_REGISTER_REPORT_RATE,
WARNING: Symbolic permissions 'S_IRUSR' are not preferred. Consider using octal permissions '0400'.
+ debugfs_create_u16("num_x", S_IRUSR, tsdata->debug_dir, &tsdata->num_x);
WARNING: Symbolic permissions 'S_IRUSR' are not preferred. Consider using octal permissions '0400'.
+ debugfs_create_u16("num_y", S_IRUSR, tsdata->debug_dir, &tsdata->num_y);
WARNING: Symbolic permissions 'S_IRUSR | S_IWUSR' are not preferred. Consider using octal permissions '0600'.
+ debugfs_create_file("mode", S_IRUSR | S_IWUSR,
WARNING: Symbolic permissions 'S_IRUSR' are not preferred. Consider using octal permissions '0400'.
+ debugfs_create_file("raw_data", S_IRUSR,
Signed-off-by: Harshit Jain <harshitjain6751@gmail.com>
---
drivers/input/touchscreen/edt-ft5x06.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c
index 1e18ca0d1b4e..ea4026682e79 100644
--- a/drivers/input/touchscreen/edt-ft5x06.c
+++ b/drivers/input/touchscreen/edt-ft5x06.c
@@ -479,16 +479,16 @@ static ssize_t edt_ft5x06_setting_store(struct device *dev,
}
/* m06, m09: range 0-31, m12: range 0-5 */
-static EDT_ATTR(gain, S_IWUSR | S_IRUGO, WORK_REGISTER_GAIN,
+static EDT_ATTR(gain, 0644, WORK_REGISTER_GAIN,
M09_REGISTER_GAIN, 0, 31);
/* m06, m09: range 0-31, m12: range 0-16 */
-static EDT_ATTR(offset, S_IWUSR | S_IRUGO, WORK_REGISTER_OFFSET,
+static EDT_ATTR(offset, 0644, WORK_REGISTER_OFFSET,
M09_REGISTER_OFFSET, 0, 31);
/* m06: range 20 to 80, m09: range 0 to 30, m12: range 1 to 255... */
-static EDT_ATTR(threshold, S_IWUSR | S_IRUGO, WORK_REGISTER_THRESHOLD,
+static EDT_ATTR(threshold, 0644, WORK_REGISTER_THRESHOLD,
M09_REGISTER_THRESHOLD, 0, 255);
/* m06: range 3 to 14, m12: (0x64: 100Hz) */
-static EDT_ATTR(report_rate, S_IWUSR | S_IRUGO, WORK_REGISTER_REPORT_RATE,
+static EDT_ATTR(report_rate, 0644, WORK_REGISTER_REPORT_RATE,
NO_REGISTER, 0, 255);
static struct attribute *edt_ft5x06_attrs[] = {
@@ -739,12 +739,12 @@ edt_ft5x06_ts_prepare_debugfs(struct edt_ft5x06_ts_data *tsdata,
if (!tsdata->debug_dir)
return;
- debugfs_create_u16("num_x", S_IRUSR, tsdata->debug_dir, &tsdata->num_x);
- debugfs_create_u16("num_y", S_IRUSR, tsdata->debug_dir, &tsdata->num_y);
+ debugfs_create_u16("num_x", 0400, tsdata->debug_dir, &tsdata->num_x);
+ debugfs_create_u16("num_y", 0400, tsdata->debug_dir, &tsdata->num_y);
- debugfs_create_file("mode", S_IRUSR | S_IWUSR,
+ debugfs_create_file("mode", 0600,
tsdata->debug_dir, tsdata, &debugfs_mode_fops);
- debugfs_create_file("raw_data", S_IRUSR,
+ debugfs_create_file("raw_data", 0400,
tsdata->debug_dir, tsdata, &debugfs_raw_data_fops);
}
--
2.17.1
next prev parent reply other threads:[~2018-07-23 13:20 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-23 13:19 [PATCH 02/11] touchscreen: ad7877: Use octal permissions dev-harsh1998
2018-07-23 13:19 ` [PATCH 03/11] touchscreen: ad7846: " dev-harsh1998
2018-07-23 13:19 ` [PATCH 04/11] touchscreen: amtel: " dev-harsh1998
2018-07-23 13:19 ` [PATCH 05/11] touchscreen: elants: " dev-harsh1998
2018-07-23 13:32 ` Greg Kroah-Hartman
2018-07-23 17:18 ` Dmitry Torokhov
2018-07-23 17:25 ` Joe Perches
2018-07-23 17:46 ` Dmitry Torokhov
2018-07-23 18:24 ` Guenter Roeck
2018-07-23 18:30 ` Joe Perches
2018-07-23 13:19 ` [PATCH 06/11] touchscreen: ili210x: " dev-harsh1998
2018-07-23 13:19 ` [PATCH 07/11] touchscreen: mc13783: " dev-harsh1998
2018-07-23 13:19 ` [PATCH 08/11] touchscreen: melfas: " dev-harsh1998
2018-07-23 13:19 ` [PATCH 09/11] touchscreen: raydium_ts: " dev-harsh1998
2018-07-23 13:19 ` [PATCH 10/11] touchscreen: sun4i_ts: " dev-harsh1998
2018-07-23 13:19 ` [PATCH 11/11] touchscreen: tsc200x: " dev-harsh1998
2018-07-23 13:19 ` dev-harsh1998 [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-07-21 19:09 [PATCH 02/11] touchscreen: ad7877: " dev-harsh1998
2018-07-21 19:09 ` [PATCH 01/11] touchscreen: ft5x06: " dev-harsh1998
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180723131954.30739-11-harshitjain6751@gmail.com \
--to=harshitjain6751@gmail.com \
--cc=andi@etezian.org \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luca@lucaceresoli.net \
--cc=simon.budig@kernelconcepts.de \
--cc=trivial@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).