All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Staging: speakup - syle fix permissions to octal
@ 2017-01-28  6:05 Derek Robson
  2017-01-28  6:14 ` Joe Perches
  2017-02-04  4:44 ` Guenter Roeck
  0 siblings, 2 replies; 12+ messages in thread
From: Derek Robson @ 2017-01-28  6:05 UTC (permalink / raw)
  To: w.d.hubbs, chris, kirk, samuel.thibault, gregkh, shraddha.6596,
	alan, shiva, amitoj1606, robsonde, amsfield22, bhumirks,
	waltfeasel
  Cc: speakup, devel, linux-kernel

A style fix across whole driver.
changed permissions to octal style, found using checkpatch

Signed-off-by: Derek Robson <robsonde@gmail.com>
---
 drivers/staging/speakup/main.c           |  4 ++--
 drivers/staging/speakup/speakup.h        |  4 ++--
 drivers/staging/speakup/speakup_acntpc.c | 26 +++++++++++++-------------
 drivers/staging/speakup/speakup_acntsa.c | 26 +++++++++++++-------------
 drivers/staging/speakup/speakup_apollo.c | 28 ++++++++++++++--------------
 drivers/staging/speakup/speakup_audptr.c | 28 ++++++++++++++--------------
 drivers/staging/speakup/speakup_bns.c    | 26 +++++++++++++-------------
 drivers/staging/speakup/speakup_decext.c | 28 ++++++++++++++--------------
 drivers/staging/speakup/speakup_decpc.c  | 26 +++++++++++++-------------
 drivers/staging/speakup/speakup_dectlk.c | 28 ++++++++++++++--------------
 drivers/staging/speakup/speakup_dtlk.c   | 32 ++++++++++++++++----------------
 drivers/staging/speakup/speakup_dummy.c  | 26 +++++++++++++-------------
 drivers/staging/speakup/speakup_keypc.c  | 22 +++++++++++-----------
 drivers/staging/speakup/speakup_ltlk.c   | 32 ++++++++++++++++----------------
 drivers/staging/speakup/speakup_soft.c   | 32 ++++++++++++++++----------------
 drivers/staging/speakup/speakup_spkout.c | 28 ++++++++++++++--------------
 drivers/staging/speakup/speakup_txprt.c  | 26 +++++++++++++-------------
 17 files changed, 211 insertions(+), 211 deletions(-)

diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c
index 5c192042eeac..f7e555b30deb 100644
--- a/drivers/staging/speakup/main.c
+++ b/drivers/staging/speakup/main.c
@@ -58,8 +58,8 @@ MODULE_LICENSE("GPL");
 MODULE_VERSION(SPEAKUP_VERSION);
 
 char *synth_name;
-module_param_named(synth, synth_name, charp, S_IRUGO);
-module_param_named(quiet, spk_quiet_boot, bool, S_IRUGO);
+module_param_named(synth, synth_name, charp, 0444 );
+module_param_named(quiet, spk_quiet_boot, bool, 0444 );
 
 MODULE_PARM_DESC(synth, "Synth to start if speakup is built in.");
 MODULE_PARM_DESC(quiet, "Do not announce when the synthesizer is found.");
diff --git a/drivers/staging/speakup/speakup.h b/drivers/staging/speakup/speakup.h
index df74c912da72..ee567aaf93a3 100644
--- a/drivers/staging/speakup/speakup.h
+++ b/drivers/staging/speakup/speakup.h
@@ -10,8 +10,8 @@
 #define MAX_DESC_LEN 72
 
 /* proc permissions */
-#define USER_R (S_IFREG|S_IRUGO)
-#define USER_W (S_IFREG|S_IWUGO)
+#define USER_R (S_IFREG|0444)
+#define USER_W (S_IFREG|0666)
 
 #define TOGGLE_0 .u.n = {NULL, 0, 0, 1, 0, 0, NULL }
 #define TOGGLE_1 .u.n = {NULL, 1, 0, 1, 0, 0, NULL }
