[RESEND PATCH] MAINTAINERS: Update maintainer entry for wilc1000

2016-08-02 Thread Nicolas Ferre
From: Aditya Shankar 

Take the maintenance of the Atmel WIFI staging driver wilc1000.
Former maintainers are no more with Atmel.

Reported-by: Loic Lefort 
Signed-off-by: Aditya Shankar 
Signed-off-by: Ganesh Krishna 
Acked-by: Luis de Bethencourt 
Signed-off-by: Nicolas Ferre 
---
Hi all,

Just an elaborate "ping" with the Acked-by tag from Luis added.
As noted by Luis, previous version of this patch is here:
https://lkml.org/lkml/2016/6/27/382

Thanks, bye.

 MAINTAINERS | 8 ++--
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 33d7e2252ceb..b0d5c77c9db2 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -11202,12 +11202,8 @@ S: Odd Fixes
 F: drivers/staging/vt665?/
 
 STAGING - WILC1000 WIFI DRIVER
-M: Johnny Kim 
-M: Austin Shin 
-M: Chris Park 
-M: Tony Cho 
-M: Glen Lee 
-M: Leo Kim 
+M: Aditya Shankar 
+M: Ganesh Krishna 
 L: linux-wirel...@vger.kernel.org
 S: Supported
 F: drivers/staging/wilc1000/
-- 
2.9.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 1651/1651] staging: i4l: pcbit: Remove explicit NULL comparison

2016-08-02 Thread shyam saini
Remove the explicit NULL comparison and rewrite in a compact form using 
Coccinelle

Signed-off-by: shyam saini 
---
 drivers/staging/i4l/pcbit/callbacks.c |  4 ++--
 drivers/staging/i4l/pcbit/capi.c  | 18 +-
 drivers/staging/i4l/pcbit/drv.c   | 14 +++---
 drivers/staging/i4l/pcbit/layer2.c|  9 -
 4 files changed, 22 insertions(+), 23 deletions(-)