diff --git a/drivers/staging/speakup/speakup_acntpc.c b/drivers/staging/speakup/speakup_acntpc.c
index efb791bb642b..c7fab261d860 100644
--- a/drivers/staging/speakup/speakup_acntpc.c
+++ b/drivers/staging/speakup/speakup_acntpc.c
@@ -57,28 +57,28 @@ static struct var_t vars[] = {
  * These attributes will appear in /sys/accessibility/speakup/acntpc.
  */
 static struct kobj_attribute caps_start_attribute =
-	__ATTR(caps_start, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(caps_start, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute caps_stop_attribute =
-	__ATTR(caps_stop, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(caps_stop, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute pitch_attribute =
-	__ATTR(pitch, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(pitch, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute rate_attribute =
-	__ATTR(rate, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(rate, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute tone_attribute =
-	__ATTR(tone, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(tone, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute vol_attribute =
-	__ATTR(vol, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(vol, 0644, spk_var_show, spk_var_store);
 
 static struct kobj_attribute delay_time_attribute =
-	__ATTR(delay_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(delay_time, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute direct_attribute =
-	__ATTR(direct, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(direct, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute full_time_attribute =
-	__ATTR(full_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(full_time, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute jiffy_delta_attribute =
-	__ATTR(jiffy_delta, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(jiffy_delta, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute trigger_time_attribute =
-	__ATTR(trigger_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(trigger_time, 0644, spk_var_show, spk_var_store);
 
 /*
  * Create a group of attributes so that we can create and destroy them all
@@ -307,8 +307,8 @@ static void accent_release(void)
 	speakup_info.port_tts = 0;
 }
 
-module_param_named(port, port_forced, int, S_IRUGO);
-module_param_named(start, synth_acntpc.startup, short, S_IRUGO);
+module_param_named(port, port_forced, int, 0444);
+module_param_named(start, synth_acntpc.startup, short, 0444);
 
 MODULE_PARM_DESC(port, "Set the port for the synthesizer (override probing).");
 MODULE_PARM_DESC(start, "Start the synthesizer once it is loaded.");
diff --git a/drivers/staging/speakup/speakup_acntsa.c b/drivers/staging/speakup/speakup_acntsa.c
index 34f45d3549b2..b4e49cdd2014 100644
--- a/drivers/staging/speakup/speakup_acntsa.c
+++ b/drivers/staging/speakup/speakup_acntsa.c
@@ -43,28 +43,28 @@ static struct var_t vars[] = {
  * These attributes will appear in /sys/accessibility/speakup/acntsa.
  */
 static struct kobj_attribute caps_start_attribute =
-	__ATTR(caps_start, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(caps_start, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute caps_stop_attribute =
-	__ATTR(caps_stop, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(caps_stop, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute pitch_attribute =
-	__ATTR(pitch, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(pitch, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute rate_attribute =
-	__ATTR(rate, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(rate, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute tone_attribute =
-	__ATTR(tone, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(tone, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute vol_attribute =
-	__ATTR(vol, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(vol, 0644, spk_var_show, spk_var_store);
 
 static struct kobj_attribute delay_time_attribute =
-	__ATTR(delay_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(delay_time, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute direct_attribute =
-	__ATTR(direct, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(direct, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute full_time_attribute =
-	__ATTR(full_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(full_time, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute jiffy_delta_attribute =
-	__ATTR(jiffy_delta, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(jiffy_delta, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute trigger_time_attribute =
-	__ATTR(trigger_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(trigger_time, 0644, spk_var_show, spk_var_store);
 
 /*
  * Create a group of attributes so that we can create and destroy them all
@@ -133,8 +133,8 @@ static int synth_probe(struct spk_synth *synth)
 	return failed;
 }
 
-module_param_named(ser, synth_acntsa.ser, int, S_IRUGO);
-module_param_named(start, synth_acntsa.startup, short, S_IRUGO);
+module_param_named(ser, synth_acntsa.ser, int, 0444);
+module_param_named(start, synth_acntsa.startup, short, 0444);
 
 MODULE_PARM_DESC(ser, "Set the serial port for the synthesizer (0-based).");
 MODULE_PARM_DESC(start, "Start the synthesizer once it is loaded.");
diff --git a/drivers/staging/speakup/speakup_apollo.c b/drivers/staging/speakup/speakup_apollo.c
index 3cbc8a7ad1ef..63efa6180346 100644
--- a/drivers/staging/speakup/speakup_apollo.c
+++ b/drivers/staging/speakup/speakup_apollo.c
@@ -49,30 +49,30 @@ static struct var_t vars[] = {
  * These attributes will appear in /sys/accessibility/speakup/apollo.
  */
 static struct kobj_attribute caps_start_attribute =
-	__ATTR(caps_start, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(caps_start, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute caps_stop_attribute =
-	__ATTR(caps_stop, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(caps_stop, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute lang_attribute =
-	__ATTR(lang, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(lang, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute pitch_attribute =
-	__ATTR(pitch, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(pitch, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute rate_attribute =
-	__ATTR(rate, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(rate, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute voice_attribute =
-	__ATTR(voice, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(voice, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute vol_attribute =
-	__ATTR(vol, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(vol, 0644, spk_var_show, spk_var_store);
 
 static struct kobj_attribute delay_time_attribute =
-	__ATTR(delay_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(delay_time, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute direct_attribute =
-	__ATTR(direct, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(direct, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute full_time_attribute =
-	__ATTR(full_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(full_time, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute jiffy_delta_attribute =
-	__ATTR(jiffy_delta, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(jiffy_delta, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute trigger_time_attribute =
-	__ATTR(trigger_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(trigger_time, 0644, spk_var_show, spk_var_store);
 
 /*
  * Create a group of attributes so that we can create and destroy them all
@@ -197,8 +197,8 @@ static void do_catch_up(struct spk_synth *synth)
 	spk_serial_out(PROCSPEECH);
 }
 
-module_param_named(ser, synth_apollo.ser, int, S_IRUGO);
-module_param_named(start, synth_apollo.startup, short, S_IRUGO);
+module_param_named(ser, synth_apollo.ser, int, 0444);
+module_param_named(start, synth_apollo.startup, short, 0444);
 
 MODULE_PARM_DESC(ser, "Set the serial port for the synthesizer (0-based).");
 MODULE_PARM_DESC(start, "Start the synthesizer once it is loaded.");
diff --git a/drivers/staging/speakup/speakup_audptr.c b/drivers/staging/speakup/speakup_audptr.c
index 7a12b8408b67..e696b87bf515 100644
--- a/drivers/staging/speakup/speakup_audptr.c
+++ b/drivers/staging/speakup/speakup_audptr.c
@@ -45,30 +45,30 @@ static struct var_t vars[] = {
  * These attributes will appear in /sys/accessibility/speakup/audptr.
  */
 static struct kobj_attribute caps_start_attribute =
-	__ATTR(caps_start, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(caps_start, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute caps_stop_attribute =
-	__ATTR(caps_stop, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(caps_stop, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute pitch_attribute =
-	__ATTR(pitch, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(pitch, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute punct_attribute =
-	__ATTR(punct, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(punct, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute rate_attribute =
-	__ATTR(rate, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(rate, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute tone_attribute =
-	__ATTR(tone, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(tone, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute vol_attribute =
-	__ATTR(vol, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(vol, 0644, spk_var_show, spk_var_store);
 
 static struct kobj_attribute delay_time_attribute =
-	__ATTR(delay_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(delay_time, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute direct_attribute =
-	__ATTR(direct, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(direct, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute full_time_attribute =
-	__ATTR(full_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(full_time, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute jiffy_delta_attribute =
-	__ATTR(jiffy_delta, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(jiffy_delta, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute trigger_time_attribute =
-	__ATTR(trigger_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(trigger_time, 0644, spk_var_show, spk_var_store);
 
 /*
  * Create a group of attributes so that we can create and destroy them all
@@ -167,8 +167,8 @@ static int synth_probe(struct spk_synth *synth)
 	return 0;
 }
 
-module_param_named(ser, synth_audptr.ser, int, S_IRUGO);
-module_param_named(start, synth_audptr.startup, short, S_IRUGO);
+module_param_named(ser, synth_audptr.ser, int, 0444);
+module_param_named(start, synth_audptr.startup, short, 0444);
 
 MODULE_PARM_DESC(ser, "Set the serial port for the synthesizer (0-based).");
 MODULE_PARM_DESC(start, "Start the synthesizer once it is loaded.");
diff --git a/drivers/staging/speakup/speakup_bns.c b/drivers/staging/speakup/speakup_bns.c
index 570f0c21745e..208e0bdea119 100644
--- a/drivers/staging/speakup/speakup_bns.c
+++ b/drivers/staging/speakup/speakup_bns.c
@@ -40,28 +40,28 @@ static struct var_t vars[] = {
  * These attributes will appear in /sys/accessibility/speakup/bns.
  */
 static struct kobj_attribute caps_start_attribute =
-	__ATTR(caps_start, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(caps_start, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute caps_stop_attribute =
-	__ATTR(caps_stop, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(caps_stop, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute pitch_attribute =
-	__ATTR(pitch, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(pitch, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute rate_attribute =
-	__ATTR(rate, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(rate, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute tone_attribute =
-	__ATTR(tone, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(tone, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute vol_attribute =
-	__ATTR(vol, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(vol, 0644, spk_var_show, spk_var_store);
 
 static struct kobj_attribute delay_time_attribute =
-	__ATTR(delay_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(delay_time, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute direct_attribute =
-	__ATTR(direct, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(direct, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute full_time_attribute =
-	__ATTR(full_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(full_time, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute jiffy_delta_attribute =
-	__ATTR(jiffy_delta, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(jiffy_delta, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute trigger_time_attribute =
-	__ATTR(trigger_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(trigger_time, 0644, spk_var_show, spk_var_store);
 
 /*
  * Create a group of attributes so that we can create and destroy them all
@@ -117,8 +117,8 @@ static struct spk_synth synth_bns = {
 	},
 };
 
-module_param_named(ser, synth_bns.ser, int, S_IRUGO);
-module_param_named(start, synth_bns.startup, short, S_IRUGO);
+module_param_named(ser, synth_bns.ser, int, 0444);
+module_param_named(start, synth_bns.startup, short, 0444);
 
 MODULE_PARM_DESC(ser, "Set the serial port for the synthesizer (0-based).");
 MODULE_PARM_DESC(start, "Start the synthesizer once it is loaded.");
diff --git a/drivers/staging/speakup/speakup_decext.c b/drivers/staging/speakup/speakup_decext.c
index 1a5cf3d0a559..28796a27b304 100644
--- a/drivers/staging/speakup/speakup_decext.c
+++ b/drivers/staging/speakup/speakup_decext.c
@@ -67,30 +67,30 @@ static struct var_t vars[] = {
  * These attributes will appear in /sys/accessibility/speakup/decext.
  */
 static struct kobj_attribute caps_start_attribute =
-	__ATTR(caps_start, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(caps_start, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute caps_stop_attribute =
-	__ATTR(caps_stop, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(caps_stop, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute pitch_attribute =
-	__ATTR(pitch, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(pitch, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute punct_attribute =
-	__ATTR(punct, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(punct, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute rate_attribute =
-	__ATTR(rate, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(rate, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute voice_attribute =
-	__ATTR(voice, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(voice, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute vol_attribute =
-	__ATTR(vol, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(vol, 0644, spk_var_show, spk_var_store);
 
 static struct kobj_attribute delay_time_attribute =
-	__ATTR(delay_time, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(delay_time, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute direct_attribute =
-	__ATTR(direct, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(direct, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute full_time_attribute =
-	__ATTR(full_time, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(full_time, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute jiffy_delta_attribute =
-	__ATTR(jiffy_delta, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(jiffy_delta, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute trigger_time_attribute =
-	__ATTR(trigger_time, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(trigger_time, 0644, spk_var_show, spk_var_store);
 
 /*
  * Create a group of attributes so that we can create and destroy them all
@@ -226,8 +226,8 @@ static void synth_flush(struct spk_synth *synth)
 	spk_synth_immediate(synth, "\033P;10z\033\\");
 }
 
-module_param_named(ser, synth_decext.ser, int, S_IRUGO);
-module_param_named(start, synth_decext.startup, short, S_IRUGO);
+module_param_named(ser, synth_decext.ser, int, 0444);
+module_param_named(start, synth_decext.startup, short, 0444);
 
 MODULE_PARM_DESC(ser, "Set the serial port for the synthesizer (0-based).");
 MODULE_PARM_DESC(start, "Start the synthesizer once it is loaded.");
diff --git a/drivers/staging/speakup/speakup_decpc.c b/drivers/staging/speakup/speakup_decpc.c
index d6479bd2163b..ac299a399e45 100644
--- a/drivers/staging/speakup/speakup_decpc.c
+++ b/drivers/staging/speakup/speakup_decpc.c
@@ -161,30 +161,30 @@ static struct var_t vars[] = {
  * These attributes will appear in /sys/accessibility/speakup/decpc.
  */
 static struct kobj_attribute caps_start_attribute =
-	__ATTR(caps_start, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(caps_start, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute caps_stop_attribute =
-	__ATTR(caps_stop, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(caps_stop, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute pitch_attribute =
-	__ATTR(pitch, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(pitch, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute punct_attribute =
-	__ATTR(punct, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(punct, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute rate_attribute =
-	__ATTR(rate, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(rate, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute voice_attribute =
-	__ATTR(voice, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(voice, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute vol_attribute =
-	__ATTR(vol, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(vol, 0644, spk_var_show, spk_var_store);
 
 static struct kobj_attribute delay_time_attribute =
-	__ATTR(delay_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(delay_time, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute direct_attribute =
-	__ATTR(direct, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(direct, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute full_time_attribute =
-	__ATTR(full_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(full_time, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute jiffy_delta_attribute =
-	__ATTR(jiffy_delta, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(jiffy_delta, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute trigger_time_attribute =
-	__ATTR(trigger_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(trigger_time, 0644, spk_var_show, spk_var_store);
 
 /*
  * Create a group of attributes so that we can create and destroy them all
@@ -486,7 +486,7 @@ static void dtpc_release(void)
 	speakup_info.port_tts = 0;
 }
 
-module_param_named(start, synth_dec_pc.startup, short, S_IRUGO);
+module_param_named(start, synth_dec_pc.startup, short, 0444);
 
 MODULE_PARM_DESC(start, "Start the synthesizer once it is loaded.");
 
diff --git a/drivers/staging/speakup/speakup_dectlk.c b/drivers/staging/speakup/speakup_dectlk.c
index 764656759fbf..26036050cdb2 100644
--- a/drivers/staging/speakup/speakup_dectlk.c
+++ b/drivers/staging/speakup/speakup_dectlk.c
@@ -66,30 +66,30 @@ static struct var_t vars[] = {
  * These attributes will appear in /sys/accessibility/speakup/dectlk.
  */
 static struct kobj_attribute caps_start_attribute =
-	__ATTR(caps_start, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(caps_start, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute caps_stop_attribute =
-	__ATTR(caps_stop, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(caps_stop, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute pitch_attribute =
-	__ATTR(pitch, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(pitch, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute punct_attribute =
-	__ATTR(punct, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(punct, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute rate_attribute =
-	__ATTR(rate, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(rate, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute voice_attribute =
-	__ATTR(voice, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(voice, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute vol_attribute =
-	__ATTR(vol, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(vol, 0644, spk_var_show, spk_var_store);
 
 static struct kobj_attribute delay_time_attribute =
-	__ATTR(delay_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(delay_time, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute direct_attribute =
-	__ATTR(direct, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(direct, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute full_time_attribute =
-	__ATTR(full_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(full_time, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute jiffy_delta_attribute =
-	__ATTR(jiffy_delta, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(jiffy_delta, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute trigger_time_attribute =
-	__ATTR(trigger_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(trigger_time, 0644, spk_var_show, spk_var_store);
 
 /*
  * Create a group of attributes so that we can create and destroy them all
@@ -295,8 +295,8 @@ static void synth_flush(struct spk_synth *synth)
 	spk_serial_out(SYNTH_CLEAR);
 }
 
-module_param_named(ser, synth_dectlk.ser, int, S_IRUGO);
-module_param_named(start, synth_dectlk.startup, short, S_IRUGO);
+module_param_named(ser, synth_dectlk.ser, int, 0444);
+module_param_named(start, synth_dectlk.startup, short, 0444);
 
 MODULE_PARM_DESC(ser, "Set the serial port for the synthesizer (0-based).");
 MODULE_PARM_DESC(start, "Start the synthesizer once it is loaded.");
diff --git a/drivers/staging/speakup/speakup_dtlk.c b/drivers/staging/speakup/speakup_dtlk.c
index 38aa4013bf62..7516e2eda348 100644
--- a/drivers/staging/speakup/speakup_dtlk.c
+++ b/drivers/staging/speakup/speakup_dtlk.c
@@ -63,34 +63,34 @@ static struct var_t vars[] = {
  * These attributes will appear in /sys/accessibility/speakup/dtlk.
  */
 static struct kobj_attribute caps_start_attribute =
-	__ATTR(caps_start, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(caps_start, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute caps_stop_attribute =
-	__ATTR(caps_stop, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(caps_stop, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute freq_attribute =
-	__ATTR(freq, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(freq, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute pitch_attribute =
-	__ATTR(pitch, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(pitch, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute punct_attribute =
-	__ATTR(punct, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(punct, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute rate_attribute =
-	__ATTR(rate, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(rate, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute tone_attribute =
-	__ATTR(tone, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(tone, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute voice_attribute =
-	__ATTR(voice, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(voice, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute vol_attribute =
-	__ATTR(vol, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(vol, 0644, spk_var_show, spk_var_store);
 
 static struct kobj_attribute delay_time_attribute =
-	__ATTR(delay_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(delay_time, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute direct_attribute =
-	__ATTR(direct, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(direct, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute full_time_attribute =
-	__ATTR(full_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(full_time, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute jiffy_delta_attribute =
-	__ATTR(jiffy_delta, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(jiffy_delta, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute trigger_time_attribute =
-	__ATTR(trigger_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(trigger_time, 0644, spk_var_show, spk_var_store);
 
 /*
  * Create a group of attributes so that we can create and destroy them all
@@ -378,8 +378,8 @@ static void dtlk_release(void)
 	speakup_info.port_tts = 0;
 }
 
-module_param_named(port, port_forced, int, S_IRUGO);
-module_param_named(start, synth_dtlk.startup, short, S_IRUGO);
+module_param_named(port, port_forced, int, 0444);
+module_param_named(start, synth_dtlk.startup, short, 0444);
 
 MODULE_PARM_DESC(port, "Set the port for the synthesizer (override probing).");
 MODULE_PARM_DESC(start, "Start the synthesizer once it is loaded.");
diff --git a/drivers/staging/speakup/speakup_dummy.c b/drivers/staging/speakup/speakup_dummy.c
index 87d2a8002b47..cb7cef30c124 100644
--- a/drivers/staging/speakup/speakup_dummy.c
+++ b/drivers/staging/speakup/speakup_dummy.c
@@ -42,28 +42,28 @@ static struct var_t vars[] = {
  * These attributes will appear in /sys/accessibility/speakup/dummy.
  */
 static struct kobj_attribute caps_start_attribute =
-	__ATTR(caps_start, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(caps_start, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute caps_stop_attribute =
-	__ATTR(caps_stop, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(caps_stop, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute pitch_attribute =
-	__ATTR(pitch, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(pitch, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute rate_attribute =
-	__ATTR(rate, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(rate, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute tone_attribute =
-	__ATTR(tone, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(tone, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute vol_attribute =
-	__ATTR(vol, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(vol, 0644, spk_var_show, spk_var_store);
 
 static struct kobj_attribute delay_time_attribute =
-	__ATTR(delay_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(delay_time, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute direct_attribute =
-	__ATTR(direct, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(direct, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute full_time_attribute =
-	__ATTR(full_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(full_time, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute jiffy_delta_attribute =
-	__ATTR(jiffy_delta, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(jiffy_delta, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute trigger_time_attribute =
-	__ATTR(trigger_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(trigger_time, 0644, spk_var_show, spk_var_store);
 
 /*
  * Create a group of attributes so that we can create and destroy them all
@@ -119,8 +119,8 @@ static struct spk_synth synth_dummy = {
 	},
 };
 
-module_param_named(ser, synth_dummy.ser, int, S_IRUGO);
-module_param_named(start, synth_dummy.startup, short, S_IRUGO);
+module_param_named(ser, synth_dummy.ser, int, 0444);
+module_param_named(start, synth_dummy.startup, short, 0444);
 
 MODULE_PARM_DESC(ser, "Set the serial port for the synthesizer (0-based).");
 MODULE_PARM_DESC(start, "Start the synthesizer once it is loaded.");
diff --git a/drivers/staging/speakup/speakup_keypc.c b/drivers/staging/speakup/speakup_keypc.c
index 5e2170bf4a8b..10f4964782e2 100644
--- a/drivers/staging/speakup/speakup_keypc.c
+++ b/drivers/staging/speakup/speakup_keypc.c
@@ -55,24 +55,24 @@ static struct var_t vars[] = {
  * These attributes will appear in /sys/accessibility/speakup/keypc.
  */
 static struct kobj_attribute caps_start_attribute =
-	__ATTR(caps_start, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(caps_start, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute caps_stop_attribute =
-	__ATTR(caps_stop, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(caps_stop, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute pitch_attribute =
-	__ATTR(pitch, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(pitch, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute rate_attribute =
-	__ATTR(rate, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(rate, 0644, spk_var_show, spk_var_store);
 
 static struct kobj_attribute delay_time_attribute =
-	__ATTR(delay_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(delay_time, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute direct_attribute =
-	__ATTR(direct, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(direct, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute full_time_attribute =
-	__ATTR(full_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(full_time, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute jiffy_delta_attribute =
-	__ATTR(jiffy_delta, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(jiffy_delta, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute trigger_time_attribute =
-	__ATTR(trigger_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(trigger_time, 0644, spk_var_show, spk_var_store);
 
 /*
  * Create a group of attributes so that we can create and destroy them all
@@ -309,8 +309,8 @@ static void keynote_release(void)
 	synth_port = 0;
 }
 
-module_param_named(port, port_forced, int, S_IRUGO);
-module_param_named(start, synth_keypc.startup, short, S_IRUGO);
+module_param_named(port, port_forced, int, 0444);
+module_param_named(start, synth_keypc.startup, short, 0444);
 
 MODULE_PARM_DESC(port, "Set the port for the synthesizer (override probing).");
 MODULE_PARM_DESC(start, "Start the synthesizer once it is loaded.");
diff --git a/drivers/staging/speakup/speakup_ltlk.c b/drivers/staging/speakup/speakup_ltlk.c
index b474e8b65f9a..b014aa1fcadd 100644
--- a/drivers/staging/speakup/speakup_ltlk.c
+++ b/drivers/staging/speakup/speakup_ltlk.c
@@ -46,34 +46,34 @@ static struct var_t vars[] = {
  * These attributes will appear in /sys/accessibility/speakup/ltlk.
  */
 static struct kobj_attribute caps_start_attribute =
-	__ATTR(caps_start, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(caps_start, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute caps_stop_attribute =
-	__ATTR(caps_stop, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(caps_stop, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute freq_attribute =
-	__ATTR(freq, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(freq, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute pitch_attribute =
-	__ATTR(pitch, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(pitch, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute punct_attribute =
-	__ATTR(punct, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(punct, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute rate_attribute =
-	__ATTR(rate, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(rate, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute tone_attribute =
-	__ATTR(tone, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(tone, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute voice_attribute =
-	__ATTR(voice, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(voice, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute vol_attribute =
-	__ATTR(vol, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(vol, 0644, spk_var_show, spk_var_store);
 
 static struct kobj_attribute delay_time_attribute =
-	__ATTR(delay_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(delay_time, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute direct_attribute =
-	__ATTR(direct, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(direct, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute full_time_attribute =
-	__ATTR(full_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(full_time, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute jiffy_delta_attribute =
-	__ATTR(jiffy_delta, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(jiffy_delta, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute trigger_time_attribute =
-	__ATTR(trigger_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(trigger_time, 0644, spk_var_show, spk_var_store);
 
 /*
  * Create a group of attributes so that we can create and destroy them all
@@ -165,8 +165,8 @@ static int synth_probe(struct spk_synth *synth)
 	return failed;
 }
 
-module_param_named(ser, synth_ltlk.ser, int, S_IRUGO);
-module_param_named(start, synth_ltlk.startup, short, S_IRUGO);
+module_param_named(ser, synth_ltlk.ser, int, 0444);
+module_param_named(start, synth_ltlk.startup, short, 0444);
 
 MODULE_PARM_DESC(ser, "Set the serial port for the synthesizer (0-based).");
 MODULE_PARM_DESC(start, "Start the synthesizer once it is loaded.");
diff --git a/drivers/staging/speakup/speakup_soft.c b/drivers/staging/speakup/speakup_soft.c
index ed3e4282f41c..ff68a384f9c2 100644
--- a/drivers/staging/speakup/speakup_soft.c
+++ b/drivers/staging/speakup/speakup_soft.c
@@ -58,41 +58,41 @@ static struct var_t vars[] = {
 /* These attributes will appear in /sys/accessibility/speakup/soft. */
 
 static struct kobj_attribute caps_start_attribute =
-	__ATTR(caps_start, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(caps_start, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute caps_stop_attribute =
-	__ATTR(caps_stop, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(caps_stop, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute freq_attribute =
-	__ATTR(freq, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(freq, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute pitch_attribute =
-	__ATTR(pitch, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(pitch, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute punct_attribute =
-	__ATTR(punct, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(punct, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute rate_attribute =
-	__ATTR(rate, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(rate, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute tone_attribute =
-	__ATTR(tone, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(tone, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute voice_attribute =
-	__ATTR(voice, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(voice, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute vol_attribute =
-	__ATTR(vol, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(vol, 0644, spk_var_show, spk_var_store);
 
 /*
  * We should uncomment the following definition, when we agree on a
  * method of passing a language designation to the software synthesizer.
  * static struct kobj_attribute lang_attribute =
- *	__ATTR(lang, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
+ *	__ATTR(lang, 0644, spk_var_show, spk_var_store);
  */
 
 static struct kobj_attribute delay_time_attribute =
-	__ATTR(delay_time, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(delay_time, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute direct_attribute =
-	__ATTR(direct, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(direct, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute full_time_attribute =
-	__ATTR(full_time, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(full_time, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute jiffy_delta_attribute =
-	__ATTR(jiffy_delta, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(jiffy_delta, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute trigger_time_attribute =
-	__ATTR(trigger_time, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(trigger_time, 0644, spk_var_show, spk_var_store);
 
 /*
  * Create a group of attributes so that we can create and destroy them all
@@ -340,7 +340,7 @@ static int softsynth_is_alive(struct spk_synth *synth)
 	return 0;
 }
 
-module_param_named(start, synth_soft.startup, short, S_IRUGO);
+module_param_named(start, synth_soft.startup, short, 0444);
 
 MODULE_PARM_DESC(start, "Start the synthesizer once it is loaded.");
 
diff --git a/drivers/staging/speakup/speakup_spkout.c b/drivers/staging/speakup/speakup_spkout.c
index 586890908826..143fadabfe6c 100644
--- a/drivers/staging/speakup/speakup_spkout.c
+++ b/drivers/staging/speakup/speakup_spkout.c
@@ -43,30 +43,30 @@ static struct var_t vars[] = {
 /* These attributes will appear in /sys/accessibility/speakup/spkout. */
 
 static struct kobj_attribute caps_start_attribute =
-	__ATTR(caps_start, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(caps_start, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute caps_stop_attribute =
-	__ATTR(caps_stop, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(caps_stop, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute pitch_attribute =
-	__ATTR(pitch, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(pitch, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute punct_attribute =
-	__ATTR(punct, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(punct, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute rate_attribute =
-	__ATTR(rate, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(rate, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute tone_attribute =
-	__ATTR(tone, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(tone, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute vol_attribute =
-	__ATTR(vol, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(vol, 0644, spk_var_show, spk_var_store);
 
 static struct kobj_attribute delay_time_attribute =
-	__ATTR(delay_time, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(delay_time, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute direct_attribute =
-	__ATTR(direct, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(direct, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute full_time_attribute =
-	__ATTR(full_time, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(full_time, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute jiffy_delta_attribute =
-	__ATTR(jiffy_delta, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(jiffy_delta, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute trigger_time_attribute =
-	__ATTR(trigger_time, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(trigger_time, 0644, spk_var_show, spk_var_store);
 
 /*
  * Create a group of attributes so that we can create and destroy them all
@@ -135,8 +135,8 @@ static void synth_flush(struct spk_synth *synth)
 	outb(SYNTH_CLEAR, speakup_info.port_tts);
 }
 
-module_param_named(ser, synth_spkout.ser, int, S_IRUGO);
-module_param_named(start, synth_spkout.startup, short, S_IRUGO);
+module_param_named(ser, synth_spkout.ser, int, 0444);
+module_param_named(start, synth_spkout.startup, short, 0444);
 
 MODULE_PARM_DESC(ser, "Set the serial port for the synthesizer (0-based).");
 MODULE_PARM_DESC(start, "Start the synthesizer once it is loaded.");
diff --git a/drivers/staging/speakup/speakup_txprt.c b/drivers/staging/speakup/speakup_txprt.c
index b3d2cfd20ac8..aa2f338d15d8 100644
--- a/drivers/staging/speakup/speakup_txprt.c
+++ b/drivers/staging/speakup/speakup_txprt.c
@@ -39,28 +39,28 @@ static struct var_t vars[] = {
 /* These attributes will appear in /sys/accessibility/speakup/txprt. */
 
 static struct kobj_attribute caps_start_attribute =
-	__ATTR(caps_start, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(caps_start, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute caps_stop_attribute =
-	__ATTR(caps_stop, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(caps_stop, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute pitch_attribute =
-	__ATTR(pitch, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(pitch, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute rate_attribute =
-	__ATTR(rate, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(rate, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute tone_attribute =
-	__ATTR(tone, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(tone, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute vol_attribute =
-	__ATTR(vol, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(vol, 0644, spk_var_show, spk_var_store);
 
 static struct kobj_attribute delay_time_attribute =
-	__ATTR(delay_time, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(delay_time, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute direct_attribute =
-	__ATTR(direct, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(direct, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute full_time_attribute =
-	__ATTR(full_time, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(full_time, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute jiffy_delta_attribute =
-	__ATTR(jiffy_delta, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(jiffy_delta, 0644, spk_var_show, spk_var_store);
 static struct kobj_attribute trigger_time_attribute =
-	__ATTR(trigger_time, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
+	__ATTR(trigger_time, 0644, spk_var_show, spk_var_store);
 
 /*
  * Create a group of attributes so that we can create and destroy them all
@@ -116,8 +116,8 @@ static struct spk_synth synth_txprt = {
 	},
 };
 
-module_param_named(ser, synth_txprt.ser, int, S_IRUGO);
-module_param_named(start, synth_txprt.startup, short, S_IRUGO);
+module_param_named(ser, synth_txprt.ser, int, 0444);
+module_param_named(start, synth_txprt.startup, short, 0444);
 
 MODULE_PARM_DESC(ser, "Set the serial port for the synthesizer (0-based).");
 MODULE_PARM_DESC(start, "Start the synthesizer once it is loaded.");
-- 
2.11.0

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

* Re: [PATCH] Staging: speakup - syle fix permissions to octal
  2017-01-28  6:05 [PATCH] Staging: speakup - syle fix permissions to octal Derek Robson
@ 2017-01-28  6:14 ` Joe Perches
  2017-02-04  4:44 ` Guenter Roeck
  1 sibling, 0 replies; 12+ messages in thread
From: Joe Perches @ 2017-01-28  6:14 UTC (permalink / raw)
  To: Derek Robson, w.d.hubbs, chris, kirk, samuel.thibault, gregkh,
	shraddha.6596, alan, shiva, amitoj1606, amsfield22, bhumirks,
	waltfeasel
  Cc: speakup, devel, linux-kernel

On Sat, 2017-01-28 at 19:05 +1300, Derek Robson wrote:
> A style fix across whole driver.
> changed permissions to octal style, found using checkpatch
[]
> diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c
[]
> @@ -58,8 +58,8 @@ MODULE_LICENSE("GPL");
>  MODULE_VERSION(SPEAKUP_VERSION);
>  
>  char *synth_name;
> -module_param_named(synth, synth_name, charp, S_IRUGO);
> -module_param_named(quiet, spk_quiet_boot, bool, S_IRUGO);
> +module_param_named(synth, synth_name, charp, 0444 );
> +module_param_named(quiet, spk_quiet_boot, bool, 0444 );

Please don't add spaces before the close parenthesis.

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

* Re: Staging: speakup - syle fix permissions to octal
  2017-01-28  6:05 [PATCH] Staging: speakup - syle fix permissions to octal Derek Robson
  2017-01-28  6:14 ` Joe Perches
@ 2017-02-04  4:44 ` Guenter Roeck
  2017-02-04  7:27   ` Joe Perches
  1 sibling, 1 reply; 12+ messages in thread
From: Guenter Roeck @ 2017-02-04  4:44 UTC (permalink / raw)
  To: Derek Robson
  Cc: w.d.hubbs, chris, kirk, samuel.thibault, gregkh, shraddha.6596,
	alan, shiva, amitoj1606, amsfield22, bhumirks, waltfeasel,
	speakup, devel, linux-kernel

On Sat, Jan 28, 2017 at 07:05:09PM +1300, Derek Robson wrote:
> A style fix across whole driver.
> changed permissions to octal style, found using checkpatch
> 
> Signed-off-by: Derek Robson <robsonde@gmail.com>

FWIW, I think changes like this are best done using coccinelle.
That ensures that the results can be reproduced and are well defined.
As it is, someone will have to check each line of your patches to ensure
that the conversion is correct.

It would also ensure (hopefully) that we don't end up with constructs
such as 

> -#define USER_R (S_IFREG|S_IRUGO)
> -#define USER_W (S_IFREG|S_IWUGO)
> +#define USER_R (S_IFREG|0444)
> +#define USER_W (S_IFREG|0666)

which really defeat the purpose of the whole exercise.

In this case, it seems to me that USER_R and USER_W should be dropped
entirely. Otherwise you might as well define USER_IRUGO and use it
instead of S_IRUGO to make checkpatch happy.

But wait ... those definitions are not even used. Hmm.

Guenter

> ---
>  drivers/staging/speakup/main.c           |  4 ++--
>  drivers/staging/speakup/speakup.h        |  4 ++--
>  drivers/staging/speakup/speakup_acntpc.c | 26 +++++++++++++-------------
>  drivers/staging/speakup/speakup_acntsa.c | 26 +++++++++++++-------------
>  drivers/staging/speakup/speakup_apollo.c | 28 ++++++++++++++--------------
>  drivers/staging/speakup/speakup_audptr.c | 28 ++++++++++++++--------------
>  drivers/staging/speakup/speakup_bns.c    | 26 +++++++++++++-------------
>  drivers/staging/speakup/speakup_decext.c | 28 ++++++++++++++--------------
>  drivers/staging/speakup/speakup_decpc.c  | 26 +++++++++++++-------------
>  drivers/staging/speakup/speakup_dectlk.c | 28 ++++++++++++++--------------
>  drivers/staging/speakup/speakup_dtlk.c   | 32 ++++++++++++++++----------------
>  drivers/staging/speakup/speakup_dummy.c  | 26 +++++++++++++-------------
>  drivers/staging/speakup/speakup_keypc.c  | 22 +++++++++++-----------
>  drivers/staging/speakup/speakup_ltlk.c   | 32 ++++++++++++++++----------------
>  drivers/staging/speakup/speakup_soft.c   | 32 ++++++++++++++++----------------
>  drivers/staging/speakup/speakup_spkout.c | 28 ++++++++++++++--------------
>  drivers/staging/speakup/speakup_txprt.c  | 26 +++++++++++++-------------
>  17 files changed, 211 insertions(+), 211 deletions(-)
> 
> diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c
> index 5c192042eeac..f7e555b30deb 100644
> --- a/drivers/staging/speakup/main.c
> +++ b/drivers/staging/speakup/main.c
> @@ -58,8 +58,8 @@ MODULE_LICENSE("GPL");
>  MODULE_VERSION(SPEAKUP_VERSION);
>  
>  char *synth_name;
> -module_param_named(synth, synth_name, charp, S_IRUGO);
> -module_param_named(quiet, spk_quiet_boot, bool, S_IRUGO);
> +module_param_named(synth, synth_name, charp, 0444 );
> +module_param_named(quiet, spk_quiet_boot, bool, 0444 );
>  
>  MODULE_PARM_DESC(synth, "Synth to start if speakup is built in.");
>  MODULE_PARM_DESC(quiet, "Do not announce when the synthesizer is found.");
> diff --git a/drivers/staging/speakup/speakup.h b/drivers/staging/speakup/speakup.h
> index df74c912da72..ee567aaf93a3 100644
> --- a/drivers/staging/speakup/speakup.h
> +++ b/drivers/staging/speakup/speakup.h
> @@ -10,8 +10,8 @@
>  #define MAX_DESC_LEN 72
>  
>  /* proc permissions */
> -#define USER_R (S_IFREG|S_IRUGO)
> -#define USER_W (S_IFREG|S_IWUGO)
> +#define USER_R (S_IFREG|0444)
> +#define USER_W (S_IFREG|0666)
>  
>  #define TOGGLE_0 .u.n = {NULL, 0, 0, 1, 0, 0, NULL }
>  #define TOGGLE_1 .u.n = {NULL, 1, 0, 1, 0, 0, NULL }
> diff --git a/drivers/staging/speakup/speakup_acntpc.c b/drivers/staging/speakup/speakup_acntpc.c
> index efb791bb642b..c7fab261d860 100644
> --- a/drivers/staging/speakup/speakup_acntpc.c
> +++ b/drivers/staging/speakup/speakup_acntpc.c
> @@ -57,28 +57,28 @@ static struct var_t vars[] = {
>   * These attributes will appear in /sys/accessibility/speakup/acntpc.
>   */
>  static struct kobj_attribute caps_start_attribute =
> -	__ATTR(caps_start, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(caps_start, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute caps_stop_attribute =
> -	__ATTR(caps_stop, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(caps_stop, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute pitch_attribute =
> -	__ATTR(pitch, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(pitch, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute rate_attribute =
> -	__ATTR(rate, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(rate, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute tone_attribute =
> -	__ATTR(tone, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(tone, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute vol_attribute =
> -	__ATTR(vol, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(vol, 0644, spk_var_show, spk_var_store);
>  
>  static struct kobj_attribute delay_time_attribute =
> -	__ATTR(delay_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(delay_time, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute direct_attribute =
> -	__ATTR(direct, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(direct, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute full_time_attribute =
> -	__ATTR(full_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(full_time, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute jiffy_delta_attribute =
> -	__ATTR(jiffy_delta, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(jiffy_delta, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute trigger_time_attribute =
> -	__ATTR(trigger_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(trigger_time, 0644, spk_var_show, spk_var_store);
>  
>  /*
>   * Create a group of attributes so that we can create and destroy them all
> @@ -307,8 +307,8 @@ static void accent_release(void)
>  	speakup_info.port_tts = 0;
>  }
>  
> -module_param_named(port, port_forced, int, S_IRUGO);
> -module_param_named(start, synth_acntpc.startup, short, S_IRUGO);
> +module_param_named(port, port_forced, int, 0444);
> +module_param_named(start, synth_acntpc.startup, short, 0444);
>  
>  MODULE_PARM_DESC(port, "Set the port for the synthesizer (override probing).");
>  MODULE_PARM_DESC(start, "Start the synthesizer once it is loaded.");
> diff --git a/drivers/staging/speakup/speakup_acntsa.c b/drivers/staging/speakup/speakup_acntsa.c
> index 34f45d3549b2..b4e49cdd2014 100644
> --- a/drivers/staging/speakup/speakup_acntsa.c
> +++ b/drivers/staging/speakup/speakup_acntsa.c
> @@ -43,28 +43,28 @@ static struct var_t vars[] = {
>   * These attributes will appear in /sys/accessibility/speakup/acntsa.
>   */
>  static struct kobj_attribute caps_start_attribute =
> -	__ATTR(caps_start, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(caps_start, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute caps_stop_attribute =
> -	__ATTR(caps_stop, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(caps_stop, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute pitch_attribute =
> -	__ATTR(pitch, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(pitch, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute rate_attribute =
> -	__ATTR(rate, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(rate, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute tone_attribute =
> -	__ATTR(tone, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(tone, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute vol_attribute =
> -	__ATTR(vol, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(vol, 0644, spk_var_show, spk_var_store);
>  
>  static struct kobj_attribute delay_time_attribute =
> -	__ATTR(delay_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(delay_time, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute direct_attribute =
> -	__ATTR(direct, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(direct, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute full_time_attribute =
> -	__ATTR(full_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(full_time, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute jiffy_delta_attribute =
> -	__ATTR(jiffy_delta, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(jiffy_delta, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute trigger_time_attribute =
> -	__ATTR(trigger_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(trigger_time, 0644, spk_var_show, spk_var_store);
>  
>  /*
>   * Create a group of attributes so that we can create and destroy them all
> @@ -133,8 +133,8 @@ static int synth_probe(struct spk_synth *synth)
>  	return failed;
>  }
>  
> -module_param_named(ser, synth_acntsa.ser, int, S_IRUGO);
> -module_param_named(start, synth_acntsa.startup, short, S_IRUGO);
> +module_param_named(ser, synth_acntsa.ser, int, 0444);
> +module_param_named(start, synth_acntsa.startup, short, 0444);
>  
>  MODULE_PARM_DESC(ser, "Set the serial port for the synthesizer (0-based).");
>  MODULE_PARM_DESC(start, "Start the synthesizer once it is loaded.");
> diff --git a/drivers/staging/speakup/speakup_apollo.c b/drivers/staging/speakup/speakup_apollo.c
> index 3cbc8a7ad1ef..63efa6180346 100644
> --- a/drivers/staging/speakup/speakup_apollo.c
> +++ b/drivers/staging/speakup/speakup_apollo.c
> @@ -49,30 +49,30 @@ static struct var_t vars[] = {
>   * These attributes will appear in /sys/accessibility/speakup/apollo.
>   */
>  static struct kobj_attribute caps_start_attribute =
> -	__ATTR(caps_start, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(caps_start, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute caps_stop_attribute =
> -	__ATTR(caps_stop, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(caps_stop, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute lang_attribute =
> -	__ATTR(lang, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(lang, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute pitch_attribute =
> -	__ATTR(pitch, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(pitch, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute rate_attribute =
> -	__ATTR(rate, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(rate, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute voice_attribute =
> -	__ATTR(voice, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(voice, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute vol_attribute =
> -	__ATTR(vol, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(vol, 0644, spk_var_show, spk_var_store);
>  
>  static struct kobj_attribute delay_time_attribute =
> -	__ATTR(delay_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(delay_time, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute direct_attribute =
> -	__ATTR(direct, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(direct, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute full_time_attribute =
> -	__ATTR(full_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(full_time, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute jiffy_delta_attribute =
> -	__ATTR(jiffy_delta, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(jiffy_delta, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute trigger_time_attribute =
> -	__ATTR(trigger_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(trigger_time, 0644, spk_var_show, spk_var_store);
>  
>  /*
>   * Create a group of attributes so that we can create and destroy them all
> @@ -197,8 +197,8 @@ static void do_catch_up(struct spk_synth *synth)
>  	spk_serial_out(PROCSPEECH);
>  }
>  
> -module_param_named(ser, synth_apollo.ser, int, S_IRUGO);
> -module_param_named(start, synth_apollo.startup, short, S_IRUGO);
> +module_param_named(ser, synth_apollo.ser, int, 0444);
> +module_param_named(start, synth_apollo.startup, short, 0444);
>  
>  MODULE_PARM_DESC(ser, "Set the serial port for the synthesizer (0-based).");
>  MODULE_PARM_DESC(start, "Start the synthesizer once it is loaded.");
> diff --git a/drivers/staging/speakup/speakup_audptr.c b/drivers/staging/speakup/speakup_audptr.c
> index 7a12b8408b67..e696b87bf515 100644
> --- a/drivers/staging/speakup/speakup_audptr.c
> +++ b/drivers/staging/speakup/speakup_audptr.c
> @@ -45,30 +45,30 @@ static struct var_t vars[] = {
>   * These attributes will appear in /sys/accessibility/speakup/audptr.
>   */
>  static struct kobj_attribute caps_start_attribute =
> -	__ATTR(caps_start, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(caps_start, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute caps_stop_attribute =
> -	__ATTR(caps_stop, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(caps_stop, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute pitch_attribute =
> -	__ATTR(pitch, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(pitch, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute punct_attribute =
> -	__ATTR(punct, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(punct, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute rate_attribute =
> -	__ATTR(rate, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(rate, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute tone_attribute =
> -	__ATTR(tone, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(tone, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute vol_attribute =
> -	__ATTR(vol, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(vol, 0644, spk_var_show, spk_var_store);
>  
>  static struct kobj_attribute delay_time_attribute =
> -	__ATTR(delay_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(delay_time, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute direct_attribute =
> -	__ATTR(direct, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(direct, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute full_time_attribute =
> -	__ATTR(full_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(full_time, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute jiffy_delta_attribute =
> -	__ATTR(jiffy_delta, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(jiffy_delta, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute trigger_time_attribute =
> -	__ATTR(trigger_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(trigger_time, 0644, spk_var_show, spk_var_store);
>  
>  /*
>   * Create a group of attributes so that we can create and destroy them all
> @@ -167,8 +167,8 @@ static int synth_probe(struct spk_synth *synth)
>  	return 0;
>  }
>  
> -module_param_named(ser, synth_audptr.ser, int, S_IRUGO);
> -module_param_named(start, synth_audptr.startup, short, S_IRUGO);
> +module_param_named(ser, synth_audptr.ser, int, 0444);
> +module_param_named(start, synth_audptr.startup, short, 0444);
>  
>  MODULE_PARM_DESC(ser, "Set the serial port for the synthesizer (0-based).");
>  MODULE_PARM_DESC(start, "Start the synthesizer once it is loaded.");
> diff --git a/drivers/staging/speakup/speakup_bns.c b/drivers/staging/speakup/speakup_bns.c
> index 570f0c21745e..208e0bdea119 100644
> --- a/drivers/staging/speakup/speakup_bns.c
> +++ b/drivers/staging/speakup/speakup_bns.c
> @@ -40,28 +40,28 @@ static struct var_t vars[] = {
>   * These attributes will appear in /sys/accessibility/speakup/bns.
>   */
>  static struct kobj_attribute caps_start_attribute =
> -	__ATTR(caps_start, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(caps_start, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute caps_stop_attribute =
> -	__ATTR(caps_stop, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(caps_stop, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute pitch_attribute =
> -	__ATTR(pitch, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(pitch, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute rate_attribute =
> -	__ATTR(rate, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(rate, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute tone_attribute =
> -	__ATTR(tone, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(tone, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute vol_attribute =
> -	__ATTR(vol, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(vol, 0644, spk_var_show, spk_var_store);
>  
>  static struct kobj_attribute delay_time_attribute =
> -	__ATTR(delay_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(delay_time, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute direct_attribute =
> -	__ATTR(direct, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(direct, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute full_time_attribute =
> -	__ATTR(full_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(full_time, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute jiffy_delta_attribute =
> -	__ATTR(jiffy_delta, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(jiffy_delta, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute trigger_time_attribute =
> -	__ATTR(trigger_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(trigger_time, 0644, spk_var_show, spk_var_store);
>  
>  /*
>   * Create a group of attributes so that we can create and destroy them all
> @@ -117,8 +117,8 @@ static struct spk_synth synth_bns = {
>  	},
>  };
>  
> -module_param_named(ser, synth_bns.ser, int, S_IRUGO);
> -module_param_named(start, synth_bns.startup, short, S_IRUGO);
> +module_param_named(ser, synth_bns.ser, int, 0444);
> +module_param_named(start, synth_bns.startup, short, 0444);
>  
>  MODULE_PARM_DESC(ser, "Set the serial port for the synthesizer (0-based).");
>  MODULE_PARM_DESC(start, "Start the synthesizer once it is loaded.");
> diff --git a/drivers/staging/speakup/speakup_decext.c b/drivers/staging/speakup/speakup_decext.c
> index 1a5cf3d0a559..28796a27b304 100644
> --- a/drivers/staging/speakup/speakup_decext.c
> +++ b/drivers/staging/speakup/speakup_decext.c
> @@ -67,30 +67,30 @@ static struct var_t vars[] = {
>   * These attributes will appear in /sys/accessibility/speakup/decext.
>   */
>  static struct kobj_attribute caps_start_attribute =
> -	__ATTR(caps_start, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(caps_start, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute caps_stop_attribute =
> -	__ATTR(caps_stop, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(caps_stop, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute pitch_attribute =
> -	__ATTR(pitch, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(pitch, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute punct_attribute =
> -	__ATTR(punct, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(punct, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute rate_attribute =
> -	__ATTR(rate, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(rate, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute voice_attribute =
> -	__ATTR(voice, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(voice, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute vol_attribute =
> -	__ATTR(vol, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(vol, 0644, spk_var_show, spk_var_store);
>  
>  static struct kobj_attribute delay_time_attribute =
> -	__ATTR(delay_time, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(delay_time, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute direct_attribute =
> -	__ATTR(direct, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(direct, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute full_time_attribute =
> -	__ATTR(full_time, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(full_time, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute jiffy_delta_attribute =
> -	__ATTR(jiffy_delta, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(jiffy_delta, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute trigger_time_attribute =
> -	__ATTR(trigger_time, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(trigger_time, 0644, spk_var_show, spk_var_store);
>  
>  /*
>   * Create a group of attributes so that we can create and destroy them all
> @@ -226,8 +226,8 @@ static void synth_flush(struct spk_synth *synth)
>  	spk_synth_immediate(synth, "\033P;10z\033\\");
>  }
>  
> -module_param_named(ser, synth_decext.ser, int, S_IRUGO);
> -module_param_named(start, synth_decext.startup, short, S_IRUGO);
> +module_param_named(ser, synth_decext.ser, int, 0444);
> +module_param_named(start, synth_decext.startup, short, 0444);
>  
>  MODULE_PARM_DESC(ser, "Set the serial port for the synthesizer (0-based).");
>  MODULE_PARM_DESC(start, "Start the synthesizer once it is loaded.");
> diff --git a/drivers/staging/speakup/speakup_decpc.c b/drivers/staging/speakup/speakup_decpc.c
> index d6479bd2163b..ac299a399e45 100644
> --- a/drivers/staging/speakup/speakup_decpc.c
> +++ b/drivers/staging/speakup/speakup_decpc.c
> @@ -161,30 +161,30 @@ static struct var_t vars[] = {
>   * These attributes will appear in /sys/accessibility/speakup/decpc.
>   */
>  static struct kobj_attribute caps_start_attribute =
> -	__ATTR(caps_start, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(caps_start, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute caps_stop_attribute =
> -	__ATTR(caps_stop, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(caps_stop, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute pitch_attribute =
> -	__ATTR(pitch, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(pitch, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute punct_attribute =
> -	__ATTR(punct, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(punct, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute rate_attribute =
> -	__ATTR(rate, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(rate, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute voice_attribute =
> -	__ATTR(voice, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(voice, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute vol_attribute =
> -	__ATTR(vol, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(vol, 0644, spk_var_show, spk_var_store);
>  
>  static struct kobj_attribute delay_time_attribute =
> -	__ATTR(delay_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(delay_time, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute direct_attribute =
> -	__ATTR(direct, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(direct, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute full_time_attribute =
> -	__ATTR(full_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(full_time, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute jiffy_delta_attribute =
> -	__ATTR(jiffy_delta, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(jiffy_delta, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute trigger_time_attribute =
> -	__ATTR(trigger_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(trigger_time, 0644, spk_var_show, spk_var_store);
>  
>  /*
>   * Create a group of attributes so that we can create and destroy them all
> @@ -486,7 +486,7 @@ static void dtpc_release(void)
>  	speakup_info.port_tts = 0;
>  }
>  
> -module_param_named(start, synth_dec_pc.startup, short, S_IRUGO);
> +module_param_named(start, synth_dec_pc.startup, short, 0444);
>  
>  MODULE_PARM_DESC(start, "Start the synthesizer once it is loaded.");
>  
> diff --git a/drivers/staging/speakup/speakup_dectlk.c b/drivers/staging/speakup/speakup_dectlk.c
> index 764656759fbf..26036050cdb2 100644
> --- a/drivers/staging/speakup/speakup_dectlk.c
> +++ b/drivers/staging/speakup/speakup_dectlk.c
> @@ -66,30 +66,30 @@ static struct var_t vars[] = {
>   * These attributes will appear in /sys/accessibility/speakup/dectlk.
>   */
>  static struct kobj_attribute caps_start_attribute =
> -	__ATTR(caps_start, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(caps_start, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute caps_stop_attribute =
> -	__ATTR(caps_stop, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(caps_stop, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute pitch_attribute =
> -	__ATTR(pitch, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(pitch, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute punct_attribute =
> -	__ATTR(punct, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(punct, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute rate_attribute =
> -	__ATTR(rate, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(rate, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute voice_attribute =
> -	__ATTR(voice, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(voice, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute vol_attribute =
> -	__ATTR(vol, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(vol, 0644, spk_var_show, spk_var_store);
>  
>  static struct kobj_attribute delay_time_attribute =
> -	__ATTR(delay_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(delay_time, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute direct_attribute =
> -	__ATTR(direct, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(direct, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute full_time_attribute =
> -	__ATTR(full_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(full_time, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute jiffy_delta_attribute =
> -	__ATTR(jiffy_delta, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(jiffy_delta, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute trigger_time_attribute =
> -	__ATTR(trigger_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(trigger_time, 0644, spk_var_show, spk_var_store);
>  
>  /*
>   * Create a group of attributes so that we can create and destroy them all
> @@ -295,8 +295,8 @@ static void synth_flush(struct spk_synth *synth)
>  	spk_serial_out(SYNTH_CLEAR);
>  }
>  
> -module_param_named(ser, synth_dectlk.ser, int, S_IRUGO);
> -module_param_named(start, synth_dectlk.startup, short, S_IRUGO);
> +module_param_named(ser, synth_dectlk.ser, int, 0444);
> +module_param_named(start, synth_dectlk.startup, short, 0444);
>  
>  MODULE_PARM_DESC(ser, "Set the serial port for the synthesizer (0-based).");
>  MODULE_PARM_DESC(start, "Start the synthesizer once it is loaded.");
> diff --git a/drivers/staging/speakup/speakup_dtlk.c b/drivers/staging/speakup/speakup_dtlk.c
> index 38aa4013bf62..7516e2eda348 100644
> --- a/drivers/staging/speakup/speakup_dtlk.c
> +++ b/drivers/staging/speakup/speakup_dtlk.c
> @@ -63,34 +63,34 @@ static struct var_t vars[] = {
>   * These attributes will appear in /sys/accessibility/speakup/dtlk.
>   */
>  static struct kobj_attribute caps_start_attribute =
> -	__ATTR(caps_start, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(caps_start, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute caps_stop_attribute =
> -	__ATTR(caps_stop, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(caps_stop, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute freq_attribute =
> -	__ATTR(freq, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(freq, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute pitch_attribute =
> -	__ATTR(pitch, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(pitch, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute punct_attribute =
> -	__ATTR(punct, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(punct, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute rate_attribute =
> -	__ATTR(rate, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(rate, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute tone_attribute =
> -	__ATTR(tone, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(tone, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute voice_attribute =
> -	__ATTR(voice, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(voice, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute vol_attribute =
> -	__ATTR(vol, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(vol, 0644, spk_var_show, spk_var_store);
>  
>  static struct kobj_attribute delay_time_attribute =
> -	__ATTR(delay_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(delay_time, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute direct_attribute =
> -	__ATTR(direct, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(direct, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute full_time_attribute =
> -	__ATTR(full_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(full_time, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute jiffy_delta_attribute =
> -	__ATTR(jiffy_delta, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(jiffy_delta, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute trigger_time_attribute =
> -	__ATTR(trigger_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(trigger_time, 0644, spk_var_show, spk_var_store);
>  
>  /*
>   * Create a group of attributes so that we can create and destroy them all
> @@ -378,8 +378,8 @@ static void dtlk_release(void)
>  	speakup_info.port_tts = 0;
>  }
>  
> -module_param_named(port, port_forced, int, S_IRUGO);
> -module_param_named(start, synth_dtlk.startup, short, S_IRUGO);
> +module_param_named(port, port_forced, int, 0444);
> +module_param_named(start, synth_dtlk.startup, short, 0444);
>  
>  MODULE_PARM_DESC(port, "Set the port for the synthesizer (override probing).");
>  MODULE_PARM_DESC(start, "Start the synthesizer once it is loaded.");
> diff --git a/drivers/staging/speakup/speakup_dummy.c b/drivers/staging/speakup/speakup_dummy.c
> index 87d2a8002b47..cb7cef30c124 100644
> --- a/drivers/staging/speakup/speakup_dummy.c
> +++ b/drivers/staging/speakup/speakup_dummy.c
> @@ -42,28 +42,28 @@ static struct var_t vars[] = {
>   * These attributes will appear in /sys/accessibility/speakup/dummy.
>   */
>  static struct kobj_attribute caps_start_attribute =
> -	__ATTR(caps_start, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(caps_start, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute caps_stop_attribute =
> -	__ATTR(caps_stop, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(caps_stop, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute pitch_attribute =
> -	__ATTR(pitch, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(pitch, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute rate_attribute =
> -	__ATTR(rate, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(rate, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute tone_attribute =
> -	__ATTR(tone, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(tone, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute vol_attribute =
> -	__ATTR(vol, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(vol, 0644, spk_var_show, spk_var_store);
>  
>  static struct kobj_attribute delay_time_attribute =
> -	__ATTR(delay_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(delay_time, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute direct_attribute =
> -	__ATTR(direct, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(direct, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute full_time_attribute =
> -	__ATTR(full_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(full_time, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute jiffy_delta_attribute =
> -	__ATTR(jiffy_delta, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(jiffy_delta, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute trigger_time_attribute =
> -	__ATTR(trigger_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(trigger_time, 0644, spk_var_show, spk_var_store);
>  
>  /*
>   * Create a group of attributes so that we can create and destroy them all
> @@ -119,8 +119,8 @@ static struct spk_synth synth_dummy = {
>  	},
>  };
>  
> -module_param_named(ser, synth_dummy.ser, int, S_IRUGO);
> -module_param_named(start, synth_dummy.startup, short, S_IRUGO);
> +module_param_named(ser, synth_dummy.ser, int, 0444);
> +module_param_named(start, synth_dummy.startup, short, 0444);
>  
>  MODULE_PARM_DESC(ser, "Set the serial port for the synthesizer (0-based).");
>  MODULE_PARM_DESC(start, "Start the synthesizer once it is loaded.");
> diff --git a/drivers/staging/speakup/speakup_keypc.c b/drivers/staging/speakup/speakup_keypc.c
> index 5e2170bf4a8b..10f4964782e2 100644
> --- a/drivers/staging/speakup/speakup_keypc.c
> +++ b/drivers/staging/speakup/speakup_keypc.c
> @@ -55,24 +55,24 @@ static struct var_t vars[] = {
>   * These attributes will appear in /sys/accessibility/speakup/keypc.
>   */
>  static struct kobj_attribute caps_start_attribute =
> -	__ATTR(caps_start, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(caps_start, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute caps_stop_attribute =
> -	__ATTR(caps_stop, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(caps_stop, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute pitch_attribute =
> -	__ATTR(pitch, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(pitch, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute rate_attribute =
> -	__ATTR(rate, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(rate, 0644, spk_var_show, spk_var_store);
>  
>  static struct kobj_attribute delay_time_attribute =
> -	__ATTR(delay_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(delay_time, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute direct_attribute =
> -	__ATTR(direct, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(direct, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute full_time_attribute =
> -	__ATTR(full_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(full_time, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute jiffy_delta_attribute =
> -	__ATTR(jiffy_delta, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(jiffy_delta, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute trigger_time_attribute =
> -	__ATTR(trigger_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(trigger_time, 0644, spk_var_show, spk_var_store);
>  
>  /*
>   * Create a group of attributes so that we can create and destroy them all
> @@ -309,8 +309,8 @@ static void keynote_release(void)
>  	synth_port = 0;
>  }
>  
> -module_param_named(port, port_forced, int, S_IRUGO);
> -module_param_named(start, synth_keypc.startup, short, S_IRUGO);
> +module_param_named(port, port_forced, int, 0444);
> +module_param_named(start, synth_keypc.startup, short, 0444);
>  
>  MODULE_PARM_DESC(port, "Set the port for the synthesizer (override probing).");
>  MODULE_PARM_DESC(start, "Start the synthesizer once it is loaded.");
> diff --git a/drivers/staging/speakup/speakup_ltlk.c b/drivers/staging/speakup/speakup_ltlk.c
> index b474e8b65f9a..b014aa1fcadd 100644
> --- a/drivers/staging/speakup/speakup_ltlk.c
> +++ b/drivers/staging/speakup/speakup_ltlk.c
> @@ -46,34 +46,34 @@ static struct var_t vars[] = {
>   * These attributes will appear in /sys/accessibility/speakup/ltlk.
>   */
>  static struct kobj_attribute caps_start_attribute =
> -	__ATTR(caps_start, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(caps_start, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute caps_stop_attribute =
> -	__ATTR(caps_stop, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(caps_stop, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute freq_attribute =
> -	__ATTR(freq, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(freq, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute pitch_attribute =
> -	__ATTR(pitch, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(pitch, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute punct_attribute =
> -	__ATTR(punct, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(punct, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute rate_attribute =
> -	__ATTR(rate, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(rate, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute tone_attribute =
> -	__ATTR(tone, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(tone, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute voice_attribute =
> -	__ATTR(voice, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(voice, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute vol_attribute =
> -	__ATTR(vol, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(vol, 0644, spk_var_show, spk_var_store);
>  
>  static struct kobj_attribute delay_time_attribute =
> -	__ATTR(delay_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(delay_time, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute direct_attribute =
> -	__ATTR(direct, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(direct, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute full_time_attribute =
> -	__ATTR(full_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(full_time, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute jiffy_delta_attribute =
> -	__ATTR(jiffy_delta, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(jiffy_delta, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute trigger_time_attribute =
> -	__ATTR(trigger_time, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(trigger_time, 0644, spk_var_show, spk_var_store);
>  
>  /*
>   * Create a group of attributes so that we can create and destroy them all
> @@ -165,8 +165,8 @@ static int synth_probe(struct spk_synth *synth)
>  	return failed;
>  }
>  
> -module_param_named(ser, synth_ltlk.ser, int, S_IRUGO);
> -module_param_named(start, synth_ltlk.startup, short, S_IRUGO);
> +module_param_named(ser, synth_ltlk.ser, int, 0444);
> +module_param_named(start, synth_ltlk.startup, short, 0444);
>  
>  MODULE_PARM_DESC(ser, "Set the serial port for the synthesizer (0-based).");
>  MODULE_PARM_DESC(start, "Start the synthesizer once it is loaded.");
> diff --git a/drivers/staging/speakup/speakup_soft.c b/drivers/staging/speakup/speakup_soft.c
> index ed3e4282f41c..ff68a384f9c2 100644
> --- a/drivers/staging/speakup/speakup_soft.c
> +++ b/drivers/staging/speakup/speakup_soft.c
> @@ -58,41 +58,41 @@ static struct var_t vars[] = {
>  /* These attributes will appear in /sys/accessibility/speakup/soft. */
>  
>  static struct kobj_attribute caps_start_attribute =
> -	__ATTR(caps_start, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(caps_start, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute caps_stop_attribute =
> -	__ATTR(caps_stop, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(caps_stop, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute freq_attribute =
> -	__ATTR(freq, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(freq, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute pitch_attribute =
> -	__ATTR(pitch, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(pitch, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute punct_attribute =
> -	__ATTR(punct, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(punct, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute rate_attribute =
> -	__ATTR(rate, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(rate, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute tone_attribute =
> -	__ATTR(tone, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(tone, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute voice_attribute =
> -	__ATTR(voice, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(voice, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute vol_attribute =
> -	__ATTR(vol, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(vol, 0644, spk_var_show, spk_var_store);
>  
>  /*
>   * We should uncomment the following definition, when we agree on a
>   * method of passing a language designation to the software synthesizer.
>   * static struct kobj_attribute lang_attribute =
> - *	__ATTR(lang, S_IWUSR|S_IRUGO, spk_var_show, spk_var_store);
> + *	__ATTR(lang, 0644, spk_var_show, spk_var_store);
>   */
>  
>  static struct kobj_attribute delay_time_attribute =
> -	__ATTR(delay_time, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(delay_time, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute direct_attribute =
> -	__ATTR(direct, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(direct, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute full_time_attribute =
> -	__ATTR(full_time, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(full_time, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute jiffy_delta_attribute =
> -	__ATTR(jiffy_delta, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(jiffy_delta, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute trigger_time_attribute =
> -	__ATTR(trigger_time, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(trigger_time, 0644, spk_var_show, spk_var_store);
>  
>  /*
>   * Create a group of attributes so that we can create and destroy them all
> @@ -340,7 +340,7 @@ static int softsynth_is_alive(struct spk_synth *synth)
>  	return 0;
>  }
>  
> -module_param_named(start, synth_soft.startup, short, S_IRUGO);
> +module_param_named(start, synth_soft.startup, short, 0444);
>  
>  MODULE_PARM_DESC(start, "Start the synthesizer once it is loaded.");
>  
> diff --git a/drivers/staging/speakup/speakup_spkout.c b/drivers/staging/speakup/speakup_spkout.c
> index 586890908826..143fadabfe6c 100644
> --- a/drivers/staging/speakup/speakup_spkout.c
> +++ b/drivers/staging/speakup/speakup_spkout.c
> @@ -43,30 +43,30 @@ static struct var_t vars[] = {
>  /* These attributes will appear in /sys/accessibility/speakup/spkout. */
>  
>  static struct kobj_attribute caps_start_attribute =
> -	__ATTR(caps_start, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(caps_start, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute caps_stop_attribute =
> -	__ATTR(caps_stop, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(caps_stop, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute pitch_attribute =
> -	__ATTR(pitch, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(pitch, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute punct_attribute =
> -	__ATTR(punct, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(punct, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute rate_attribute =
> -	__ATTR(rate, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(rate, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute tone_attribute =
> -	__ATTR(tone, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(tone, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute vol_attribute =
> -	__ATTR(vol, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(vol, 0644, spk_var_show, spk_var_store);
>  
>  static struct kobj_attribute delay_time_attribute =
> -	__ATTR(delay_time, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(delay_time, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute direct_attribute =
> -	__ATTR(direct, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(direct, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute full_time_attribute =
> -	__ATTR(full_time, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(full_time, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute jiffy_delta_attribute =
> -	__ATTR(jiffy_delta, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(jiffy_delta, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute trigger_time_attribute =
> -	__ATTR(trigger_time, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(trigger_time, 0644, spk_var_show, spk_var_store);
>  
>  /*
>   * Create a group of attributes so that we can create and destroy them all
> @@ -135,8 +135,8 @@ static void synth_flush(struct spk_synth *synth)
>  	outb(SYNTH_CLEAR, speakup_info.port_tts);
>  }
>  
> -module_param_named(ser, synth_spkout.ser, int, S_IRUGO);
> -module_param_named(start, synth_spkout.startup, short, S_IRUGO);
> +module_param_named(ser, synth_spkout.ser, int, 0444);
> +module_param_named(start, synth_spkout.startup, short, 0444);
>  
>  MODULE_PARM_DESC(ser, "Set the serial port for the synthesizer (0-based).");
>  MODULE_PARM_DESC(start, "Start the synthesizer once it is loaded.");
> diff --git a/drivers/staging/speakup/speakup_txprt.c b/drivers/staging/speakup/speakup_txprt.c
> index b3d2cfd20ac8..aa2f338d15d8 100644
> --- a/drivers/staging/speakup/speakup_txprt.c
> +++ b/drivers/staging/speakup/speakup_txprt.c
> @@ -39,28 +39,28 @@ static struct var_t vars[] = {
>  /* These attributes will appear in /sys/accessibility/speakup/txprt. */
>  
>  static struct kobj_attribute caps_start_attribute =
> -	__ATTR(caps_start, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(caps_start, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute caps_stop_attribute =
> -	__ATTR(caps_stop, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(caps_stop, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute pitch_attribute =
> -	__ATTR(pitch, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(pitch, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute rate_attribute =
> -	__ATTR(rate, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(rate, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute tone_attribute =
> -	__ATTR(tone, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(tone, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute vol_attribute =
> -	__ATTR(vol, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(vol, 0644, spk_var_show, spk_var_store);
>  
>  static struct kobj_attribute delay_time_attribute =
> -	__ATTR(delay_time, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(delay_time, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute direct_attribute =
> -	__ATTR(direct, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(direct, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute full_time_attribute =
> -	__ATTR(full_time, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(full_time, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute jiffy_delta_attribute =
> -	__ATTR(jiffy_delta, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(jiffy_delta, 0644, spk_var_show, spk_var_store);
>  static struct kobj_attribute trigger_time_attribute =
> -	__ATTR(trigger_time, S_IWUSR | S_IRUGO, spk_var_show, spk_var_store);
> +	__ATTR(trigger_time, 0644, spk_var_show, spk_var_store);
>  
>  /*
>   * Create a group of attributes so that we can create and destroy them all
> @@ -116,8 +116,8 @@ static struct spk_synth synth_txprt = {
>  	},
>  };
>  
> -module_param_named(ser, synth_txprt.ser, int, S_IRUGO);
> -module_param_named(start, synth_txprt.startup, short, S_IRUGO);
> +module_param_named(ser, synth_txprt.ser, int, 0444);
> +module_param_named(start, synth_txprt.startup, short, 0444);
>  
>  MODULE_PARM_DESC(ser, "Set the serial port for the synthesizer (0-based).");
>  MODULE_PARM_DESC(start, "Start the synthesizer once it is loaded.");

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

* Re: Staging: speakup - syle fix permissions to octal
  2017-02-04  4:44 ` Guenter Roeck
@ 2017-02-04  7:27   ` Joe Perches
  2017-02-04 14:22     ` Guenter Roeck
  2017-02-04 18:10     ` Julia Lawall
  0 siblings, 2 replies; 12+ messages in thread
From: Joe Perches @ 2017-02-04  7:27 UTC (permalink / raw)
  To: Guenter Roeck, Derek Robson, Julia Lawall
  Cc: w.d.hubbs, chris, kirk, samuel.thibault, gregkh, shraddha.6596,
	alan, shiva, amitoj1606, amsfield22, bhumirks, waltfeasel,
	speakup, devel, linux-kernel

(adding Julia Lawall)

On Fri, 2017-02-03 at 20:44 -0800, Guenter Roeck wrote:
> On Sat, Jan 28, 2017 at 07:05:09PM +1300, Derek Robson wrote:
> > A style fix across whole driver.
> > changed permissions to octal style, found using checkpatch
> > 
> > Signed-off-by: Derek Robson <robsonde@gmail.com>
> 
> FWIW, I think changes like this are best done using coccinelle.

I think checkpatch does it reasonably well.

Julia?  Can coccinelle do this?

I believe cocinelle doesn't handle the substitution
and octal addition very well when multiple flags
are used.

> That ensures that the results can be reproduced and are well defined.
> As it is, someone will have to check each line of your patches to ensure
> that the conversion is correct.
> 
> It would also ensure (hopefully) that we don't end up with constructs
> such as 
> 
> > -#define USER_R (S_IFREG|S_IRUGO)
> > -#define USER_W (S_IFREG|S_IWUGO)
> > +#define USER_R (S_IFREG|0444)
> > +#define USER_W (S_IFREG|0666)
> 
> which really defeat the purpose of the whole exercise.

Why do you think mixing file specific attributes
with octal permissions is a bad thing?

$ git log -1 f90774e1fd2700d
commit f90774e1fd2700de4a6e0d62866d34a26c544bd0
Author: Joe Perches <joe@perches.com>
Date:   Tue Oct 11 13:51:47 2016 -0700

    checkpatch: look for symbolic permissions and suggest octal instead
    
    S_<FOO> uses should be avoided where octal is more intelligible.
    
    Linus didst say:
    
    : It's *much* easier to parse and understand the octal numbers, while the
    : symbolic macro names are just random line noise and hard as hell to
    : understand.  You really have to think about it.
    :
    : So we should rather go the other way: convert existing bad symbolic
    : permission bit macro use to just use the octal numbers.
    :
    : The symbolic names are good for the *other* bits (ie sticky bit, and the
    : inode mode _type_ numbers etc), but for the permission bits, the symbolic
    : names are just insane crap.  Nobody sane should ever use them.  Not in the
    : kernel, not in user space.
    (http://lkml.kernel.org/r/CA+55aFw5v23T-zvDZp-MmD_EYxF8WbafwwB59934FV7g21uMGQ@mail.gmail.com)
    
    Link: http://lkml.kernel.org/r/7232ef011d05a92f4caa86a5e9830d87966a2eaf.1470180926.git.joe@perches.com
    Signed-off-by: Joe Perches <joe@perches.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

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

* Re: Staging: speakup - syle fix permissions to octal
  2017-02-04  7:27   ` Joe Perches
@ 2017-02-04 14:22     ` Guenter Roeck
  2017-02-04 14:29       ` Julia Lawall
  2017-02-04 18:10     ` Julia Lawall
  1 sibling, 1 reply; 12+ messages in thread
From: Guenter Roeck @ 2017-02-04 14:22 UTC (permalink / raw)
  To: Joe Perches, Derek Robson, Julia Lawall
  Cc: w.d.hubbs, chris, kirk, samuel.thibault, gregkh, shraddha.6596,
	alan, shiva, amitoj1606, amsfield22, bhumirks, waltfeasel,
	speakup, devel, linux-kernel

On 02/03/2017 11:27 PM, Joe Perches wrote:
> (adding Julia Lawall)
>
> On Fri, 2017-02-03 at 20:44 -0800, Guenter Roeck wrote:
>> On Sat, Jan 28, 2017 at 07:05:09PM +1300, Derek Robson wrote:
>>> A style fix across whole driver.
>>> changed permissions to octal style, found using checkpatch
>>>
>>> Signed-off-by: Derek Robson <robsonde@gmail.com>
>>
>> FWIW, I think changes like this are best done using coccinelle.
>
> I think checkpatch does it reasonably well.
>
> Julia?  Can coccinelle do this?
>
> I believe cocinelle doesn't handle the substitution
> and octal addition very well when multiple flags
> are used.
>

Why not ? Seems to be quite simple. One just has to list all the variants
being used in the rule.

>> That ensures that the results can be reproduced and are well defined.
>> As it is, someone will have to check each line of your patches to ensure
>> that the conversion is correct.
>>
>> It would also ensure (hopefully) that we don't end up with constructs
>> such as
>>
>>> -#define USER_R (S_IFREG|S_IRUGO)
>>> -#define USER_W (S_IFREG|S_IWUGO)
>>> +#define USER_R (S_IFREG|0444)
>>> +#define USER_W (S_IFREG|0666)
>>
>> which really defeat the purpose of the whole exercise.
>
> Why do you think mixing file specific attributes
> with octal permissions is a bad thing?
>

Just an assumption. My bad. Ultimately, what I think doesn't really
matter, though - because what I think is that the whole "use octals"
is a bad idea to start with.

Guenter

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

* Re: Staging: speakup - syle fix permissions to octal
  2017-02-04 14:22     ` Guenter Roeck
@ 2017-02-04 14:29       ` Julia Lawall
  2017-02-04 15:17         ` Guenter Roeck
  0 siblings, 1 reply; 12+ messages in thread
From: Julia Lawall @ 2017-02-04 14:29 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Joe Perches, Derek Robson, Julia Lawall, w.d.hubbs, chris, kirk,
	samuel.thibault, gregkh, shraddha.6596, alan, shiva, amitoj1606,
	amsfield22, bhumirks, waltfeasel, speakup, devel, linux-kernel



On Sat, 4 Feb 2017, Guenter Roeck wrote:

> On 02/03/2017 11:27 PM, Joe Perches wrote:
> > (adding Julia Lawall)
> >
> > On Fri, 2017-02-03 at 20:44 -0800, Guenter Roeck wrote:
> > > On Sat, Jan 28, 2017 at 07:05:09PM +1300, Derek Robson wrote:
> > > > A style fix across whole driver.
> > > > changed permissions to octal style, found using checkpatch
> > > >
> > > > Signed-off-by: Derek Robson <robsonde@gmail.com>
> > >
> > > FWIW, I think changes like this are best done using coccinelle.
> >
> > I think checkpatch does it reasonably well.
> >
> > Julia?  Can coccinelle do this?
> >
> > I believe cocinelle doesn't handle the substitution
> > and octal addition very well when multiple flags
> > are used.
> >
>
> Why not ? Seems to be quite simple. One just has to list all the variants
> being used in the rule.
>
> > > That ensures that the results can be reproduced and are well defined.
> > > As it is, someone will have to check each line of your patches to ensure
> > > that the conversion is correct.
> > >
> > > It would also ensure (hopefully) that we don't end up with constructs
> > > such as
> > >
> > > > -#define USER_R (S_IFREG|S_IRUGO)
> > > > -#define USER_W (S_IFREG|S_IWUGO)
> > > > +#define USER_R (S_IFREG|0444)
> > > > +#define USER_W (S_IFREG|0666)
> > >
> > > which really defeat the purpose of the whole exercise.
> >
> > Why do you think mixing file specific attributes
> > with octal permissions is a bad thing?
> >
>
> Just an assumption. My bad. Ultimately, what I think doesn't really
> matter, though - because what I think is that the whole "use octals"
> is a bad idea to start with.

I don't think I have received yet the message that this is referring to.
But I don't see a problem for Coccinelle a priori.  If there are things
that need to be added together, as long as they are explicit constants,
that can be done in python or ocaml.

julia

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

* Re: Staging: speakup - syle fix permissions to octal
  2017-02-04 14:29       ` Julia Lawall
@ 2017-02-04 15:17         ` Guenter Roeck
  2017-02-04 15:25           ` Julia Lawall
  0 siblings, 1 reply; 12+ messages in thread
From: Guenter Roeck @ 2017-02-04 15:17 UTC (permalink / raw)
  To: Julia Lawall
  Cc: Joe Perches, Derek Robson, w.d.hubbs, chris, kirk,
	samuel.thibault, gregkh, shraddha.6596, alan, shiva, amitoj1606,
	amsfield22, bhumirks, waltfeasel, speakup, devel, linux-kernel

On 02/04/2017 06:29 AM, Julia Lawall wrote:
>
>
> On Sat, 4 Feb 2017, Guenter Roeck wrote:
>
>> On 02/03/2017 11:27 PM, Joe Perches wrote:
>>> (adding Julia Lawall)
>>>
>>> On Fri, 2017-02-03 at 20:44 -0800, Guenter Roeck wrote:
>>>> On Sat, Jan 28, 2017 at 07:05:09PM +1300, Derek Robson wrote:
>>>>> A style fix across whole driver.
>>>>> changed permissions to octal style, found using checkpatch
>>>>>
>>>>> Signed-off-by: Derek Robson <robsonde@gmail.com>
>>>>
>>>> FWIW, I think changes like this are best done using coccinelle.
>>>
>>> I think checkpatch does it reasonably well.
>>>
>>> Julia?  Can coccinelle do this?
>>>
>>> I believe cocinelle doesn't handle the substitution
>>> and octal addition very well when multiple flags
>>> are used.
>>>
>>
>> Why not ? Seems to be quite simple. One just has to list all the variants
>> being used in the rule.
>>
>>>> That ensures that the results can be reproduced and are well defined.
>>>> As it is, someone will have to check each line of your patches to ensure
>>>> that the conversion is correct.
>>>>
>>>> It would also ensure (hopefully) that we don't end up with constructs
>>>> such as
>>>>
>>>>> -#define USER_R (S_IFREG|S_IRUGO)
>>>>> -#define USER_W (S_IFREG|S_IWUGO)
>>>>> +#define USER_R (S_IFREG|0444)
>>>>> +#define USER_W (S_IFREG|0666)
>>>>
>>>> which really defeat the purpose of the whole exercise.
>>>
>>> Why do you think mixing file specific attributes
>>> with octal permissions is a bad thing?
>>>
>>
>> Just an assumption. My bad. Ultimately, what I think doesn't really
>> matter, though - because what I think is that the whole "use octals"
>> is a bad idea to start with.
>
> I don't think I have received yet the message that this is referring to.
> But I don't see a problem for Coccinelle a priori.  If there are things
> that need to be added together, as long as they are explicit constants,
> that can be done in python or ocaml.
>

Something like

@@
@@

(
- S_IFREG | S_IRUGO | S_IWUGO
+ S_IFREG | 0666
|
- S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH
+ 0644
|
- S_IRUGO|S_IWUSR
+ 0644
|
- S_IWUSR|S_IRUGO
+ 0644
|
- S_IRUGO|S_IWUGO
+ 0666
|
- S_IWUGO|S_IRUGO
+ 0666
|
- S_IRUGO
+ 0444
|
- S_IWUGO
+ 0222
|
- S_IWUSR
+ 0200
)

Odd is that the S_IFREG rule seems to be needed to catch "S_IFREG | S_IRUGO | S_IWUGO",
but probably I am missing something as usual ;-).

Guenter

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

* Re: Staging: speakup - syle fix permissions to octal
  2017-02-04 15:17         ` Guenter Roeck
@ 2017-02-04 15:25           ` Julia Lawall
  0 siblings, 0 replies; 12+ messages in thread
From: Julia Lawall @ 2017-02-04 15:25 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Julia Lawall, Joe Perches, Derek Robson, w.d.hubbs, chris, kirk,
	samuel.thibault, gregkh, shraddha.6596, alan, shiva, amitoj1606,
	amsfield22, bhumirks, waltfeasel, speakup, devel, linux-kernel



On Sat, 4 Feb 2017, Guenter Roeck wrote:

> On 02/04/2017 06:29 AM, Julia Lawall wrote:
> >
> >
> > On Sat, 4 Feb 2017, Guenter Roeck wrote:
> >
> > > On 02/03/2017 11:27 PM, Joe Perches wrote:
> > > > (adding Julia Lawall)
> > > >
> > > > On Fri, 2017-02-03 at 20:44 -0800, Guenter Roeck wrote:
> > > > > On Sat, Jan 28, 2017 at 07:05:09PM +1300, Derek Robson wrote:
> > > > > > A style fix across whole driver.
> > > > > > changed permissions to octal style, found using checkpatch
> > > > > >
> > > > > > Signed-off-by: Derek Robson <robsonde@gmail.com>
> > > > >
> > > > > FWIW, I think changes like this are best done using coccinelle.
> > > >
> > > > I think checkpatch does it reasonably well.
> > > >
> > > > Julia?  Can coccinelle do this?
> > > >
> > > > I believe cocinelle doesn't handle the substitution
> > > > and octal addition very well when multiple flags
> > > > are used.
> > > >
> > >
> > > Why not ? Seems to be quite simple. One just has to list all the variants
> > > being used in the rule.
> > >
> > > > > That ensures that the results can be reproduced and are well defined.
> > > > > As it is, someone will have to check each line of your patches to
> > > > > ensure
> > > > > that the conversion is correct.
> > > > >
> > > > > It would also ensure (hopefully) that we don't end up with constructs
> > > > > such as
> > > > >
> > > > > > -#define USER_R (S_IFREG|S_IRUGO)
> > > > > > -#define USER_W (S_IFREG|S_IWUGO)
> > > > > > +#define USER_R (S_IFREG|0444)
> > > > > > +#define USER_W (S_IFREG|0666)
> > > > >
> > > > > which really defeat the purpose of the whole exercise.
> > > >
> > > > Why do you think mixing file specific attributes
> > > > with octal permissions is a bad thing?
> > > >
> > >
> > > Just an assumption. My bad. Ultimately, what I think doesn't really
> > > matter, though - because what I think is that the whole "use octals"
> > > is a bad idea to start with.
> >
> > I don't think I have received yet the message that this is referring to.
> > But I don't see a problem for Coccinelle a priori.  If there are things
> > that need to be added together, as long as they are explicit constants,
> > that can be done in python or ocaml.
> >
>
> Something like
>
> @@
> @@
>
> (
> - S_IFREG | S_IRUGO | S_IWUGO
> + S_IFREG | 0666
> |
> - S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH
> + 0644
> |
> - S_IRUGO|S_IWUSR
> + 0644
> |
> - S_IWUSR|S_IRUGO
> + 0644
> |
> - S_IRUGO|S_IWUGO
> + 0666
> |
> - S_IWUGO|S_IRUGO
> + 0666
> |
> - S_IRUGO
> + 0444
> |
> - S_IWUGO
> + 0222
> |
> - S_IWUSR
> + 0200
> )
>
> Odd is that the S_IFREG rule seems to be needed to catch "S_IFREG | S_IRUGO |
> S_IWUGO",
> but probably I am missing something as usual ;-).

The associativity of | is not what you hope for.

julia

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

* Re: Staging: speakup - syle fix permissions to octal
  2017-02-04  7:27   ` Joe Perches
  2017-02-04 14:22     ` Guenter Roeck
@ 2017-02-04 18:10     ` Julia Lawall
  2017-02-04 18:32       ` Joe Perches
  1 sibling, 1 reply; 12+ messages in thread
From: Julia Lawall @ 2017-02-04 18:10 UTC (permalink / raw)
  To: Joe Perches
  Cc: Guenter Roeck, Derek Robson, Julia Lawall, w.d.hubbs, chris,
	kirk, samuel.thibault, gregkh, shraddha.6596, alan, shiva,
	amitoj1606, amsfield22, bhumirks, waltfeasel, speakup, devel,
	linux-kernel



On Fri, 3 Feb 2017, Joe Perches wrote:

> (adding Julia Lawall)
>
> On Fri, 2017-02-03 at 20:44 -0800, Guenter Roeck wrote:
> > On Sat, Jan 28, 2017 at 07:05:09PM +1300, Derek Robson wrote:
> > > A style fix across whole driver.
> > > changed permissions to octal style, found using checkpatch
> > >
> > > Signed-off-by: Derek Robson <robsonde@gmail.com>
> >
> > FWIW, I think changes like this are best done using coccinelle.
>
> I think checkpatch does it reasonably well.
>
> Julia?  Can coccinelle do this?
>
> I believe cocinelle doesn't handle the substitution
> and octal addition very well when multiple flags
> are used.

OK, finally received.  I think that Guenter's solution is a good one,
because the rule-writer knows better than Coccinelle what people find to
be intelligible.

julia

>
> > That ensures that the results can be reproduced and are well defined.
> > As it is, someone will have to check each line of your patches to ensure
> > that the conversion is correct.
> >
> > It would also ensure (hopefully) that we don't end up with constructs
> > such as
> >
> > > -#define USER_R (S_IFREG|S_IRUGO)
> > > -#define USER_W (S_IFREG|S_IWUGO)
> > > +#define USER_R (S_IFREG|0444)
> > > +#define USER_W (S_IFREG|0666)
> >
> > which really defeat the purpose of the whole exercise.
>
> Why do you think mixing file specific attributes
> with octal permissions is a bad thing?
>
> $ git log -1 f90774e1fd2700d
> commit f90774e1fd2700de4a6e0d62866d34a26c544bd0
> Author: Joe Perches <joe@perches.com>
> Date:   Tue Oct 11 13:51:47 2016 -0700
>
>     checkpatch: look for symbolic permissions and suggest octal instead
>
>     S_<FOO> uses should be avoided where octal is more intelligible.
>
>     Linus didst say:
>
>     : It's *much* easier to parse and understand the octal numbers, while the
>     : symbolic macro names are just random line noise and hard as hell to
>     : understand.  You really have to think about it.
>     :
>     : So we should rather go the other way: convert existing bad symbolic
>     : permission bit macro use to just use the octal numbers.
>     :
>     : The symbolic names are good for the *other* bits (ie sticky bit, and the
>     : inode mode _type_ numbers etc), but for the permission bits, the symbolic
>     : names are just insane crap.  Nobody sane should ever use them.  Not in the
>     : kernel, not in user space.
>     (http://lkml.kernel.org/r/CA+55aFw5v23T-zvDZp-MmD_EYxF8WbafwwB59934FV7g21uMGQ@mail.gmail.com)
>
>     Link: http://lkml.kernel.org/r/7232ef011d05a92f4caa86a5e9830d87966a2eaf.1470180926.git.joe@perches.com
>     Signed-off-by: Joe Perches <joe@perches.com>
>     Cc: Linus Torvalds <torvalds@linux-foundation.org>
>     Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
>     Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
>

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

* Re: Staging: speakup - syle fix permissions to octal
  2017-02-04 18:10     ` Julia Lawall
@ 2017-02-04 18:32       ` Joe Perches
  2017-02-04 19:24         ` Julia Lawall
  0 siblings, 1 reply; 12+ messages in thread
From: Joe Perches @ 2017-02-04 18:32 UTC (permalink / raw)
  To: Julia Lawall
  Cc: Guenter Roeck, Derek Robson, w.d.hubbs, chris, kirk,
	samuel.thibault, gregkh, shraddha.6596, alan, shiva, amitoj1606,
	amsfield22, bhumirks, waltfeasel, speakup, devel, linux-kernel

On Sat, 2017-02-04 at 19:10 +0100, Julia Lawall wrote:
> 
> On Fri, 3 Feb 2017, Joe Perches wrote:
> 
> > (adding Julia Lawall)
> > 
> > On Fri, 2017-02-03 at 20:44 -0800, Guenter Roeck wrote:
> > > On Sat, Jan 28, 2017 at 07:05:09PM +1300, Derek Robson wrote:
> > > > A style fix across whole driver.
> > > > changed permissions to octal style, found using checkpatch
> > > > 
> > > > Signed-off-by: Derek Robson <robsonde@gmail.com>
> > > 
> > > FWIW, I think changes like this are best done using coccinelle.
> > 
> > I think checkpatch does it reasonably well.
> > 
> > Julia?  Can coccinelle do this?
> > 
> > I believe cocinelle doesn't handle the substitution
> > and octal addition very well when multiple flags
> > are used.
> 
> OK, finally received.  I think that Guenter's solution is a good one,
> because the rule-writer knows better than Coccinelle what people find to
> be intelligible.

If it's written in python, I don't see how that's
particularly different than being written in perl,
but coccinelle could certainly handle expressions
on multiple lines of these or'd constants better.

Are there any than span 2 or more lines?
I didn't see one with a casual grep.

Does coccinelle handle arbitrary ordering of these
constants in a form like Guenter suggests or does
each possible ordered sequence need to be written?

just fyi:

"S_IRWXU" => 0700
"S_IRUSR" => 0400
"S_IWUSR" => 0200
"S_IXUSR" => 0100
"S_IRWXG" => 0070
"S_IRGRP" => 0040
"S_IWGRP" => 0020
"S_IXGRP" => 0010
"S_IRWXO" => 0007
"S_IROTH" => 0004
"S_IWOTH" => 0002
"S_IXOTH" => 0001
"S_IRWXUGO" => 0777
"S_IRUGO" => 0444
"S_IWUGO" => 0222
"S_IXUGO" => 0111

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

* Re: Staging: speakup - syle fix permissions to octal
  2017-02-04 18:32       ` Joe Perches
@ 2017-02-04 19:24         ` Julia Lawall
  2017-02-04 19:30           ` Joe Perches
  0 siblings, 1 reply; 12+ messages in thread
From: Julia Lawall @ 2017-02-04 19:24 UTC (permalink / raw)
  To: Joe Perches
  Cc: Julia Lawall, Guenter Roeck, Derek Robson, w.d.hubbs, chris,
	kirk, samuel.thibault, gregkh, shraddha.6596, alan, shiva,
	amitoj1606, amsfield22, bhumirks, waltfeasel, speakup, devel,
	linux-kernel



On Sat, 4 Feb 2017, Joe Perches wrote:

> On Sat, 2017-02-04 at 19:10 +0100, Julia Lawall wrote:
> >
> > On Fri, 3 Feb 2017, Joe Perches wrote:
> >
> > > (adding Julia Lawall)
> > >
> > > On Fri, 2017-02-03 at 20:44 -0800, Guenter Roeck wrote:
> > > > On Sat, Jan 28, 2017 at 07:05:09PM +1300, Derek Robson wrote:
> > > > > A style fix across whole driver.
> > > > > changed permissions to octal style, found using checkpatch
> > > > >
> > > > > Signed-off-by: Derek Robson <robsonde@gmail.com>
> > > >
> > > > FWIW, I think changes like this are best done using coccinelle.
> > >
> > > I think checkpatch does it reasonably well.
> > >
> > > Julia?  Can coccinelle do this?
> > >
> > > I believe cocinelle doesn't handle the substitution
> > > and octal addition very well when multiple flags
> > > are used.
> >
> > OK, finally received.  I think that Guenter's solution is a good one,
> > because the rule-writer knows better than Coccinelle what people find to
> > be intelligible.
>
> If it's written in python, I don't see how that's
> particularly different than being written in perl,
> but coccinelle could certainly handle expressions
> on multiple lines of these or'd constants better.

Well, the python would only be needed if there was a need for actual
calculations.  Should S_IRGRP | S_IWGRP become 0060?

>
> Are there any than span 2 or more lines?
> I didn't see one with a casual grep.
>
> Does coccinelle handle arbitrary ordering of these
> constants in a form like Guenter suggests or does
> each possible ordered sequence need to be written?

There is the following isomorphism:

X | Y => Y | X

But that only works when the associativity is right.

A | B | C is (A | B) | C, so the B and C won't exchange with each other.
One can also write eg

A | ... | B

which gives more fexibility.  I'm not sure to what extent that works when
there are changes, though.

julia

> just fyi:
>
> "S_IRWXU" => 0700
> "S_IRUSR" => 0400
> "S_IWUSR" => 0200
> "S_IXUSR" => 0100
> "S_IRWXG" => 0070
> "S_IRGRP" => 0040
> "S_IWGRP" => 0020
> "S_IXGRP" => 0010
> "S_IRWXO" => 0007
> "S_IROTH" => 0004
> "S_IWOTH" => 0002
> "S_IXOTH" => 0001
> "S_IRWXUGO" => 0777
> "S_IRUGO" => 0444
> "S_IWUGO" => 0222
> "S_IXUGO" => 0111

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

* Re: Staging: speakup - syle fix permissions to octal
  2017-02-04 19:24         ` Julia Lawall
@ 2017-02-04 19:30           ` Joe Perches
  0 siblings, 0 replies; 12+ messages in thread
From: Joe Perches @ 2017-02-04 19:30 UTC (permalink / raw)
  To: Julia Lawall
  Cc: Guenter Roeck, Derek Robson, w.d.hubbs, chris, kirk,
	samuel.thibault, gregkh, shraddha.6596, alan, shiva, amitoj1606,
	amsfield22, bhumirks, waltfeasel, speakup, devel, linux-kernel

On Sat, 2017-02-04 at 20:24 +0100, Julia Lawall wrote:
> 
> On Sat, 4 Feb 2017, Joe Perches wrote:
> 
> > On Sat, 2017-02-04 at 19:10 +0100, Julia Lawall wrote:
> > > 
> > > On Fri, 3 Feb 2017, Joe Perches wrote:
> > > 
> > > > (adding Julia Lawall)
> > > > 
> > > > On Fri, 2017-02-03 at 20:44 -0800, Guenter Roeck wrote:
> > > > > On Sat, Jan 28, 2017 at 07:05:09PM +1300, Derek Robson wrote:
> > > > > > A style fix across whole driver.
> > > > > > changed permissions to octal style, found using checkpatch
> > > > > > 
> > > > > > Signed-off-by: Derek Robson <robsonde@gmail.com>
> > > > > 
> > > > > FWIW, I think changes like this are best done using coccinelle.
> > > > 
> > > > I think checkpatch does it reasonably well.
> > > > 
> > > > Julia?  Can coccinelle do this?
> > > > 
> > > > I believe cocinelle doesn't handle the substitution
> > > > and octal addition very well when multiple flags
> > > > are used.
> > > 
> > > OK, finally received.  I think that Guenter's solution is a good one,
> > > because the rule-writer knows better than Coccinelle what people find to
> > > be intelligible.
> > 
> > If it's written in python, I don't see how that's
> > particularly different than being written in perl,
> > but coccinelle could certainly handle expressions
> > on multiple lines of these or'd constants better.
> 
> Well, the python would only be needed if there was a need for actual
> calculations.  Should S_IRGRP | S_IWGRP become 0060?

Yes.

> > Are there any than span 2 or more lines?
> > I didn't see one with a casual grep.
> > 
> > Does coccinelle handle arbitrary ordering of these
> > constants in a form like Guenter suggests or does
> > each possible ordered sequence need to be written?
> 
> There is the following isomorphism:
> 
> X | Y => Y | X
> 
> But that only works when the associativity is right.
> 
> A | B | C is (A | B) | C, so the B and C won't exchange with each other.
> One can also write eg
> 
> A | ... | B
> 
> which gives more fexibility.  I'm not sure to what extent that works when
> there are changes, though.

The perl code doesn't care about the ordering
but it doesn't handle the A | ... | B case.

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

end of thread, other threads:[~2017-02-04 19:30 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-28  6:05 [PATCH] Staging: speakup - syle fix permissions to octal Derek Robson
2017-01-28  6:14 ` Joe Perches
2017-02-04  4:44 ` Guenter Roeck
2017-02-04  7:27   ` Joe Perches
2017-02-04 14:22     ` Guenter Roeck
2017-02-04 14:29       ` Julia Lawall
2017-02-04 15:17         ` Guenter Roeck
2017-02-04 15:25           ` Julia Lawall
2017-02-04 18:10     ` Julia Lawall
2017-02-04 18:32       ` Joe Perches
2017-02-04 19:24         ` Julia Lawall
2017-02-04 19:30           ` Joe Perches

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.