diff --git a/drivers/staging/i4l/pcbit/callbacks.c 
b/drivers/staging/i4l/pcbit/callbacks.c
index efb6d6a..41a95a5 100644
--- a/drivers/staging/i4l/pcbit/callbacks.c
+++ b/drivers/staging/i4l/pcbit/callbacks.c
@@ -144,14 +144,14 @@ void cb_in_1(struct pcbit_dev *dev, struct pcbit_chan 
*chan,
 *  ictl.num >= strlen() + strlen() + 5
 */
 
-   if (cbdata->data.setup.CallingPN == NULL) {
+   if (!cbdata->data.setup.CallingPN) {
printk(KERN_DEBUG "NULL CallingPN to phone; using 0\n");
strcpy(ictl.parm.setup.phone, "0");
}
else {
strcpy(ictl.parm.setup.phone, cbdata->data.setup.CallingPN);
}
-   if (cbdata->data.setup.CalledPN == NULL) {
+   if (!cbdata->data.setup.CalledPN) {
printk(KERN_DEBUG "NULL CalledPN to eazmsn; using 0\n");
strcpy(ictl.parm.setup.eazmsn, "0");
}
diff --git a/drivers/staging/i4l/pcbit/capi.c b/drivers/staging/i4l/pcbit/capi.c
index 4e3cbf8..b11895cb 100644
--- a/drivers/staging/i4l/pcbit/capi.c
+++ b/drivers/staging/i4l/pcbit/capi.c
@@ -76,7 +76,7 @@ int capi_conn_req(const char *calledPN, struct sk_buff **skb, 
int proto)
if (proto == ISDN_PROTO_L2_TRANS)
len++;
 
-   if ((*skb = dev_alloc_skb(len)) == NULL) {
+   if (!(*skb = dev_alloc_skb(len))) {
 
printk(KERN_WARNING "capi_conn_req: alloc_skb failed\n");
return -1;
@@ -134,7 +134,7 @@ int capi_conn_req(const char *calledPN, struct sk_buff 
**skb, int proto)
 int capi_conn_resp(struct pcbit_chan *chan, struct sk_buff **skb)
 {
 
-   if ((*skb = dev_alloc_skb(5)) == NULL) {
+   if (!(*skb = dev_alloc_skb(5))) {
 
printk(KERN_WARNING "capi_conn_resp: alloc_skb failed\n");
return -1;
@@ -154,7 +154,7 @@ int capi_conn_active_req(struct pcbit_chan *chan, struct 
sk_buff **skb)
 * 8 bytes
 */
 
-   if ((*skb = dev_alloc_skb(8)) == NULL) {
+   if (!(*skb = dev_alloc_skb(8))) {
 
printk(KERN_WARNING "capi_conn_active_req: alloc_skb failed\n");
return -1;
@@ -182,7 +182,7 @@ int capi_conn_active_resp(struct pcbit_chan *chan, struct 
sk_buff **skb)
 * 2 bytes
 */
 
-   if ((*skb = dev_alloc_skb(2)) == NULL) {
+   if (!(*skb = dev_alloc_skb(2))) {
 
printk(KERN_WARNING "capi_conn_active_resp: alloc_skb 
failed\n");
return -1;
@@ -202,7 +202,7 @@ int capi_select_proto_req(struct pcbit_chan *chan, struct 
sk_buff **skb,
 * 18 bytes
 */
 
-   if ((*skb = dev_alloc_skb(18)) == NULL) {
+   if (!(*skb = dev_alloc_skb(18))) {
 
printk(KERN_WARNING "capi_select_proto_req: alloc_skb 
failed\n");
return -1;
@@ -263,7 +263,7 @@ int capi_select_proto_req(struct pcbit_chan *chan, struct 
sk_buff **skb,
 int capi_activate_transp_req(struct pcbit_chan *chan, struct sk_buff **skb)
 {
 
-   if ((*skb = dev_alloc_skb(7)) == NULL) {
+   if (!(*skb = dev_alloc_skb(7))) {
 
printk(KERN_WARNING "capi_activate_transp_req: alloc_skb 
failed\n");
return -1;
@@ -321,7 +321,7 @@ int capi_tdata_req(struct pcbit_chan *chan, struct sk_buff 
*skb)
 int capi_tdata_resp(struct pcbit_chan *chan, struct sk_buff **skb)
 
 {
-   if ((*skb = dev_alloc_skb(4)) == NULL) {
+   if (!(*skb = dev_alloc_skb(4))) {
 
printk(KERN_WARNING "capi_tdata_resp: alloc_skb failed\n");
return -1;
@@ -338,7 +338,7 @@ int capi_tdata_resp(struct pcbit_chan *chan, struct sk_buff 
**skb)
 int capi_disc_req(ushort callref, struct sk_buff **skb, u_char cause)
 {
 
-   if ((*skb = dev_alloc_skb(6)) == NULL) {
+   if (!(*skb = dev_alloc_skb(6))) {
 
printk(KERN_WARNING "capi_disc_req: alloc_skb failed\n");
return -1;
@@ -361,7 +361,7 @@ int capi_disc_req(ushort callref, struct sk_buff **skb, 
u_char cause)
 
 int capi_disc_resp(struct pcbit_chan *chan, struct sk_buff **skb)
 {
-   if ((*skb = dev_alloc_skb(2)) == NULL) {
+   if (!(*skb = dev_alloc_skb(2))) {
 
printk(KERN_WARNING "capi_disc_resp: alloc_skb failed\n");
return -1;
diff --git a/drivers/staging/i4l/pcbit/drv.c b/drivers/staging/i4l/pcbit/drv.c
index c5270e2..62a41d7 100644
--- a/drivers/staging/i4l/pcbit/drv.c
+++ b/drivers/staging/i4l/pcbit/drv.c
@@ -73,7 +73,7 @@ int pcbit_init_dev(int board, int mem_base, int irq)
struct pcbit_dev *dev;
isdn_if *dev_if;
 
-   if ((dev =

Re: [PATCH 1651/1651] staging: i4l: pcbit: Remove explicit NULL comparison

2016-08-02 Thread Giedrius Statkevičius
Hello shyam saini,

On Tue, Aug 2, 2016 at 2:33 PM, shyam saini  wrote:
> Remove the explicit NULL comparison and rewrite in a compact form using 
> Coccinelle
>
> Signed-off-by: shyam saini 

Where are the other 1650 patches? Also, a patch series that consists
of 1651 patches???
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 1/1] staging: i4l: pcbit: Remove explicit NULL comparison

2016-08-02 Thread shyam saini
Remove the explicit NULL comparison and rewrite in a compact form using 
Coccinelle

Signed-off-by: shyam saini 
---
 drivers/staging/i4l/pcbit/callbacks.c |  4 ++--
 drivers/staging/i4l/pcbit/capi.c  | 18 +-
 drivers/staging/i4l/pcbit/drv.c   | 14 +++---
 drivers/staging/i4l/pcbit/layer2.c|  9 -
 4 files changed, 22 insertions(+), 23 deletions(-)

diff --git a/drivers/staging/i4l/pcbit/callbacks.c 
b/drivers/staging/i4l/pcbit/callbacks.c
index efb6d6a..41a95a5 100644
--- a/drivers/staging/i4l/pcbit/callbacks.c
+++ b/drivers/staging/i4l/pcbit/callbacks.c
@@ -144,14 +144,14 @@ void cb_in_1(struct pcbit_dev *dev, struct pcbit_chan 
*chan,
 *  ictl.num >= strlen() + strlen() + 5
 */
 
-   if (cbdata->data.setup.CallingPN == NULL) {
+   if (!cbdata->data.setup.CallingPN) {
printk(KERN_DEBUG "NULL CallingPN to phone; using 0\n");
strcpy(ictl.parm.setup.phone, "0");
}
else {
strcpy(ictl.parm.setup.phone, cbdata->data.setup.CallingPN);
}
-   if (cbdata->data.setup.CalledPN == NULL) {
+   if (!cbdata->data.setup.CalledPN) {
printk(KERN_DEBUG "NULL CalledPN to eazmsn; using 0\n");
strcpy(ictl.parm.setup.eazmsn, "0");
}
diff --git a/drivers/staging/i4l/pcbit/capi.c b/drivers/staging/i4l/pcbit/capi.c
index 4e3cbf8..b11895cb 100644
--- a/drivers/staging/i4l/pcbit/capi.c
+++ b/drivers/staging/i4l/pcbit/capi.c
@@ -76,7 +76,7 @@ int capi_conn_req(const char *calledPN, struct sk_buff **skb, 
int proto)
if (proto == ISDN_PROTO_L2_TRANS)
len++;
 
-   if ((*skb = dev_alloc_skb(len)) == NULL) {
+   if (!(*skb = dev_alloc_skb(len))) {
 
printk(KERN_WARNING "capi_conn_req: alloc_skb failed\n");
return -1;
@@ -134,7 +134,7 @@ int capi_conn_req(const char *calledPN, struct sk_buff 
**skb, int proto)
 int capi_conn_resp(struct pcbit_chan *chan, struct sk_buff **skb)
 {
 
-   if ((*skb = dev_alloc_skb(5)) == NULL) {
+   if (!(*skb = dev_alloc_skb(5))) {
 
printk(KERN_WARNING "capi_conn_resp: alloc_skb failed\n");
return -1;
@@ -154,7 +154,7 @@ int capi_conn_active_req(struct pcbit_chan *chan, struct 
sk_buff **skb)
 * 8 bytes
 */
 
-   if ((*skb = dev_alloc_skb(8)) == NULL) {
+   if (!(*skb = dev_alloc_skb(8))) {
 
printk(KERN_WARNING "capi_conn_active_req: alloc_skb failed\n");
return -1;
@@ -182,7 +182,7 @@ int capi_conn_active_resp(struct pcbit_chan *chan, struct 
sk_buff **skb)
 * 2 bytes
 */
 
-   if ((*skb = dev_alloc_skb(2)) == NULL) {
+   if (!(*skb = dev_alloc_skb(2))) {
 
printk(KERN_WARNING "capi_conn_active_resp: alloc_skb 
failed\n");
return -1;
@@ -202,7 +202,7 @@ int capi_select_proto_req(struct pcbit_chan *chan, struct 
sk_buff **skb,
 * 18 bytes
 */
 
-   if ((*skb = dev_alloc_skb(18)) == NULL) {
+   if (!(*skb = dev_alloc_skb(18))) {
 
printk(KERN_WARNING "capi_select_proto_req: alloc_skb 
failed\n");
return -1;
@@ -263,7 +263,7 @@ int capi_select_proto_req(struct pcbit_chan *chan, struct 
sk_buff **skb,
 int capi_activate_transp_req(struct pcbit_chan *chan, struct sk_buff **skb)
 {
 
-   if ((*skb = dev_alloc_skb(7)) == NULL) {
+   if (!(*skb = dev_alloc_skb(7))) {
 
printk(KERN_WARNING "capi_activate_transp_req: alloc_skb 
failed\n");
return -1;
@@ -321,7 +321,7 @@ int capi_tdata_req(struct pcbit_chan *chan, struct sk_buff 
*skb)
 int capi_tdata_resp(struct pcbit_chan *chan, struct sk_buff **skb)
 
 {
-   if ((*skb = dev_alloc_skb(4)) == NULL) {
+   if (!(*skb = dev_alloc_skb(4))) {
 
printk(KERN_WARNING "capi_tdata_resp: alloc_skb failed\n");
return -1;
@@ -338,7 +338,7 @@ int capi_tdata_resp(struct pcbit_chan *chan, struct sk_buff 
**skb)
 int capi_disc_req(ushort callref, struct sk_buff **skb, u_char cause)
 {
 
-   if ((*skb = dev_alloc_skb(6)) == NULL) {
+   if (!(*skb = dev_alloc_skb(6))) {
 
printk(KERN_WARNING "capi_disc_req: alloc_skb failed\n");
return -1;
@@ -361,7 +361,7 @@ int capi_disc_req(ushort callref, struct sk_buff **skb, 
u_char cause)
 
 int capi_disc_resp(struct pcbit_chan *chan, struct sk_buff **skb)
 {
-   if ((*skb = dev_alloc_skb(2)) == NULL) {
+   if (!(*skb = dev_alloc_skb(2))) {
 
printk(KERN_WARNING "capi_disc_resp: alloc_skb failed\n");
return -1;
diff --git a/drivers/staging/i4l/pcbit/drv.c b/drivers/staging/i4l/pcbit/drv.c
index c5270e2..62a41d7 100644
--- a/drivers/staging/i4l/pcbit/drv.c
+++ b/drivers/staging/i4l/pcbit/drv.c
@@ -73,7 +73,7 @@ int pcbit_init_dev(int board, int mem_base, int irq)
struct pcbit_dev *dev;
isdn_if *dev_if;
 
-   if ((dev =

[PATCH 0922/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value
when calling a macro which is defined with a parameter for access permission.
As we know, these numeric value for access permission have had the 
corresponding macro,
and that using macro can improve the robustness and readability of the code,
thus, I suggest replacing the numeric parameter with the macro.

Signed-off-by: Chuansheng Liu 
Signed-off-by: Baole Ni 
---
 drivers/staging/comedi/drivers/ni_65xx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/comedi/drivers/ni_65xx.c 
b/drivers/staging/comedi/drivers/ni_65xx.c
index 251117b..fd73efa 100644
--- a/drivers/staging/comedi/drivers/ni_65xx.c
+++ b/drivers/staging/comedi/drivers/ni_65xx.c
@@ -271,7 +271,7 @@ static const struct ni_65xx_board ni_65xx_boards[] = {
 
 static bool ni_65xx_legacy_invert_outputs;
 module_param_named(legacy_invert_outputs, ni_65xx_legacy_invert_outputs,
-  bool, 0444);
+  bool, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(legacy_invert_outputs,
 "invert outputs of PCI/PXI-6513/6514/6515/6516/6517/6518/6519 
for compatibility with old user code");
 
-- 
2.9.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 0924/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value
when calling a macro which is defined with a parameter for access permission.
As we know, these numeric value for access permission have had the 
corresponding macro,
and that using macro can improve the robustness and readability of the code,
thus, I suggest replacing the numeric parameter with the macro.

Signed-off-by: Chuansheng Liu 
Signed-off-by: Baole Ni 
---
 .../lustre/lnet/klnds/socklnd/socklnd_modparams.c  | 56 +++---
 1 file changed, 28 insertions(+), 28 deletions(-)

diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_modparams.c 
b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_modparams.c
index 6329cbe..4136f60 100644
--- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_modparams.c
+++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_modparams.c
@@ -19,23 +19,23 @@
 #include "socklnd.h"
 
 static int sock_timeout = 50;
-module_param(sock_timeout, int, 0644);
+module_param(sock_timeout, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(sock_timeout, "dead socket timeout (seconds)");
 
 static int credits = 256;
-module_param(credits, int, 0444);
+module_param(credits, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(credits, "# concurrent sends");
 
 static int peer_credits = 8;
-module_param(peer_credits, int, 0444);
+module_param(peer_credits, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(peer_credits, "# concurrent sends to 1 peer");
 
 static int peer_buffer_credits;
-module_param(peer_buffer_credits, int, 0444);
+module_param(peer_buffer_credits, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(peer_buffer_credits, "# per-peer router buffer credits");
 
 static int peer_timeout = 180;
-module_param(peer_timeout, int, 0444);
+module_param(peer_timeout, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(peer_timeout, "Seconds without aliveness news to declare peer 
dead (<=0 to disable)");
 
 /*
@@ -43,99 +43,99 @@ MODULE_PARM_DESC(peer_timeout, "Seconds without aliveness 
news to declare peer d
  * we will estimate reasonable value based on CPUs if it's not set.
  */
 static unsigned int nscheds;
-module_param(nscheds, int, 0444);
+module_param(nscheds, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(nscheds, "# scheduler daemons in each pool while starting");
 
 static int nconnds = 4;
-module_param(nconnds, int, 0444);
+module_param(nconnds, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(nconnds, "# connection daemons while starting");
 
 static int nconnds_max = 64;
-module_param(nconnds_max, int, 0444);
+module_param(nconnds_max, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(nconnds_max, "max # connection daemons");
 
 static int min_reconnectms = 1000;
-module_param(min_reconnectms, int, 0644);
+module_param(min_reconnectms, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(min_reconnectms, "min connection retry interval (mS)");
 
 static int max_reconnectms = 6;
-module_param(max_reconnectms, int, 0644);
+module_param(max_reconnectms, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(max_reconnectms, "max connection retry interval (mS)");
 
 # define DEFAULT_EAGER_ACK 0
 static int eager_ack = DEFAULT_EAGER_ACK;
-module_param(eager_ack, int, 0644);
+module_param(eager_ack, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(eager_ack, "send tcp ack packets eagerly");
 
 static int typed_conns = 1;
-module_param(typed_conns, int, 0444);
+module_param(typed_conns, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(typed_conns, "use different sockets for bulk");
 
 static int min_bulk = 1 << 10;
-module_param(min_bulk, int, 0644);
+module_param(min_bulk, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(min_bulk, "smallest 'large' message");
 
 # define DEFAULT_BUFFER_SIZE 0
 static int tx_buffer_size = DEFAULT_BUFFER_SIZE;
-module_param(tx_buffer_size, int, 0644);
+module_param(tx_buffer_size, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(tx_buffer_size, "socket tx buffer size (0 for system 
default)");
 
 static int rx_buffer_size = DEFAULT_BUFFER_SIZE;
-module_param(rx_buffer_size, int, 0644);
+module_param(rx_buffer_size, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(rx_buffer_size, "socket rx buffer size (0 for system 
default)");
 
 static int nagle;
-module_param(nagle, int, 0644);
+module_param(nagle, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(nagle, "enable NAGLE?");
 
 static int round_robin = 1;
-module_param(round_robin, int, 0644);
+module_param(round_robin, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(round_robin, "Round robin for multiple interfaces");
 
 static int keepalive = 30;
-module_param(keepalive, int, 0644);
+module_param(keepalive, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(keepalive, "# seconds before send keepalive");
 
 static int keepalive_idle = 30;
-module_param

[PATCH 0926/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value
when calling a macro which is defined with a parameter for access permission.
As we know, these numeric value for access permission have had the 
corresponding macro,
and that using macro can improve the robustness and readability of the code,
thus, I suggest replacing the numeric parameter with the macro.

Signed-off-by: Chuansheng Liu 
Signed-off-by: Baole Ni 
---
 drivers/staging/lustre/lnet/libcfs/hash.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lnet/libcfs/hash.c 
b/drivers/staging/lustre/lnet/libcfs/hash.c
index cc45ed8..f4454d0 100644
--- a/drivers/staging/lustre/lnet/libcfs/hash.c
+++ b/drivers/staging/lustre/lnet/libcfs/hash.c
@@ -113,7 +113,7 @@
 
 #if CFS_HASH_DEBUG_LEVEL >= CFS_HASH_DEBUG_1
 static unsigned int warn_on_depth = 8;
-module_param(warn_on_depth, uint, 0644);
+module_param(warn_on_depth, uint, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(warn_on_depth, "warning when hash depth is high.");
 #endif
 
-- 
2.9.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 0927/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value
when calling a macro which is defined with a parameter for access permission.
As we know, these numeric value for access permission have had the 
corresponding macro,
and that using macro can improve the robustness and readability of the code,
thus, I suggest replacing the numeric parameter with the macro.

Signed-off-by: Chuansheng Liu 
Signed-off-by: Baole Ni 
---
 drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c 
b/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c
index b52518c5..ba42aae 100644
--- a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c
+++ b/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c
@@ -43,7 +43,7 @@
  * >1 : specify number of partitions
  */
 static int cpu_npartitions;
-module_param(cpu_npartitions, int, 0444);
+module_param(cpu_npartitions, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(cpu_npartitions, "# of CPU partitions");
 
 /**
@@ -58,7 +58,7 @@ MODULE_PARM_DESC(cpu_npartitions, "# of CPU partitions");
  * NB: If user specified cpu_pattern, cpu_npartitions will be ignored
  */
 static char*cpu_pattern = "";
-module_param(cpu_pattern, charp, 0444);
+module_param(cpu_pattern, charp, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(cpu_pattern, "CPU partitions pattern");
 
 struct cfs_cpt_data {
-- 
2.9.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 0923/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value
when calling a macro which is defined with a parameter for access permission.
As we know, these numeric value for access permission have had the 
corresponding macro,
and that using macro can improve the robustness and readability of the code,
thus, I suggest replacing the numeric parameter with the macro.

Signed-off-by: Chuansheng Liu 
Signed-off-by: Baole Ni 
---
 .../lustre/lnet/klnds/o2iblnd/o2iblnd_modparams.c  | 46 +++---
 1 file changed, 23 insertions(+), 23 deletions(-)

diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_modparams.c 
b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_modparams.c
index f8fdd4a..044d468 100644
--- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_modparams.c
+++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_modparams.c
@@ -41,15 +41,15 @@
 #include "o2iblnd.h"
 
 static int service = 987;
-module_param(service, int, 0444);
+module_param(service, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(service, "service number (within RDMA_PS_TCP)");
 
 static int cksum;
-module_param(cksum, int, 0644);
+module_param(cksum, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(cksum, "set non-zero to enable message (not RDMA) checksums");
 
 static int timeout = 50;
-module_param(timeout, int, 0644);
+module_param(timeout, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(timeout, "timeout (seconds)");
 
 /*
@@ -57,75 +57,75 @@ MODULE_PARM_DESC(timeout, "timeout (seconds)");
  * we will estimate reasonable value based on CPUs if it's set to zero.
  */
 static int nscheds;
-module_param(nscheds, int, 0444);
+module_param(nscheds, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(nscheds, "number of threads in each scheduler pool");
 
 /* NB: this value is shared by all CPTs, it can grow at runtime */
 static int ntx = 512;
-module_param(ntx, int, 0444);
+module_param(ntx, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(ntx, "# of message descriptors allocated for each pool");
 
 /* NB: this value is shared by all CPTs */
 static int credits = 256;
-module_param(credits, int, 0444);
+module_param(credits, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(credits, "# concurrent sends");
 
 static int peer_credits = 8;
-module_param(peer_credits, int, 0444);
+module_param(peer_credits, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(peer_credits, "# concurrent sends to 1 peer");
 
 static int peer_credits_hiw;
-module_param(peer_credits_hiw, int, 0444);
+module_param(peer_credits_hiw, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(peer_credits_hiw, "when eagerly to return credits");
 
 static int peer_buffer_credits;
-module_param(peer_buffer_credits, int, 0444);
+module_param(peer_buffer_credits, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(peer_buffer_credits, "# per-peer router buffer credits");
 
 static int peer_timeout = 180;
-module_param(peer_timeout, int, 0444);
+module_param(peer_timeout, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(peer_timeout, "Seconds without aliveness news to declare peer 
dead (<=0 to disable)");
 
 static char *ipif_name = "ib0";
-module_param(ipif_name, charp, 0444);
+module_param(ipif_name, charp, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(ipif_name, "IPoIB interface name");
 
 static int retry_count = 5;
-module_param(retry_count, int, 0644);
+module_param(retry_count, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(retry_count, "Retransmissions when no ACK received");
 
 static int rnr_retry_count = 6;
-module_param(rnr_retry_count, int, 0644);
+module_param(rnr_retry_count, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(rnr_retry_count, "RNR retransmissions");
 
 static int keepalive = 100;
-module_param(keepalive, int, 0644);
+module_param(keepalive, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(keepalive, "Idle time in seconds before sending a keepalive");
 
 static int ib_mtu;
-module_param(ib_mtu, int, 0444);
+module_param(ib_mtu, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(ib_mtu, "IB MTU 256/512/1024/2048/4096");
 
 static int concurrent_sends;
-module_param(concurrent_sends, int, 0444);
+module_param(concurrent_sends, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(concurrent_sends, "send work-queue sizing");
 
 static int map_on_demand;
-module_param(map_on_demand, int, 0444);
+module_param(map_on_demand, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(map_on_demand, "map on demand");
 
 /* NB: this value is shared by all CPTs, it can grow at runtime */
 static int fmr_pool_size = 512;
-module_param(fmr_pool_size, int, 0444);
+module_param(fmr_pool_size, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(fmr_pool_size, "size of fmr pool on each CPT (>= ntx / 4)");
 
 /* NB: this value is shared by all CPTs, it can grow at runtime */
 static int fmr_flush_trigger = 384;
-module_param(fmr_flush_tri

[PATCH 0925/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value
when calling a macro which is defined with a parameter for access permission.
As we know, these numeric value for access permission have had the 
corresponding macro,
and that using macro can improve the robustness and readability of the code,
thus, I suggest replacing the numeric parameter with the macro.

Signed-off-by: Chuansheng Liu 
Signed-off-by: Baole Ni 
---
 drivers/staging/lustre/lnet/libcfs/debug.c | 20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/lustre/lnet/libcfs/debug.c 
b/drivers/staging/lustre/lnet/libcfs/debug.c
index 8c260c3..4eca40f 100644
--- a/drivers/staging/lustre/lnet/libcfs/debug.c
+++ b/drivers/staging/lustre/lnet/libcfs/debug.c
@@ -48,13 +48,13 @@ static char debug_file_name[1024];
 
 unsigned int libcfs_subsystem_debug = ~0;
 EXPORT_SYMBOL(libcfs_subsystem_debug);
-module_param(libcfs_subsystem_debug, int, 0644);
+module_param(libcfs_subsystem_debug, int, S_IRUSR | S_IWUSR | S_IRGRP | 
S_IROTH);
 MODULE_PARM_DESC(libcfs_subsystem_debug, "Lustre kernel debug subsystem mask");
 
 unsigned int libcfs_debug = (D_CANTMASK |
 D_NETERROR | D_HA | D_CONFIG | D_IOCTL);
 EXPORT_SYMBOL(libcfs_debug);
-module_param(libcfs_debug, int, 0644);
+module_param(libcfs_debug, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(libcfs_debug, "Lustre kernel debug mask");
 
 static int libcfs_param_debug_mb_set(const char *val,
@@ -93,15 +93,15 @@ static struct kernel_param_ops param_ops_debugmb = {
__param_check(name, p, unsigned int)
 
 static unsigned int libcfs_debug_mb;
-module_param(libcfs_debug_mb, debugmb, 0644);
+module_param(libcfs_debug_mb, debugmb, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(libcfs_debug_mb, "Total debug buffer size.");
 
 unsigned int libcfs_printk = D_CANTMASK;
-module_param(libcfs_printk, uint, 0644);
+module_param(libcfs_printk, uint, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(libcfs_printk, "Lustre kernel debug console mask");
 
 unsigned int libcfs_console_ratelimit = 1;
-module_param(libcfs_console_ratelimit, uint, 0644);
+module_param(libcfs_console_ratelimit, uint, S_IRUSR | S_IWUSR | S_IRGRP | 
S_IROTH);
 MODULE_PARM_DESC(libcfs_console_ratelimit, "Lustre kernel debug console 
ratelimit (0 to disable)");
 
 static int param_set_delay_minmax(const char *val,
@@ -150,7 +150,7 @@ static struct kernel_param_ops param_ops_console_max_delay 
= {
 #define param_check_console_max_delay(name, p) \
__param_check(name, p, unsigned int)
 
-module_param(libcfs_console_max_delay, console_max_delay, 0644);
+module_param(libcfs_console_max_delay, console_max_delay, S_IRUSR | S_IWUSR | 
S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(libcfs_console_max_delay, "Lustre kernel debug console max 
delay (jiffies)");
 
 static int param_set_console_min_delay(const char *val,
@@ -168,7 +168,7 @@ static struct kernel_param_ops param_ops_console_min_delay 
= {
 #define param_check_console_min_delay(name, p) \
__param_check(name, p, unsigned int)
 
-module_param(libcfs_console_min_delay, console_min_delay, 0644);
+module_param(libcfs_console_min_delay, console_min_delay, S_IRUSR | S_IWUSR | 
S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(libcfs_console_min_delay, "Lustre kernel debug console min 
delay (jiffies)");
 
 static int param_set_uint_minmax(const char *val,
@@ -201,7 +201,7 @@ static struct kernel_param_ops param_ops_uintpos = {
__param_check(name, p, unsigned int)
 
 unsigned int libcfs_console_backoff = CDEBUG_DEFAULT_BACKOFF;
-module_param(libcfs_console_backoff, uintpos, 0644);
+module_param(libcfs_console_backoff, uintpos, S_IRUSR | S_IWUSR | S_IRGRP | 
S_IROTH);
 MODULE_PARM_DESC(libcfs_console_backoff, "Lustre kernel debug console backoff 
factor");
 
 unsigned int libcfs_debug_binary = 1;
@@ -213,7 +213,7 @@ unsigned int libcfs_catastrophe;
 EXPORT_SYMBOL(libcfs_catastrophe);
 
 unsigned int libcfs_panic_on_lbug = 1;
-module_param(libcfs_panic_on_lbug, uint, 0644);
+module_param(libcfs_panic_on_lbug, uint, S_IRUSR | S_IWUSR | S_IRGRP | 
S_IROTH);
 MODULE_PARM_DESC(libcfs_panic_on_lbug, "Lustre kernel panic on LBUG");
 
 static wait_queue_head_t debug_ctlwq;
@@ -222,7 +222,7 @@ char libcfs_debug_file_path_arr[PATH_MAX] = 
LIBCFS_DEBUG_FILE_PATH_DEFAULT;
 
 /* We need to pass a pointer here, but elsewhere this must be a const */
 static char *libcfs_debug_file_path;
-module_param(libcfs_debug_file_path, charp, 0644);
+module_param(libcfs_debug_file_path, charp, S_IRUSR | S_IWUSR | S_IRGRP | 
S_IROTH);
 MODULE_PARM_DESC(libcfs_debug_file_path,
 "Path for dumping debug logs, set 'NONE' to prevent log 
dumping");
 
-- 
2.9.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 0928/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value
when calling a macro which is defined with a parameter for access permission.
As we know, these numeric value for access permission have had the 
corresponding macro,
and that using macro can improve the robustness and readability of the code,
thus, I suggest replacing the numeric parameter with the macro.

Signed-off-by: Chuansheng Liu 
Signed-off-by: Baole Ni 
---
 drivers/staging/lustre/lnet/lnet/acceptor.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/lustre/lnet/lnet/acceptor.c 
b/drivers/staging/lustre/lnet/lnet/acceptor.c
index 1452bb3..a7c3a58 100644
--- a/drivers/staging/lustre/lnet/lnet/acceptor.c
+++ b/drivers/staging/lustre/lnet/lnet/acceptor.c
@@ -67,13 +67,13 @@ lnet_accept_magic(__u32 magic, __u32 constant)
 
 static char *accept = "secure";
 
-module_param(accept, charp, 0444);
+module_param(accept, charp, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(accept, "Accept connections (secure|all|none)");
-module_param(accept_port, int, 0444);
+module_param(accept_port, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(accept_port, "Acceptor's port (same on all nodes)");
-module_param(accept_backlog, int, 0444);
+module_param(accept_backlog, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(accept_backlog, "Acceptor's listen backlog");
-module_param(accept_timeout, int, 0644);
+module_param(accept_timeout, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(accept_timeout, "Acceptor's timeout (seconds)");
 
 static char *accept_type;
-- 
2.9.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 0931/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value
when calling a macro which is defined with a parameter for access permission.
As we know, these numeric value for access permission have had the 
corresponding macro,
and that using macro can improve the robustness and readability of the code,
thus, I suggest replacing the numeric parameter with the macro.

Signed-off-by: Chuansheng Liu 
Signed-off-by: Baole Ni 
---
 drivers/staging/lustre/lnet/lnet/lib-ptl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lnet/lnet/lib-ptl.c 
b/drivers/staging/lustre/lnet/lnet/lib-ptl.c
index 3947e8b..c5029d1 100644
--- a/drivers/staging/lustre/lnet/lnet/lib-ptl.c
+++ b/drivers/staging/lustre/lnet/lnet/lib-ptl.c
@@ -35,7 +35,7 @@
 
 /* NB: add /proc interfaces in upcoming patches */
 int portal_rotor = LNET_PTL_ROTOR_HASH_RT;
-module_param(portal_rotor, int, 0644);
+module_param(portal_rotor, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(portal_rotor, "redirect PUTs to different cpu-partitions");
 
 static int
-- 
2.9.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 0932/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value
when calling a macro which is defined with a parameter for access permission.
As we know, these numeric value for access permission have had the 
corresponding macro,
and that using macro can improve the robustness and readability of the code,
thus, I suggest replacing the numeric parameter with the macro.

Signed-off-by: Chuansheng Liu 
Signed-off-by: Baole Ni 
---
 drivers/staging/lustre/lnet/lnet/module.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lnet/lnet/module.c 
b/drivers/staging/lustre/lnet/lnet/module.c
index 246b5c1..8ed58fc 100644
--- a/drivers/staging/lustre/lnet/lnet/module.c
+++ b/drivers/staging/lustre/lnet/lnet/module.c
@@ -39,7 +39,7 @@
 #include "../../include/linux/lnet/lib-dlc.h"
 
 static int config_on_load;
-module_param(config_on_load, int, 0444);
+module_param(config_on_load, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(config_on_load, "configure network at module load");
 
 static struct mutex lnet_config_mutex;
-- 
2.9.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 0929/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value
when calling a macro which is defined with a parameter for access permission.
As we know, these numeric value for access permission have had the 
corresponding macro,
and that using macro can improve the robustness and readability of the code,
thus, I suggest replacing the numeric parameter with the macro.

Signed-off-by: Chuansheng Liu 
Signed-off-by: Baole Ni 
---
 drivers/staging/lustre/lnet/lnet/api-ni.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/lustre/lnet/lnet/api-ni.c 
b/drivers/staging/lustre/lnet/lnet/api-ni.c
index fe0dbe7..7a35c78 100644
--- a/drivers/staging/lustre/lnet/lnet/api-ni.c
+++ b/drivers/staging/lustre/lnet/lnet/api-ni.c
@@ -47,19 +47,19 @@ lnet_t the_lnet;   /* THE state of the 
network */
 EXPORT_SYMBOL(the_lnet);
 
 static char *ip2nets = "";
-module_param(ip2nets, charp, 0444);
+module_param(ip2nets, charp, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(ip2nets, "LNET network <- IP table");
 
 static char *networks = "";
-module_param(networks, charp, 0444);
+module_param(networks, charp, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(networks, "local networks");
 
 static char *routes = "";
-module_param(routes, charp, 0444);
+module_param(routes, charp, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(routes, "routes to non-local networks");
 
 static int rnet_htable_size = LNET_REMOTE_NETS_HASH_DEFAULT;
-module_param(rnet_htable_size, int, 0444);
+module_param(rnet_htable_size, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(rnet_htable_size, "size of remote network hash table");
 
 static int lnet_ping(lnet_process_id_t id, int timeout_ms,
-- 
2.9.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 0930/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value
when calling a macro which is defined with a parameter for access permission.
As we know, these numeric value for access permission have had the 
corresponding macro,
and that using macro can improve the robustness and readability of the code,
thus, I suggest replacing the numeric parameter with the macro.

Signed-off-by: Chuansheng Liu 
Signed-off-by: Baole Ni 
---
 drivers/staging/lustre/lnet/lnet/lib-move.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lnet/lnet/lib-move.c 
b/drivers/staging/lustre/lnet/lnet/lib-move.c
index c5d5bed..80d581c 100644
--- a/drivers/staging/lustre/lnet/lnet/lib-move.c
+++ b/drivers/staging/lustre/lnet/lnet/lib-move.c
@@ -43,7 +43,7 @@
 #include "../../include/linux/lnet/lib-lnet.h"
 
 static int local_nid_dist_zero = 1;
-module_param(local_nid_dist_zero, int, 0444);
+module_param(local_nid_dist_zero, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(local_nid_dist_zero, "Reserved");
 
 int
-- 
2.9.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 0933/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value
when calling a macro which is defined with a parameter for access permission.
As we know, these numeric value for access permission have had the 
corresponding macro,
and that using macro can improve the robustness and readability of the code,
thus, I suggest replacing the numeric parameter with the macro.

Signed-off-by: Chuansheng Liu 
Signed-off-by: Baole Ni 
---
 drivers/staging/lustre/lnet/lnet/router.c | 22 +++---
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/lustre/lnet/lnet/router.c 
b/drivers/staging/lustre/lnet/lnet/router.c
index b01dc42..bdb40e7 100644
--- a/drivers/staging/lustre/lnet/lnet/router.c
+++ b/drivers/staging/lustre/lnet/lnet/router.c
@@ -31,24 +31,24 @@
 PAGE_SHIFT)
 
 static char *forwarding = "";
-module_param(forwarding, charp, 0444);
+module_param(forwarding, charp, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(forwarding, "Explicitly enable/disable forwarding between 
networks");
 
 static int tiny_router_buffers;
-module_param(tiny_router_buffers, int, 0444);
+module_param(tiny_router_buffers, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(tiny_router_buffers, "# of 0 payload messages to buffer in 
the router");
 static int small_router_buffers;
-module_param(small_router_buffers, int, 0444);
+module_param(small_router_buffers, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(small_router_buffers, "# of small (1 page) messages to buffer 
in the router");
 static int large_router_buffers;
-module_param(large_router_buffers, int, 0444);
+module_param(large_router_buffers, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(large_router_buffers, "# of large messages to buffer in the 
router");
 static int peer_buffer_credits;
-module_param(peer_buffer_credits, int, 0444);
+module_param(peer_buffer_credits, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(peer_buffer_credits, "# router buffer credits per peer");
 
 static int auto_down = 1;
-module_param(auto_down, int, 0444);
+module_param(auto_down, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(auto_down, "Automatically mark peers down on comms error");
 
 int
@@ -71,23 +71,23 @@ lnet_peer_buffer_credits(lnet_ni_t *ni)
 static int lnet_router_checker(void *);
 
 static int check_routers_before_use;
-module_param(check_routers_before_use, int, 0444);
+module_param(check_routers_before_use, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(check_routers_before_use, "Assume routers are down and ping 
them before use");
 
 int avoid_asym_router_failure = 1;
-module_param(avoid_asym_router_failure, int, 0644);
+module_param(avoid_asym_router_failure, int, S_IRUSR | S_IWUSR | S_IRGRP | 
S_IROTH);
 MODULE_PARM_DESC(avoid_asym_router_failure, "Avoid asymmetrical router 
failures (0 to disable)");
 
 static int dead_router_check_interval = 60;
-module_param(dead_router_check_interval, int, 0644);
+module_param(dead_router_check_interval, int, S_IRUSR | S_IWUSR | S_IRGRP | 
S_IROTH);
 MODULE_PARM_DESC(dead_router_check_interval, "Seconds between dead router 
health checks (<= 0 to disable)");
 
 static int live_router_check_interval = 60;
-module_param(live_router_check_interval, int, 0644);
+module_param(live_router_check_interval, int, S_IRUSR | S_IWUSR | S_IRGRP | 
S_IROTH);
 MODULE_PARM_DESC(live_router_check_interval, "Seconds between live router 
health checks (<= 0 to disable)");
 
 static int router_ping_timeout = 50;
-module_param(router_ping_timeout, int, 0644);
+module_param(router_ping_timeout, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(router_ping_timeout, "Seconds to wait for the reply to a 
router health query");
 
 int
-- 
2.9.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 0935/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value
when calling a macro which is defined with a parameter for access permission.
As we know, these numeric value for access permission have had the 
corresponding macro,
and that using macro can improve the robustness and readability of the code,
thus, I suggest replacing the numeric parameter with the macro.

Signed-off-by: Chuansheng Liu 
Signed-off-by: Baole Ni 
---
 drivers/staging/lustre/lnet/selftest/framework.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/lustre/lnet/selftest/framework.c 
b/drivers/staging/lustre/lnet/selftest/framework.c
index 30e4f71..3708ff5 100644
--- a/drivers/staging/lustre/lnet/selftest/framework.c
+++ b/drivers/staging/lustre/lnet/selftest/framework.c
@@ -46,11 +46,11 @@
 lst_sid_t LST_INVALID_SID = {LNET_NID_ANY, -1};
 
 static int session_timeout = 100;
-module_param(session_timeout, int, 0444);
+module_param(session_timeout, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(session_timeout, "test session timeout in seconds (100 by 
default, 0 == never)");
 
 static int rpc_timeout = 64;
-module_param(rpc_timeout, int, 0644);
+module_param(rpc_timeout, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(rpc_timeout, "rpc timeout in seconds (64 by default, 0 == 
never)");
 
 #define sfw_unpack_id(id)  \
-- 
2.9.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 0934/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value
when calling a macro which is defined with a parameter for access permission.
As we know, these numeric value for access permission have had the 
corresponding macro,
and that using macro can improve the robustness and readability of the code,
thus, I suggest replacing the numeric parameter with the macro.

Signed-off-by: Chuansheng Liu 
Signed-off-by: Baole Ni 
---
 drivers/staging/lustre/lnet/selftest/brw_test.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/lustre/lnet/selftest/brw_test.c 
b/drivers/staging/lustre/lnet/selftest/brw_test.c
index a63d86c..99cb974 100644
--- a/drivers/staging/lustre/lnet/selftest/brw_test.c
+++ b/drivers/staging/lustre/lnet/selftest/brw_test.c
@@ -41,11 +41,11 @@
 #include "selftest.h"
 
 static int brw_srv_workitems = SFW_TEST_WI_MAX;
-module_param(brw_srv_workitems, int, 0644);
+module_param(brw_srv_workitems, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(brw_srv_workitems, "# BRW server workitems");
 
 static int brw_inject_errors;
-module_param(brw_inject_errors, int, 0644);
+module_param(brw_inject_errors, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(brw_inject_errors, "# data errors to inject randomly, zero by 
default");
 
 static void
-- 
2.9.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 0936/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value
when calling a macro which is defined with a parameter for access permission.
As we know, these numeric value for access permission have had the 
corresponding macro,
and that using macro can improve the robustness and readability of the code,
thus, I suggest replacing the numeric parameter with the macro.

Signed-off-by: Chuansheng Liu 
Signed-off-by: Baole Ni 
---
 drivers/staging/lustre/lnet/selftest/ping_test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lnet/selftest/ping_test.c 
b/drivers/staging/lustre/lnet/selftest/ping_test.c
index ad26fe9..d7df431 100644
--- a/drivers/staging/lustre/lnet/selftest/ping_test.c
+++ b/drivers/staging/lustre/lnet/selftest/ping_test.c
@@ -45,7 +45,7 @@
 #define LST_PING_TEST_MAGIC0xbabeface
 
 static int ping_srv_workitems = SFW_TEST_WI_MAX;
-module_param(ping_srv_workitems, int, 0644);
+module_param(ping_srv_workitems, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(ping_srv_workitems, "# PING server workitems");
 
 struct lst_ping_data {
-- 
2.9.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 0938/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value
when calling a macro which is defined with a parameter for access permission.
As we know, these numeric value for access permission have had the 
corresponding macro,
and that using macro can improve the robustness and readability of the code,
thus, I suggest replacing the numeric parameter with the macro.

Signed-off-by: Chuansheng Liu 
Signed-off-by: Baole Ni 
---
 drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c 
b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c
index 107314e..4812c1f 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c
@@ -68,7 +68,7 @@
 #include "ldlm_internal.h"
 
 int ldlm_enqueue_min = OBD_TIMEOUT_DEFAULT;
-module_param(ldlm_enqueue_min, int, 0644);
+module_param(ldlm_enqueue_min, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(ldlm_enqueue_min, "lock enqueue timeout minimum");
 
 /* in client side, whether the cached locks will be canceled before replay */
-- 
2.9.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 0941/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value
when calling a macro which is defined with a parameter for access permission.
As we know, these numeric value for access permission have had the 
corresponding macro,
and that using macro can improve the robustness and readability of the code,
thus, I suggest replacing the numeric parameter with the macro.

Signed-off-by: Chuansheng Liu 
Signed-off-by: Baole Ni 
---
 drivers/staging/lustre/lustre/obdclass/lu_object.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/obdclass/lu_object.c 
b/drivers/staging/lustre/lustre/obdclass/lu_object.c
index e043857..3d9bc20 100644
--- a/drivers/staging/lustre/lustre/obdclass/lu_object.c
+++ b/drivers/staging/lustre/lustre/obdclass/lu_object.c
@@ -818,7 +818,7 @@ enum {
 };
 
 static unsigned int lu_cache_percent = LU_CACHE_PERCENT_DEFAULT;
-module_param(lu_cache_percent, int, 0644);
+module_param(lu_cache_percent, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(lu_cache_percent, "Percentage of memory to be used as 
lu_object cache");
 
 /**
-- 
2.9.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 0942/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value
when calling a macro which is defined with a parameter for access permission.
As we know, these numeric value for access permission have had the 
corresponding macro,
and that using macro can improve the robustness and readability of the code,
thus, I suggest replacing the numeric parameter with the macro.

Signed-off-by: Chuansheng Liu 
Signed-off-by: Baole Ni 
---
 drivers/staging/lustre/lustre/osc/osc_request.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/osc/osc_request.c 
b/drivers/staging/lustre/lustre/osc/osc_request.c
index 47417f8..ac9e12d 100644
--- a/drivers/staging/lustre/lustre/osc/osc_request.c
+++ b/drivers/staging/lustre/lustre/osc/osc_request.c
@@ -59,7 +59,7 @@ struct ptlrpc_request_pool *osc_rq_pool;
 
 /* max memory used for request pool, unit is MB */
 static unsigned int osc_reqpool_mem_max = 5;
-module_param(osc_reqpool_mem_max, uint, 0444);
+module_param(osc_reqpool_mem_max, uint, S_IRUSR | S_IRGRP | S_IROTH);
 
 struct osc_brw_async_args {
struct obdo   *aa_oa;
-- 
2.9.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 0940/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value
when calling a macro which is defined with a parameter for access permission.
As we know, these numeric value for access permission have had the 
corresponding macro,
and that using macro can improve the robustness and readability of the code,
thus, I suggest replacing the numeric parameter with the macro.

Signed-off-by: Chuansheng Liu 
Signed-off-by: Baole Ni 
---
 drivers/staging/lustre/lustre/obdclass/lprocfs_status.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c 
b/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c
index 5a1eae1..8ede6c8 100644
--- a/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c
+++ b/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c
@@ -271,7 +271,7 @@ int lprocfs_write_frac_helper(const char __user *buffer, 
unsigned long count,
 EXPORT_SYMBOL(lprocfs_write_frac_helper);
 
 static int lprocfs_no_percpu_stats;
-module_param(lprocfs_no_percpu_stats, int, 0644);
+module_param(lprocfs_no_percpu_stats, int, S_IRUSR | S_IWUSR | S_IRGRP | 
S_IROTH);
 MODULE_PARM_DESC(lprocfs_no_percpu_stats, "Do not alloc percpu data for 
lprocfs stats");
 
 #define MAX_STRING_SIZE 128
-- 
2.9.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 0937/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value
when calling a macro which is defined with a parameter for access permission.
As we know, these numeric value for access permission have had the 
corresponding macro,
and that using macro can improve the robustness and readability of the code,
thus, I suggest replacing the numeric parameter with the macro.

Signed-off-by: Chuansheng Liu 
Signed-off-by: Baole Ni 
---
 drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c 
b/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c
index ab739f0..8d95385 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c
@@ -48,11 +48,11 @@
 #include "ldlm_internal.h"
 
 static int ldlm_num_threads;
-module_param(ldlm_num_threads, int, 0444);
+module_param(ldlm_num_threads, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(ldlm_num_threads, "number of DLM service threads to start");
 
 static char *ldlm_cpts;
-module_param(ldlm_cpts, charp, 0444);
+module_param(ldlm_cpts, charp, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(ldlm_cpts, "CPU partitions ldlm threads should run on");
 
 static struct mutexldlm_ref_mutex;
-- 
2.9.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 0939/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value
when calling a macro which is defined with a parameter for access permission.
As we know, these numeric value for access permission have had the 
corresponding macro,
and that using macro can improve the robustness and readability of the code,
thus, I suggest replacing the numeric parameter with the macro.

Signed-off-by: Chuansheng Liu 
Signed-off-by: Baole Ni 
---
 drivers/staging/lustre/lustre/llite/lloop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/llite/lloop.c 
b/drivers/staging/lustre/lustre/llite/lloop.c
index 813a9a3..5f751e4 100644
--- a/drivers/staging/lustre/lustre/llite/lloop.c
+++ b/drivers/staging/lustre/lustre/llite/lloop.c
@@ -872,7 +872,7 @@ static void lloop_exit(void)
kfree(loop_dev);
 }
 
-module_param(max_loop, int, 0444);
+module_param(max_loop, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(max_loop, "maximum of lloop_device");
 MODULE_AUTHOR("OpenSFS, Inc. ");
 MODULE_DESCRIPTION("Lustre virtual block device");
-- 
2.9.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 0943/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value
when calling a macro which is defined with a parameter for access permission.
As we know, these numeric value for access permission have had the 
corresponding macro,
and that using macro can improve the robustness and readability of the code,
thus, I suggest replacing the numeric parameter with the macro.

Signed-off-by: Chuansheng Liu 
Signed-off-by: Baole Ni 
---
 drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c 
b/drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c
index 76a355a..6961762 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c
@@ -85,7 +85,7 @@ struct ptlrpcd {
  * is used to derive a setting for ptlrpcd_per_cpt_max.
  */
 static int max_ptlrpcds;
-module_param(max_ptlrpcds, int, 0644);
+module_param(max_ptlrpcds, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(max_ptlrpcds, "Max ptlrpcd thread count to be started.");
 
 /*
@@ -95,7 +95,7 @@ MODULE_PARM_DESC(max_ptlrpcds, "Max ptlrpcd thread count to 
be started.");
  * is used to derive a setting for ptlrpcd_partner_group_size.
  */
 static int ptlrpcd_bind_policy;
-module_param(ptlrpcd_bind_policy, int, 0644);
+module_param(ptlrpcd_bind_policy, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(ptlrpcd_bind_policy,
 "Ptlrpcd threads binding mode (obsolete).");
 
@@ -104,7 +104,7 @@ MODULE_PARM_DESC(ptlrpcd_bind_policy,
  * in a CPT.
  */
 static int ptlrpcd_per_cpt_max;
-module_param(ptlrpcd_per_cpt_max, int, 0644);
+module_param(ptlrpcd_per_cpt_max, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(ptlrpcd_per_cpt_max,
 "Max ptlrpcd thread count to be started per cpt.");
 
@@ -115,7 +115,7 @@ MODULE_PARM_DESC(ptlrpcd_per_cpt_max,
  * a CPT partners of each other.
  */
 static int ptlrpcd_partner_group_size;
-module_param(ptlrpcd_partner_group_size, int, 0644);
+module_param(ptlrpcd_partner_group_size, int, S_IRUSR | S_IWUSR | S_IRGRP | 
S_IROTH);
 MODULE_PARM_DESC(ptlrpcd_partner_group_size,
 "Number of ptlrpcd threads in a partner group.");
 
@@ -136,7 +136,7 @@ MODULE_PARM_DESC(ptlrpcd_partner_group_size,
  *   run ptlrpcd threads on CPTS 0, 1, 2, 3, 5, and 7.
  */
 static char *ptlrpcd_cpts;
-module_param(ptlrpcd_cpts, charp, 0644);
+module_param(ptlrpcd_cpts, charp, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(ptlrpcd_cpts,
 "CPU partitions ptlrpcd threads should run in");
 
-- 
2.9.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 0944/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value
when calling a macro which is defined with a parameter for access permission.
As we know, these numeric value for access permission have had the 
corresponding macro,
and that using macro can improve the robustness and readability of the code,
thus, I suggest replacing the numeric parameter with the macro.

Signed-off-by: Chuansheng Liu 
Signed-off-by: Baole Ni 
---
 drivers/staging/lustre/lustre/ptlrpc/service.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/lustre/lustre/ptlrpc/service.c 
b/drivers/staging/lustre/lustre/ptlrpc/service.c
index 17c7b97..1cc3cd3 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/service.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/service.c
@@ -44,18 +44,18 @@
 
 /* The following are visible and mutable through /sys/module/ptlrpc */
 int test_req_buffer_pressure;
-module_param(test_req_buffer_pressure, int, 0444);
+module_param(test_req_buffer_pressure, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(test_req_buffer_pressure, "set non-zero to put pressure on 
request buffer pools");
-module_param(at_min, int, 0644);
+module_param(at_min, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(at_min, "Adaptive timeout minimum (sec)");
-module_param(at_max, int, 0644);
+module_param(at_max, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(at_max, "Adaptive timeout maximum (sec)");
-module_param(at_history, int, 0644);
+module_param(at_history, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(at_history,
 "Adaptive timeouts remember the slowest event that took place 
within this period (sec)");
-module_param(at_early_margin, int, 0644);
+module_param(at_early_margin, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(at_early_margin, "How soon before an RPC deadline to send an 
early reply");
-module_param(at_extra, int, 0644);
+module_param(at_extra, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(at_extra, "How much extra time to give with each early 
reply");
 
 /* forward ref */
-- 
2.9.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 0946/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value
when calling a macro which is defined with a parameter for access permission.
As we know, these numeric value for access permission have had the 
corresponding macro,
and that using macro can improve the robustness and readability of the code,
thus, I suggest replacing the numeric parameter with the macro.

Signed-off-by: Chuansheng Liu 
Signed-off-by: Baole Ni 
---
 drivers/staging/media/lirc/lirc_zilog.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/media/lirc/lirc_zilog.c 
b/drivers/staging/media/lirc/lirc_zilog.c
index 3551aed..d080eef 100644
--- a/drivers/staging/media/lirc/lirc_zilog.c
+++ b/drivers/staging/media/lirc/lirc_zilog.c
@@ -1685,11 +1685,11 @@ MODULE_LICENSE("GPL");
 /* for compat with old name, which isn't all that accurate anymore */
 MODULE_ALIAS("lirc_pvr150");
 
-module_param(minor, int, 0444);
+module_param(minor, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(minor, "Preferred minor device number");
 
-module_param(debug, bool, 0644);
+module_param(debug, bool, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(debug, "Enable debugging messages");
 
-module_param(tx_only, bool, 0644);
+module_param(tx_only, bool, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(tx_only, "Only handle the IR transmit function");
-- 
2.9.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 0952/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value
when calling a macro which is defined with a parameter for access permission.
As we know, these numeric value for access permission have had the 
corresponding macro,
and that using macro can improve the robustness and readability of the code,
thus, I suggest replacing the numeric parameter with the macro.

Signed-off-by: Chuansheng Liu 
Signed-off-by: Baole Ni 
---
 drivers/staging/rtl8192u/ieee80211/ieee80211_module.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_module.c 
b/drivers/staging/rtl8192u/ieee80211/ieee80211_module.c
index 30fff6c..12789c4 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_module.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_module.c
@@ -303,6 +303,6 @@ void __exit ieee80211_debug_exit(void)
}
 }
 
-module_param(debug, int, 0444);
+module_param(debug, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(debug, "debug output mask");
 #endif
-- 
2.9.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 0945/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value
when calling a macro which is defined with a parameter for access permission.
As we know, these numeric value for access permission have had the 
corresponding macro,
and that using macro can improve the robustness and readability of the code,
thus, I suggest replacing the numeric parameter with the macro.

Signed-off-by: Chuansheng Liu 
Signed-off-by: Baole Ni 
---
 drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c 
b/drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c
index bf077f8..a952fd6 100644
--- a/drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c
+++ b/drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c
@@ -75,7 +75,7 @@ static bool debug;
 static bool interface;
 
 module_param(interface, bool, S_IRUGO);
-module_param(debug, bool, 0644);
+module_param(debug, bool, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 
 /**
  * VPFE capture can be used for capturing video such as from TVP5146 or TVP7002
-- 
2.9.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 0950/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value
when calling a macro which is defined with a parameter for access permission.
As we know, these numeric value for access permission have had the 
corresponding macro,
and that using macro can improve the robustness and readability of the code,
thus, I suggest replacing the numeric parameter with the macro.

Signed-off-by: Chuansheng Liu 
Signed-off-by: Baole Ni 
---
 drivers/staging/olpc_dcon/olpc_dcon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/olpc_dcon/olpc_dcon.c 
b/drivers/staging/olpc_dcon/olpc_dcon.c
index f45b2ef..888016c 100644
--- a/drivers/staging/olpc_dcon/olpc_dcon.c
+++ b/drivers/staging/olpc_dcon/olpc_dcon.c
@@ -35,7 +35,7 @@
 /* Module definitions */
 
 static ushort resumeline = 898;
-module_param(resumeline, ushort, 0444);
+module_param(resumeline, ushort, S_IRUSR | S_IRGRP | S_IROTH);
 
 static struct dcon_platform_data *pdata;
 
-- 
2.9.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 0951/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value
when calling a macro which is defined with a parameter for access permission.
As we know, these numeric value for access permission have had the 
corresponding macro,
and that using macro can improve the robustness and readability of the code,
thus, I suggest replacing the numeric parameter with the macro.

Signed-off-by: Chuansheng Liu 
Signed-off-by: Baole Ni 
---
 drivers/staging/rtl8188eu/os_dep/os_intfs.c | 76 ++---
 1 file changed, 38 insertions(+), 38 deletions(-)

diff --git a/drivers/staging/rtl8188eu/os_dep/os_intfs.c 
b/drivers/staging/rtl8188eu/os_dep/os_intfs.c
index ae2caff..c4d6f2e 100644
--- a/drivers/staging/rtl8188eu/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8188eu/os_dep/os_intfs.c
@@ -53,7 +53,7 @@ static int rtw_ips_mode = IPS_NORMAL;
 
 static int rtw_smart_ps = 2;
 
-module_param(rtw_ips_mode, int, 0644);
+module_param(rtw_ips_mode, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(rtw_ips_mode, "The default IPS mode");
 
 static int rtw_debug = 1;
@@ -120,66 +120,66 @@ int rtw_mc2u_disable;
 static int rtw_80211d;
 
 static char *ifname = "wlan%d";
-module_param(ifname, charp, 0644);
+module_param(ifname, charp, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(ifname, "The default name to allocate for first interface");
 
 static char *if2name = "wlan%d";
-module_param(if2name, charp, 0644);
+module_param(if2name, charp, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(if2name, "The default name to allocate for second interface");
 
 /* temp mac address if users want to use instead of the mac address in Efuse */
 char *rtw_initmac;
 
-module_param(rtw_initmac, charp, 0644);
-module_param(rtw_channel_plan, int, 0644);
-module_param(rtw_chip_version, int, 0644);
-module_param(rtw_rfintfs, int, 0644);
-module_param(rtw_lbkmode, int, 0644);
-module_param(rtw_network_mode, int, 0644);
-module_param(rtw_channel, int, 0644);
-module_param(rtw_wmm_enable, int, 0644);
-module_param(rtw_vrtl_carrier_sense, int, 0644);
-module_param(rtw_vcs_type, int, 0644);
-module_param(rtw_busy_thresh, int, 0644);
-module_param(rtw_ht_enable, int, 0644);
-module_param(rtw_cbw40_enable, int, 0644);
-module_param(rtw_ampdu_enable, int, 0644);
-module_param(rtw_rx_stbc, int, 0644);
-module_param(rtw_ampdu_amsdu, int, 0644);
-module_param(rtw_lowrate_two_xmit, int, 0644);
-module_param(rtw_rf_config, int, 0644);
-module_param(rtw_power_mgnt, int, 0644);
-module_param(rtw_smart_ps, int, 0644);
-module_param(rtw_low_power, int, 0644);
-module_param(rtw_wifi_spec, int, 0644);
-module_param(rtw_antdiv_cfg, int, 0644);
-module_param(rtw_antdiv_type, int, 0644);
-module_param(rtw_enusbss, int, 0644);
-module_param(rtw_hwpdn_mode, int, 0644);
-module_param(rtw_hwpwrp_detect, int, 0644);
-module_param(rtw_hw_wps_pbc, int, 0644);
+module_param(rtw_initmac, charp, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(rtw_channel_plan, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(rtw_chip_version, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(rtw_rfintfs, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(rtw_lbkmode, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(rtw_network_mode, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(rtw_channel, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(rtw_wmm_enable, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(rtw_vrtl_carrier_sense, int, S_IRUSR | S_IWUSR | S_IRGRP | 
S_IROTH);
+module_param(rtw_vcs_type, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(rtw_busy_thresh, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(rtw_ht_enable, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(rtw_cbw40_enable, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(rtw_ampdu_enable, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(rtw_rx_stbc, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(rtw_ampdu_amsdu, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(rtw_lowrate_two_xmit, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(rtw_rf_config, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(rtw_power_mgnt, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(rtw_smart_ps, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(rtw_low_power, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(rtw_wifi_spec, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(rtw_antdiv_cfg, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(rtw_antdiv_type, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(rtw_enusbss, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(rtw_hwpdn_mode, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(rtw_hwpwrp_detect, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(rtw_hw_wps_pbc, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 
 s

[PATCH 0948/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value
when calling a macro which is defined with a parameter for access permission.
As we know, these numeric value for access permission have had the 
corresponding macro,
and that using macro can improve the robustness and readability of the code,
thus, I suggest replacing the numeric parameter with the macro.

Signed-off-by: Chuansheng Liu 
Signed-off-by: Baole Ni 
---
 drivers/staging/most/hdm-i2c/hdm_i2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/most/hdm-i2c/hdm_i2c.c 
b/drivers/staging/most/hdm-i2c/hdm_i2c.c
index ba0263b..ed28058 100644
--- a/drivers/staging/most/hdm-i2c/hdm_i2c.c
+++ b/drivers/staging/most/hdm-i2c/hdm_i2c.c
@@ -42,7 +42,7 @@ MODULE_PARM_DESC(polling_req, "Request Polling. Default = 0 
(use irq)");
 
 /* Polling Rate */
 static int scan_rate = 100;
-module_param(scan_rate, int, 0644);
+module_param(scan_rate, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(scan_rate, "Polling rate in times/sec. Default = 100");
 
 struct hdm_i2c {
-- 
2.9.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 0947/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value
when calling a macro which is defined with a parameter for access permission.
As we know, these numeric value for access permission have had the 
corresponding macro,
and that using macro can improve the robustness and readability of the code,
thus, I suggest replacing the numeric parameter with the macro.

Signed-off-by: Chuansheng Liu 
Signed-off-by: Baole Ni 
---
 drivers/staging/media/omap1/omap1_camera.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/media/omap1/omap1_camera.c 
b/drivers/staging/media/omap1/omap1_camera.c
index 54b8dd2..6e125dc 100644
--- a/drivers/staging/media/omap1/omap1_camera.c
+++ b/drivers/staging/media/omap1/omap1_camera.c
@@ -1692,7 +1692,7 @@ static struct platform_driver omap1_cam_driver = {
 
 module_platform_driver(omap1_cam_driver);
 
-module_param(sg_mode, bool, 0644);
+module_param(sg_mode, bool, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(sg_mode, "videobuf mode, 0: dma-contig (default), 1: dma-sg");
 
 MODULE_DESCRIPTION("OMAP1 Camera Interface driver");
-- 
2.9.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 0953/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value
when calling a macro which is defined with a parameter for access permission.
As we know, these numeric value for access permission have had the 
corresponding macro,
and that using macro can improve the robustness and readability of the code,
thus, I suggest replacing the numeric parameter with the macro.

Signed-off-by: Chuansheng Liu 
Signed-off-by: Baole Ni 
---
 drivers/staging/rtl8712/os_intfs.c | 40 +++---
 1 file changed, 20 insertions(+), 20 deletions(-)

diff --git a/drivers/staging/rtl8712/os_intfs.c 
b/drivers/staging/rtl8712/os_intfs.c
index 57211f7..d62009c 100644
--- a/drivers/staging/rtl8712/os_intfs.c
+++ b/drivers/staging/rtl8712/os_intfs.c
@@ -98,26 +98,26 @@ static char *initmac;
 static int wifi_test;
 
 module_param_string(ifname, ifname, sizeof(ifname), S_IRUGO | S_IWUSR);
-module_param(wifi_test, int, 0644);
-module_param(initmac, charp, 0644);
-module_param(video_mode, int, 0644);
-module_param(chip_version, int, 0644);
-module_param(rfintfs, int, 0644);
-module_param(lbkmode, int, 0644);
-module_param(hci, int, 0644);
-module_param(network_mode, int, 0644);
-module_param(channel, int, 0644);
-module_param(mp_mode, int, 0644);
-module_param(wmm_enable, int, 0644);
-module_param(vrtl_carrier_sense, int, 0644);
-module_param(vcs_type, int, 0644);
-module_param(busy_thresh, int, 0644);
-module_param(ht_enable, int, 0644);
-module_param(cbw40_enable, int, 0644);
-module_param(ampdu_enable, int, 0644);
-module_param(rf_config, int, 0644);
-module_param(power_mgnt, int, 0644);
-module_param(low_power, int, 0644);
+module_param(wifi_test, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(initmac, charp, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(video_mode, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(chip_version, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(rfintfs, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(lbkmode, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(hci, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(network_mode, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(channel, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(mp_mode, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(wmm_enable, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(vrtl_carrier_sense, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(vcs_type, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(busy_thresh, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(ht_enable, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(cbw40_enable, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(ampdu_enable, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(rf_config, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(power_mgnt, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(low_power, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 
 MODULE_PARM_DESC(ifname, " Net interface name, wlan%d=default");
 MODULE_PARM_DESC(initmac, "MAC-Address, default: use FUSE");
-- 
2.9.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 0954/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value
when calling a macro which is defined with a parameter for access permission.
As we know, these numeric value for access permission have had the 
corresponding macro,
and that using macro can improve the robustness and readability of the code,
thus, I suggest replacing the numeric parameter with the macro.

Signed-off-by: Chuansheng Liu 
Signed-off-by: Baole Ni 
---
 drivers/staging/rtl8723au/os_dep/os_intfs.c | 66 ++---
 1 file changed, 33 insertions(+), 33 deletions(-)

diff --git a/drivers/staging/rtl8723au/os_dep/os_intfs.c 
b/drivers/staging/rtl8723au/os_dep/os_intfs.c
index b8848c2..eac8edc 100644
--- a/drivers/staging/rtl8723au/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8723au/os_dep/os_intfs.c
@@ -53,7 +53,7 @@ static int rtw_ips_mode = IPS_NORMAL;
 
 static int rtw_smart_ps = 2;
 
-module_param(rtw_ips_mode, int, 0644);
+module_param(rtw_ips_mode, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(rtw_ips_mode, "The default IPS mode");
 
 static int rtw_long_retry_lmt = 7;
@@ -112,62 +112,62 @@ static int rtw_80211d;
 
 static int rtw_regulatory_id = 0xff;/*  Regulatory tab id, 0xff = follow 
efuse's setting */
 
-module_param(rtw_regulatory_id, int, 0644);
+module_param(rtw_regulatory_id, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 
 static char *ifname = "wlan%d";
-module_param(ifname, charp, 0644);
+module_param(ifname, charp, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(ifname, "The default name to allocate for first interface");
 
 static char *if2name = "wlan%d";
-module_param(if2name, charp, 0644);
+module_param(if2name, charp, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(if2name, "The default name to allocate for second interface");
 
-module_param(rtw_channel_plan, int, 0644);
-module_param(rtw_chip_version, int, 0644);
-module_param(rtw_rfintfs, int, 0644);
-module_param(rtw_channel, int, 0644);
-module_param(rtw_wmm_enable, int, 0644);
-module_param(rtw_vrtl_carrier_sense, int, 0644);
-module_param(rtw_vcs_type, int, 0644);
-module_param(rtw_busy_thresh, int, 0644);
-module_param(rtw_ht_enable, int, 0644);
-module_param(rtw_cbw40_enable, int, 0644);
-module_param(rtw_ampdu_enable, int, 0644);
-module_param(rtw_rx_stbc, int, 0644);
-module_param(rtw_ampdu_amsdu, int, 0644);
+module_param(rtw_channel_plan, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(rtw_chip_version, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(rtw_rfintfs, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(rtw_channel, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(rtw_wmm_enable, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(rtw_vrtl_carrier_sense, int, S_IRUSR | S_IWUSR | S_IRGRP | 
S_IROTH);
+module_param(rtw_vcs_type, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(rtw_busy_thresh, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(rtw_ht_enable, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(rtw_cbw40_enable, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(rtw_ampdu_enable, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(rtw_rx_stbc, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(rtw_ampdu_amsdu, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 
-module_param(rtw_lowrate_two_xmit, int, 0644);
+module_param(rtw_lowrate_two_xmit, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 
-module_param(rtw_rf_config, int, 0644);
-module_param(rtw_power_mgnt, int, 0644);
-module_param(rtw_smart_ps, int, 0644);
-module_param(rtw_low_power, int, 0644);
-module_param(rtw_wifi_spec, int, 0644);
+module_param(rtw_rf_config, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(rtw_power_mgnt, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(rtw_smart_ps, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(rtw_low_power, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(rtw_wifi_spec, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 
-module_param(rtw_antdiv_cfg, int, 0644);
+module_param(rtw_antdiv_cfg, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 
-module_param(rtw_enusbss, int, 0644);
-module_param(rtw_hwpdn_mode, int, 0644);
-module_param(rtw_hwpwrp_detect, int, 0644);
+module_param(rtw_enusbss, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(rtw_hwpdn_mode, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param(rtw_hwpwrp_detect, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 
-module_param(rtw_hw_wps_pbc, int, 0644);
+module_param(rtw_hw_wps_pbc, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 
 static uint rtw_max_roaming_times = 2;
-module_param(rtw_max_roaming_times, uint, 0644);
+module_param(rtw_max_roaming_times, uint, S_IRUSR | S_IWUSR | S_IRGRP | 
S_IROTH);
 MODULE_PARM_DESC(rtw_max_roaming_times, "The max roaming times to try");
 
-module_param(rtw_80211d, int, 0644);
+module_param(rtw_80211d, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IRO

[PATCH 0955/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value
when calling a macro which is defined with a parameter for access permission.
As we know, these numeric value for access permission have had the 
corresponding macro,
and that using macro can improve the robustness and readability of the code,
thus, I suggest replacing the numeric parameter with the macro.

Signed-off-by: Chuansheng Liu 
Signed-off-by: Baole Ni 
---
 drivers/staging/vt6656/main_usb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/vt6656/main_usb.c 
b/drivers/staging/vt6656/main_usb.c
index ac4fecb..1b8f9bb 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -60,12 +60,12 @@ MODULE_DESCRIPTION(DEVICE_FULL_DRV_NAM);
 
 #define RX_DESC_DEF0 64
 static int vnt_rx_buffers = RX_DESC_DEF0;
-module_param_named(rx_buffers, vnt_rx_buffers, int, 0644);
+module_param_named(rx_buffers, vnt_rx_buffers, int, S_IRUSR | S_IWUSR | 
S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(rx_buffers, "Number of receive usb rx buffers");
 
 #define TX_DESC_DEF0 64
 static int vnt_tx_buffers = TX_DESC_DEF0;
-module_param_named(tx_buffers, vnt_tx_buffers, int, 0644);
+module_param_named(tx_buffers, vnt_tx_buffers, int, S_IRUSR | S_IWUSR | 
S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(tx_buffers, "Number of receive usb tx buffers");
 
 #define RTS_THRESH_DEF 2347
-- 
2.9.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 0949/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value
when calling a macro which is defined with a parameter for access permission.
As we know, these numeric value for access permission have had the 
corresponding macro,
and that using macro can improve the robustness and readability of the code,
thus, I suggest replacing the numeric parameter with the macro.

Signed-off-by: Chuansheng Liu 
Signed-off-by: Baole Ni 
---
 drivers/staging/octeon/ethernet.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/octeon/ethernet.c 
b/drivers/staging/octeon/ethernet.c
index e9cd5f2..d0841ed 100644
--- a/drivers/staging/octeon/ethernet.c
+++ b/drivers/staging/octeon/ethernet.c
@@ -40,13 +40,13 @@
 #include 
 
 static int num_packet_buffers = 1024;
-module_param(num_packet_buffers, int, 0444);
+module_param(num_packet_buffers, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(num_packet_buffers, "\n"
"\tNumber of packet buffers to allocate and store in the\n"
"\tFPA. By default, 1024 packet buffers are used.\n");
 
 int pow_receive_group = 15;
-module_param(pow_receive_group, int, 0444);
+module_param(pow_receive_group, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(pow_receive_group, "\n"
"\tPOW group to receive packets from. All ethernet hardware\n"
"\twill be configured to send incoming packets to this POW\n"
@@ -54,14 +54,14 @@ MODULE_PARM_DESC(pow_receive_group, "\n"
"\tgroup for the kernel to process.");
 
 int pow_send_group = -1;
-module_param(pow_send_group, int, 0644);
+module_param(pow_send_group, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(pow_send_group, "\n"
"\tPOW group to send packets to other software on. This\n"
"\tcontrols the creation of the virtual device pow0.\n"
"\talways_use_pow also depends on this value.");
 
 int always_use_pow;
-module_param(always_use_pow, int, 0444);
+module_param(always_use_pow, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(always_use_pow, "\n"
"\tWhen set, always send to the pow group. This will cause\n"
"\tpackets sent to real ethernet devices to be sent to the\n"
@@ -73,7 +73,7 @@ MODULE_PARM_DESC(always_use_pow, "\n"
"\tthis option.");
 
 char pow_send_list[128] = "";
-module_param_string(pow_send_list, pow_send_list, sizeof(pow_send_list), 0444);
+module_param_string(pow_send_list, pow_send_list, sizeof(pow_send_list), 
S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(pow_send_list, "\n"
"\tComma separated list of ethernet devices that should use the\n"
"\tPOW for transmit instead of the actual ethernet hardware. This\n"
@@ -83,7 +83,7 @@ MODULE_PARM_DESC(pow_send_list, "\n"
"\tusing the pow_send_group.");
 
 int rx_napi_weight = 32;
-module_param(rx_napi_weight, int, 0444);
+module_param(rx_napi_weight, int, S_IRUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(rx_napi_weight, "The NAPI WEIGHT parameter.");
 
 
-- 
2.9.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 0956/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value
when calling a macro which is defined with a parameter for access permission.
As we know, these numeric value for access permission have had the 
corresponding macro,
and that using macro can improve the robustness and readability of the code,
thus, I suggest replacing the numeric parameter with the macro.

Signed-off-by: Chuansheng Liu 
Signed-off-by: Baole Ni 
---
 drivers/staging/wlan-ng/p80211netdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/wlan-ng/p80211netdev.c 
b/drivers/staging/wlan-ng/p80211netdev.c
index 90cc8cd..d6f567d 100644
--- a/drivers/staging/wlan-ng/p80211netdev.c
+++ b/drivers/staging/wlan-ng/p80211netdev.c
@@ -104,11 +104,11 @@ static void p80211knetdev_tx_timeout(netdevice_t *netdev);
 static int p80211_rx_typedrop(wlandevice_t *wlandev, u16 fc);
 
 int wlan_watchdog = 5000;
-module_param(wlan_watchdog, int, 0644);
+module_param(wlan_watchdog, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(wlan_watchdog, "transmit timeout in milliseconds");
 
 int wlan_wext_write = 1;
-module_param(wlan_wext_write, int, 0644);
+module_param(wlan_wext_write, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(wlan_wext_write, "enable write wireless extensions");
 
 /*
-- 
2.9.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 0957/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value
when calling a macro which is defined with a parameter for access permission.
As we know, these numeric value for access permission have had the 
corresponding macro,
and that using macro can improve the robustness and readability of the code,
thus, I suggest replacing the numeric parameter with the macro.

Signed-off-by: Chuansheng Liu 
Signed-off-by: Baole Ni 
---
 drivers/staging/wlan-ng/prism2sta.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wlan-ng/prism2sta.c 
b/drivers/staging/wlan-ng/prism2sta.c
index 64f9072..eff5f6b 100644
--- a/drivers/staging/wlan-ng/prism2sta.c
+++ b/drivers/staging/wlan-ng/prism2sta.c
@@ -88,12 +88,12 @@ int prism2_reset_settletime = 100;  /* Reset settle time in 
ms */
 
 static int prism2_doreset; /* Do a reset at init? */
 
-module_param(prism2_doreset, int, 0644);
+module_param(prism2_doreset, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 MODULE_PARM_DESC(prism2_doreset, "Issue a reset on initialization");
 
-module_param(prism2_reset_holdtime, int, 0644);
+module_param(prism2_reset_holdtime, int, S_IRUSR | S_IWUSR | S_IRGRP | 
S_IROTH);
 MODULE_PARM_DESC(prism2_reset_holdtime, "reset hold time in ms");
-module_param(prism2_reset_settletime, int, 0644);
+module_param(prism2_reset_settletime, int, S_IRUSR | S_IWUSR | S_IRGRP | 
S_IROTH);
 MODULE_PARM_DESC(prism2_reset_settletime, "reset settle time in ms");
 
 MODULE_LICENSE("Dual MPL/GPL");
-- 
2.9.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 0955/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Jes Sorensen
Baole Ni  writes:
> I find that the developers often just specified the numeric value
> when calling a macro which is defined with a parameter for access permission.
> As we know, these numeric value for access permission have had the
> corresponding macro,
> and that using macro can improve the robustness and readability of the code,
> thus, I suggest replacing the numeric parameter with the macro.
>
> Signed-off-by: Chuansheng Liu 
> Signed-off-by: Baole Ni 
> ---
>  drivers/staging/vt6656/main_usb.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Excuse me, but why are you CC'ing everybody and their 217 cousins on
these patches?

The fact that someone had a patch applied in a directory close to this
file within the last 3 years is not justification for spamming them with
this.

Jes
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 0947/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Mauro Carvalho Chehab
Em Tue,  2 Aug 2016 20:01:34 +0800
Baole Ni  escreveu:

> I find that the developers often just specified the numeric value
> when calling a macro which is defined with a parameter for access permission.
> As we know, these numeric value for access permission have had the 
> corresponding macro,
> and that using macro can improve the robustness and readability of the code,
> thus, I suggest replacing the numeric parameter with the macro.

Gah!

A patch series with 1285 patches with identical subject!

Please don't ever do something like that. My inbox is not trash!

Instead, please group the changes per subsystem, and use different
names for each patch. Makes easier for people to review.

also, you need to send the patches to the subsystem mainatiner, and
not adding a random list of people like this:

To: gre...@linuxfoundation.org, mauroche...@gmail.com, mche...@infradead.org, 
mche...@redhat.com, m.che...@samsung.com, m.szyprow...@samsung.com, 
kyungmin.p...@samsung.com, k.kozlow...@samsung.com

Btw, use *just* the more recent email of the maintainer, instead of
spamming trash to all our emails (even to the ones that we don't use
anymore!

I'll just send all those things to /dev/null until you fix your
email sending process.

Regards,
Mauro

> 
> Signed-off-by: Chuansheng Liu 
> Signed-off-by: Baole Ni 
> ---
>  drivers/staging/media/omap1/omap1_camera.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/media/omap1/omap1_camera.c 
> b/drivers/staging/media/omap1/omap1_camera.c
> index 54b8dd2..6e125dc 100644
> --- a/drivers/staging/media/omap1/omap1_camera.c
> +++ b/drivers/staging/media/omap1/omap1_camera.c
> @@ -1692,7 +1692,7 @@ static struct platform_driver omap1_cam_driver = {
>  
>  module_platform_driver(omap1_cam_driver);
>  
> -module_param(sg_mode, bool, 0644);
> +module_param(sg_mode, bool, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
>  MODULE_PARM_DESC(sg_mode, "videobuf mode, 0: dma-contig (default), 1: 
> dma-sg");
>  
>  MODULE_DESCRIPTION("OMAP1 Camera Interface driver");
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: comedi: adv_pci1760: Do not return EINVAL for CMDF_ROUND_DOWN.

2016-08-02 Thread Ian Abbott

On 29/07/16 14:43, Phil Turnbull wrote:

The CMDF_ROUND_DOWN case falls through and so always returns -EINVAL.

Fixes: 14b93bb6bbf0 ("staging: comedi: adv_pci_dio: separate out PCI-1760 
support")
Signed-off-by: Phil Turnbull 
---
 drivers/staging/comedi/drivers/adv_pci1760.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/comedi/drivers/adv_pci1760.c 
b/drivers/staging/comedi/drivers/adv_pci1760.c
index d7dd1e55e347..9f525ff7290c 100644
--- a/drivers/staging/comedi/drivers/adv_pci1760.c
+++ b/drivers/staging/comedi/drivers/adv_pci1760.c
@@ -196,6 +196,7 @@ static int pci1760_pwm_ns_to_div(unsigned int flags, 
unsigned int ns)
break;
case CMDF_ROUND_DOWN:
divisor = ns / PCI1760_PWM_TIMEBASE;
+   break;
default:
return -EINVAL;
}



Nice catch, thanks!

Reviewed-by: Ian Abbott 

--
-=( Ian Abbott @ MEV Ltd.E-mail:  )=-
-=(  Web: http://www.mev.co.uk/  )=-
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 0947/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Randy Dunlap
On 08/02/16 05:51, Mauro Carvalho Chehab wrote:
> Em Tue,  2 Aug 2016 20:01:34 +0800
> Baole Ni  escreveu:
> 
>> I find that the developers often just specified the numeric value
>> when calling a macro which is defined with a parameter for access permission.
>> As we know, these numeric value for access permission have had the 
>> corresponding macro,
>> and that using macro can improve the robustness and readability of the code,
>> thus, I suggest replacing the numeric parameter with the macro.
> 
> Gah!
> 
> A patch series with 1285 patches with identical subject!
> 
> Please don't ever do something like that. My inbox is not trash!
> 
> Instead, please group the changes per subsystem, and use different
> names for each patch. Makes easier for people to review.
> 
> also, you need to send the patches to the subsystem mainatiner, and
> not adding a random list of people like this:
> 
> To: gre...@linuxfoundation.org, mauroche...@gmail.com, mche...@infradead.org, 
> mche...@redhat.com, m.che...@samsung.com, m.szyprow...@samsung.com, 
> kyungmin.p...@samsung.com, k.kozlow...@samsung.com
> 
> Btw, use *just* the more recent email of the maintainer, instead of
> spamming trash to all our emails (even to the ones that we don't use
> anymore!
> 
> I'll just send all those things to /dev/null until you fix your
> email sending process.
>
+1285

There are people at Intel who know about things like this.

-- 
~Randy
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: comedi/drivers: Fixed sparse warnings

2016-08-02 Thread Ian Abbott

On 30/07/16 17:38, Nayeemahmed Badebade wrote:

Fixed below sparse warnings in dt2811.c
 warning: symbol 'dt2811_clk_dividers' was not declared. Should it be static?
 warning: symbol 'dt2811_clk_multipliers' was not declared. Should it be static?

Signed-off-by: Nayeemahmed Badebade 
---
 drivers/staging/comedi/drivers/dt2811.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/comedi/drivers/dt2811.c 
b/drivers/staging/comedi/drivers/dt2811.c
index 904f6377..07f99c0 100644
--- a/drivers/staging/comedi/drivers/dt2811.c
+++ b/drivers/staging/comedi/drivers/dt2811.c
@@ -96,11 +96,11 @@
  *6  6  100 kHz 6   100
  *7 12   50 kHz 7   1000
  */
-const unsigned int dt2811_clk_dividers[] = {
+static const unsigned int dt2811_clk_dividers[] = {
1, 10, 2, 3, 4, 5, 6, 12
 };

-const unsigned int dt2811_clk_multipliers[] = {
+static const unsigned int dt2811_clk_multipliers[] = {
1, 10, 100, 1000, 1, 10, 100, 1000
 };

--
1.9.1



Thanks!

Reviewed-by: Ian Abbott 

--
-=( Ian Abbott @ MEV Ltd.E-mail:  )=-
-=(  Web: http://www.mev.co.uk/  )=-
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 34/34] Staging: comedi: drivers: cd_pcidas: Compression of

2016-08-02 Thread Ian Abbott

On 30/07/16 21:04, Nadim almas wrote:

This patch compresses two lines in to a single line in file
cb_pcidas.c


But this patch changes cb_pcidas64.c.  Also, the Subject line says 
'cd_pcidas'.


You can remove the 'drivers:' tag from the subject line to save some 
space.  It is sufficient to tag it as 'Staging: comedi: cb_pcidas64:'.



if immediate return statement is found. It also removes variable
bytes_written as it is no longer needed.


The patch does not remove any variables.


It is done using script Coccinelle. And coccinelle uses following
semantic patch for this compression function:

@@
expression e, ret;
@@

-ret =
+return
 e;
-return ret

Signed-off-by: Nadim Almas 
---

 drivers/staging/comedi/drivers/cb_pcidas64.c | 4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)



diff --git a/drivers/staging/comedi/drivers/cb_pcidas64.c 
b/drivers/staging/comedi/drivers/cb_pcidas64.c
index 1f9c08a..d30cf3d 100644
--- a/drivers/staging/comedi/drivers/cb_pcidas64.c
+++ b/drivers/staging/comedi/drivers/cb_pcidas64.c
@@ -1408,9 +1408,7 @@ static int set_ai_fifo_size(struct comedi_device *dev, 
unsigned int num_samples)
if (retval < 0)
return retval;

-   num_samples = retval * fifo->num_segments * fifo->sample_packing_ratio;
-
-   return num_samples;
+   return retval * fifo->num_segments * fifo->sample_packing_ratio;
 }

 /* query length of fifo */




--
-=( Ian Abbott @ MEV Ltd.E-mail:  )=-
-=(  Web: http://www.mev.co.uk/  )=-
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] Staging: rtl8723au: rtw_xmit: fixed coding style issues

2016-08-02 Thread Jes Sorensen
Shiva Kerdel  writes:
> Fixed some coding style issues that were detected as errors.
>
> Signed-off-by: Shiva Kerdel 

You have already been told this once by Greg. Describe what you are
fixing in the commit message, and don't fix more than one type of bug
per commit.

Jes

> ---
>  drivers/staging/rtl8723au/core/rtw_xmit.c | 26 ++
>  1 file changed, 10 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/staging/rtl8723au/core/rtw_xmit.c 
> b/drivers/staging/rtl8723au/core/rtw_xmit.c
> index 3de40cf..4ea7c5f 100644
> --- a/drivers/staging/rtl8723au/core/rtw_xmit.c
> +++ b/drivers/staging/rtl8723au/core/rtw_xmit.c
> @@ -174,7 +174,7 @@ int _rtw_init_xmit_priv23a(struct xmit_priv *pxmitpriv,
>   rtw_alloc_hwxmits23a(padapter);
>   rtw_init_hwxmits23a(pxmitpriv->hwxmits, pxmitpriv->hwxmit_entry);
>  
> - for (i = 0; i < 4; i ++)
> + for (i = 0; i < 4; i++)
>   pxmitpriv->wmm_para_seq[i] = i;
>  
>   sema_init(&pxmitpriv->tx_retevt, 0);
> @@ -640,7 +640,7 @@ static int xmitframe_addmic(struct rtw_adapter *padapter,
>   struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
>   int curfragnum, length;
>   u8 *pframe, *payload, mic[8];
> - u8 priority[4]= {0x0, 0x0, 0x0, 0x0};
> + u8 priority[4] = {0x0, 0x0, 0x0, 0x0};
>   u8 hw_hdr_offset = 0;
>   int bmcst = is_multicast_ether_addr(pattrib->ra);
>  
> @@ -667,10 +667,10 @@ static int xmitframe_addmic(struct rtw_adapter 
> *padapter,
>   if (pattrib->encrypt == WLAN_CIPHER_SUITE_TKIP) {
>   /* encode mic code */
>   if (stainfo) {
> - u8 null_key[16]={0x0, 0x0, 0x0, 0x0,
> -  0x0, 0x0, 0x0, 0x0,
> -  0x0, 0x0, 0x0, 0x0,
> -  0x0, 0x0, 0x0, 0x0};
> + u8 null_key[16] = {0x0, 0x0, 0x0, 0x0,
> +0x0, 0x0, 0x0, 0x0,
> +0x0, 0x0, 0x0, 0x0,
> +0x0, 0x0, 0x0, 0x0};
>  
>   pframe = pxmitframe->buf_addr + hw_hdr_offset;
>  
> @@ -902,8 +902,7 @@ static int rtw_make_wlanhdr(struct rtw_adapter *padapter, 
> u8 *hdr,
>  
>   if (psta->qos_option)
>   qos_option = true;
> - }
> - else {
> + } else {
>   RT_TRACE(_module_rtl871x_xmit_c_, _drv_err_,
>"fw_state:%x is not allowed to xmit frame\n",
>get_fwstate(pmlmepriv));
> @@ -1190,7 +1189,7 @@ int rtw_xmitframe_coalesce23a(struct rtw_adapter 
> *padapter, struct sk_buff *skb,
>   pdata += mem_sz;
>   data_len -= mem_sz;
>  
> - if ((pattrib->icv_len >0) && (pattrib->bswenc)) {
> + if ((pattrib->icv_len > 0) && (pattrib->bswenc)) {
>   memcpy(pframe, pattrib->icv, pattrib->icv_len);
>   pframe += pattrib->icv_len;
>   }
> @@ -1766,7 +1765,6 @@ void rtw_alloc_hwxmits23a(struct rtw_adapter *padapter)
>   hwxmits[4] .sta_queue = &pxmitpriv->be_pending;
>  
>   } else if (pxmitpriv->hwxmit_entry == 4) {
> -
>   /* pxmitpriv->vo_txqueue.head = 0; */
>   /* hwxmits[0] .phwtxqueue = &pxmitpriv->vo_txqueue; */
>   hwxmits[0] .sta_queue = &pxmitpriv->vo_pending;
> @@ -1952,18 +1950,16 @@ int xmitframe_enqueue_for_sleeping_sta23a(struct 
> rtw_adapter *padapter, struct x
>   /* spin_unlock_bh(&psta->sleep_q.lock); */
>  
>   ret = true;
> -
>   }
>  
>   spin_unlock_bh(&psta->sleep_q.lock);
>  
>   return ret;
> -
>   }
>  
>   spin_lock_bh(&psta->sleep_q.lock);
>  
> - if (psta->state&WIFI_SLEEP_STATE) {
> + if (psta->state & WIFI_SLEEP_STATE) {
>   u8 wmmps_ac = 0;
>  
>   if (pstapriv->sta_dz_bitmap & CHKBIT(psta->aid)) {
> @@ -2017,9 +2013,7 @@ int xmitframe_enqueue_for_sleeping_sta23a(struct 
> rtw_adapter *padapter, struct x
>   /*  */
>  
>   ret = true;
> -
>   }
> -
>   }
>  
>   spin_unlock_bh(&psta->sleep_q.lock);
> @@ -2159,7 +2153,7 @@ void wakeup_sta_to_xmit23a(struct rtw_adapter 
> *padapter, struct sta_info *psta)
>   /* update BCN for TIM IE */
>   update_mask = BIT(0);
>  
> - if (psta->state&WIFI_SLEEP_STATE)
> + if (psta->state & WIFI_SLEEP_STATE)
>   psta->state ^= WIFI_SLEEP_STATE;
>  
>   if (psta->state & WIFI_STA_ALIVE_CHK_STATE) {
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] Staging: rtl8723au: rtw_xmit: Fixed operators spacing style issues

2016-08-02 Thread Shiva Kerdel
Fixed spaces around operators to fix their coding style issues.

Signed-off-by: Shiva Kerdel 
---
 drivers/staging/rtl8723au/core/rtw_xmit.c | 24 
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/rtl8723au/core/rtw_xmit.c 
b/drivers/staging/rtl8723au/core/rtw_xmit.c
index 3de40cf..56228a5 100644
--- a/drivers/staging/rtl8723au/core/rtw_xmit.c
+++ b/drivers/staging/rtl8723au/core/rtw_xmit.c
@@ -174,7 +174,7 @@ int _rtw_init_xmit_priv23a(struct xmit_priv *pxmitpriv,
rtw_alloc_hwxmits23a(padapter);
rtw_init_hwxmits23a(pxmitpriv->hwxmits, pxmitpriv->hwxmit_entry);
 
-   for (i = 0; i < 4; i ++)
+   for (i = 0; i < 4; i++)
pxmitpriv->wmm_para_seq[i] = i;
 
sema_init(&pxmitpriv->tx_retevt, 0);
@@ -421,7 +421,7 @@ static int update_attrib(struct rtw_adapter *padapter,
struct security_priv *psecuritypriv = &padapter->securitypriv;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
int res = _SUCCESS;
-   struct ethhdr *ehdr = (struct ethhdr *) skb->data;
+   struct ethhdr *ehdr = (struct ethhdr *)skb->data;
 
pattrib->ether_type = ntohs(ehdr->h_proto);
 
@@ -640,7 +640,7 @@ static int xmitframe_addmic(struct rtw_adapter *padapter,
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
int curfragnum, length;
u8 *pframe, *payload, mic[8];
-   u8 priority[4]= {0x0, 0x0, 0x0, 0x0};
+   u8 priority[4] = {0x0, 0x0, 0x0, 0x0};
u8 hw_hdr_offset = 0;
int bmcst = is_multicast_ether_addr(pattrib->ra);
 
@@ -667,10 +667,10 @@ static int xmitframe_addmic(struct rtw_adapter *padapter,
if (pattrib->encrypt == WLAN_CIPHER_SUITE_TKIP) {
/* encode mic code */
if (stainfo) {
-   u8 null_key[16]={0x0, 0x0, 0x0, 0x0,
-0x0, 0x0, 0x0, 0x0,
-0x0, 0x0, 0x0, 0x0,
-0x0, 0x0, 0x0, 0x0};
+   u8 null_key[16] = {0x0, 0x0, 0x0, 0x0,
+  0x0, 0x0, 0x0, 0x0,
+  0x0, 0x0, 0x0, 0x0,
+  0x0, 0x0, 0x0, 0x0};
 
pframe = pxmitframe->buf_addr + hw_hdr_offset;
 
@@ -961,11 +961,11 @@ static int rtw_make_wlanhdr(struct rtw_adapter *padapter, 
u8 *hdr,
/* DBG_8723A("tx ampdu seqnum(%d) < 
tx_seq(%d)\n", pattrib->seqnum, tx_seq); */
pattrib->ampdu_en = false;/* AGG BK */
} else if (SN_EQUAL(pattrib->seqnum, tx_seq)) {
-   
psta->BA_starting_seqctrl[pattrib->priority & 0x0f] = (tx_seq+1)&0xfff;
+   
psta->BA_starting_seqctrl[pattrib->priority & 0x0f] = (tx_seq + 1)&0xfff;
pattrib->ampdu_en = true;/* AGG EN */
} else {
/* DBG_8723A("tx ampdu over run\n"); */
-   
psta->BA_starting_seqctrl[pattrib->priority & 0x0f] = (pattrib->seqnum+1)&0xfff;
+   
psta->BA_starting_seqctrl[pattrib->priority & 0x0f] = (pattrib->seqnum + 
1)&0xfff;
pattrib->ampdu_en = true;/* AGG EN */
}
}
@@ -1164,8 +1164,8 @@ int rtw_xmitframe_coalesce23a(struct rtw_adapter 
*padapter, struct sk_buff *skb,
RT_TRACE(_module_rtl871x_xmit_c_, _drv_notice_,
 "rtw_xmiaframe_coalesce23a: keyid =%d 
pattrib->iv[3]=%.2x pframe =%.2x %.2x %.2x %.2x\n",
 padapter->securitypriv.dot11PrivacyKeyIndex,
-pattrib->iv[3], *pframe, *(pframe+1),
-*(pframe+2), *(pframe+3));
+pattrib->iv[3], *pframe, *(pframe + 1),
+*(pframe + 2), *(pframe + 3));
pframe += pattrib->iv_len;
mpdu_len -= pattrib->iv_len;
}
@@ -1190,7 +1190,7 @@ int rtw_xmitframe_coalesce23a(struct rtw_adapter 
*padapter, struct sk_buff *skb,
pdata += mem_sz;
data_len -= mem_sz;
 
-   if ((pattrib->icv_len >0) && (pattrib->bswenc)) {
+   if ((pattrib->icv_len > 0) && (pattrib->bswenc)) {
memcpy(pframe, pattrib->icv, pattrib->icv_len);
pframe += pattrib->icv_len;
}
-- 
2.9.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] Staging: rtl8723au: rtw_xmit: fixed coding style issues

2016-08-02 Thread Shiva Kerdel
Fixed some coding style issues that were detected as errors.

Signed-off-by: Shiva Kerdel 
---
 drivers/staging/rtl8723au/core/rtw_xmit.c | 26 ++
 1 file changed, 10 insertions(+), 16 deletions(-)

diff --git a/drivers/staging/rtl8723au/core/rtw_xmit.c 
b/drivers/staging/rtl8723au/core/rtw_xmit.c
index 3de40cf..4ea7c5f 100644
--- a/drivers/staging/rtl8723au/core/rtw_xmit.c
+++ b/drivers/staging/rtl8723au/core/rtw_xmit.c
@@ -174,7 +174,7 @@ int _rtw_init_xmit_priv23a(struct xmit_priv *pxmitpriv,
rtw_alloc_hwxmits23a(padapter);
rtw_init_hwxmits23a(pxmitpriv->hwxmits, pxmitpriv->hwxmit_entry);
 
-   for (i = 0; i < 4; i ++)
+   for (i = 0; i < 4; i++)
pxmitpriv->wmm_para_seq[i] = i;
 
sema_init(&pxmitpriv->tx_retevt, 0);
@@ -640,7 +640,7 @@ static int xmitframe_addmic(struct rtw_adapter *padapter,
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
int curfragnum, length;
u8 *pframe, *payload, mic[8];
-   u8 priority[4]= {0x0, 0x0, 0x0, 0x0};
+   u8 priority[4] = {0x0, 0x0, 0x0, 0x0};
u8 hw_hdr_offset = 0;
int bmcst = is_multicast_ether_addr(pattrib->ra);
 
@@ -667,10 +667,10 @@ static int xmitframe_addmic(struct rtw_adapter *padapter,
if (pattrib->encrypt == WLAN_CIPHER_SUITE_TKIP) {
/* encode mic code */
if (stainfo) {
-   u8 null_key[16]={0x0, 0x0, 0x0, 0x0,
-0x0, 0x0, 0x0, 0x0,
-0x0, 0x0, 0x0, 0x0,
-0x0, 0x0, 0x0, 0x0};
+   u8 null_key[16] = {0x0, 0x0, 0x0, 0x0,
+  0x0, 0x0, 0x0, 0x0,
+  0x0, 0x0, 0x0, 0x0,
+  0x0, 0x0, 0x0, 0x0};
 
pframe = pxmitframe->buf_addr + hw_hdr_offset;
 
@@ -902,8 +902,7 @@ static int rtw_make_wlanhdr(struct rtw_adapter *padapter, 
u8 *hdr,
 
if (psta->qos_option)
qos_option = true;
-   }
-   else {
+   } else {
RT_TRACE(_module_rtl871x_xmit_c_, _drv_err_,
 "fw_state:%x is not allowed to xmit frame\n",
 get_fwstate(pmlmepriv));
@@ -1190,7 +1189,7 @@ int rtw_xmitframe_coalesce23a(struct rtw_adapter 
*padapter, struct sk_buff *skb,
pdata += mem_sz;
data_len -= mem_sz;
 
-   if ((pattrib->icv_len >0) && (pattrib->bswenc)) {
+   if ((pattrib->icv_len > 0) && (pattrib->bswenc)) {
memcpy(pframe, pattrib->icv, pattrib->icv_len);
pframe += pattrib->icv_len;
}
@@ -1766,7 +1765,6 @@ void rtw_alloc_hwxmits23a(struct rtw_adapter *padapter)
hwxmits[4] .sta_queue = &pxmitpriv->be_pending;
 
} else if (pxmitpriv->hwxmit_entry == 4) {
-
/* pxmitpriv->vo_txqueue.head = 0; */
/* hwxmits[0] .phwtxqueue = &pxmitpriv->vo_txqueue; */
hwxmits[0] .sta_queue = &pxmitpriv->vo_pending;
@@ -1952,18 +1950,16 @@ int xmitframe_enqueue_for_sleeping_sta23a(struct 
rtw_adapter *padapter, struct x
/* spin_unlock_bh(&psta->sleep_q.lock); */
 
ret = true;
-
}
 
spin_unlock_bh(&psta->sleep_q.lock);
 
return ret;
-
}
 
spin_lock_bh(&psta->sleep_q.lock);
 
-   if (psta->state&WIFI_SLEEP_STATE) {
+   if (psta->state & WIFI_SLEEP_STATE) {
u8 wmmps_ac = 0;
 
if (pstapriv->sta_dz_bitmap & CHKBIT(psta->aid)) {
@@ -2017,9 +2013,7 @@ int xmitframe_enqueue_for_sleeping_sta23a(struct 
rtw_adapter *padapter, struct x
/*  */
 
ret = true;
-
}
-
}
 
spin_unlock_bh(&psta->sleep_q.lock);
@@ -2159,7 +2153,7 @@ void wakeup_sta_to_xmit23a(struct rtw_adapter *padapter, 
struct sta_info *psta)
/* update BCN for TIM IE */
update_mask = BIT(0);
 
-   if (psta->state&WIFI_SLEEP_STATE)
+   if (psta->state & WIFI_SLEEP_STATE)
psta->state ^= WIFI_SLEEP_STATE;
 
if (psta->state & WIFI_STA_ALIVE_CHK_STATE) {
-- 
2.9.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 0947/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Steve Cotton
On Tue, Aug 02, 2016 at 09:51:18AM -0300, Mauro Carvalho Chehab wrote:
> Em Tue,  2 Aug 2016 20:01:34 +0800 Baole Ni  escreveu:
> 
> > I find that the developers often just specified the numeric value
> > when calling a macro which is defined with a parameter for access 
> > permission.
> > As we know, these numeric value for access permission have had the 
> > corresponding macro,
> > and that using macro can improve the robustness and readability of the code,
> > thus, I suggest replacing the numeric parameter with the macro.
> 
> Gah!
> 
> A patch series with 1285 patches with identical subject!
> 
> Please don't ever do something like that. My inbox is not trash!
> 
> Instead, please group the changes per subsystem, and use different
> names for each patch. Makes easier for people to review.

Hi Baole,

It may also be worth waiting for the first group to be reviewed before
sending the other groups, in case the review comments change what you
send later.

> > -module_param(sg_mode, bool, 0644);
> > +module_param(sg_mode, bool, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);

There's an S_IRUGO macro which makes the above just 'S_IRUGO | S_IWUSR'.

Regards,
Steve
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel