diff options
author | Joe Perches <joe@perches.com> | 2018-03-23 19:34:44 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-03-26 12:07:49 -0400 |
commit | d3757ba4c1421d2ad00d2bf97119005e37ad2902 (patch) | |
tree | a3b09afa0c49bf22c10eb29c2436bf71619a5395 | |
parent | d61e40385655fbba659fc3d81df9bdf1b848e263 (diff) |
ethernet: Use octal not symbolic permissions
Prefer the direct use of octal for permissions.
Done with checkpatch -f --types=SYMBOLIC_PERMS --fix-inplace
and some typing.
Miscellanea:
o Whitespace neatening around these conversions.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
40 files changed, 194 insertions, 195 deletions
diff --git a/drivers/net/ethernet/8390/apne.c b/drivers/net/ethernet/8390/apne.c index c56ac9ebc08f..fe6c834c422e 100644 --- a/drivers/net/ethernet/8390/apne.c +++ b/drivers/net/ethernet/8390/apne.c | |||
@@ -117,7 +117,7 @@ static const char version[] = | |||
117 | static int apne_owned; /* signal if card already owned */ | 117 | static int apne_owned; /* signal if card already owned */ |
118 | 118 | ||
119 | static u32 apne_msg_enable; | 119 | static u32 apne_msg_enable; |
120 | module_param_named(msg_enable, apne_msg_enable, uint, (S_IRUSR|S_IRGRP|S_IROTH)); | 120 | module_param_named(msg_enable, apne_msg_enable, uint, 0444); |
121 | MODULE_PARM_DESC(msg_enable, "Debug message level (see linux/netdevice.h for bitmap)"); | 121 | MODULE_PARM_DESC(msg_enable, "Debug message level (see linux/netdevice.h for bitmap)"); |
122 | 122 | ||
123 | struct net_device * __init apne_probe(int unit) | 123 | struct net_device * __init apne_probe(int unit) |
diff --git a/drivers/net/ethernet/8390/lib8390.c b/drivers/net/ethernet/8390/lib8390.c index 5d9bbde9fe68..c9c55c9eab9f 100644 --- a/drivers/net/ethernet/8390/lib8390.c +++ b/drivers/net/ethernet/8390/lib8390.c | |||
@@ -113,7 +113,7 @@ static void __NS8390_init(struct net_device *dev, int startp); | |||
113 | 113 | ||
114 | static unsigned version_printed; | 114 | static unsigned version_printed; |
115 | static u32 msg_enable; | 115 | static u32 msg_enable; |
116 | module_param(msg_enable, uint, (S_IRUSR|S_IRGRP|S_IROTH)); | 116 | module_param(msg_enable, uint, 0444); |
117 | MODULE_PARM_DESC(msg_enable, "Debug message level (see linux/netdevice.h for bitmap)"); | 117 | MODULE_PARM_DESC(msg_enable, "Debug message level (see linux/netdevice.h for bitmap)"); |
118 | 118 | ||
119 | /* | 119 | /* |
diff --git a/drivers/net/ethernet/8390/ne.c b/drivers/net/ethernet/8390/ne.c index 4cdff6e6af89..99a2453eb34f 100644 --- a/drivers/net/ethernet/8390/ne.c +++ b/drivers/net/ethernet/8390/ne.c | |||
@@ -77,7 +77,7 @@ static u32 ne_msg_enable; | |||
77 | module_param_hw_array(io, int, ioport, NULL, 0); | 77 | module_param_hw_array(io, int, ioport, NULL, 0); |
78 | module_param_hw_array(irq, int, irq, NULL, 0); | 78 | module_param_hw_array(irq, int, irq, NULL, 0); |
79 | module_param_array(bad, int, NULL, 0); | 79 | module_param_array(bad, int, NULL, 0); |
80 | module_param_named(msg_enable, ne_msg_enable, uint, (S_IRUSR|S_IRGRP|S_IROTH)); | 80 | module_param_named(msg_enable, ne_msg_enable, uint, 0444); |
81 | MODULE_PARM_DESC(io, "I/O base address(es),required"); | 81 | MODULE_PARM_DESC(io, "I/O base address(es),required"); |
82 | MODULE_PARM_DESC(irq, "IRQ number(s)"); | 82 | MODULE_PARM_DESC(irq, "IRQ number(s)"); |
83 | MODULE_PARM_DESC(bad, "Accept card(s) with bad signatures"); | 83 | MODULE_PARM_DESC(bad, "Accept card(s) with bad signatures"); |
diff --git a/drivers/net/ethernet/8390/ne2k-pci.c b/drivers/net/ethernet/8390/ne2k-pci.c index 1bdea746926c..42985a82321a 100644 --- a/drivers/net/ethernet/8390/ne2k-pci.c +++ b/drivers/net/ethernet/8390/ne2k-pci.c | |||
@@ -76,7 +76,7 @@ MODULE_AUTHOR("Donald Becker / Paul Gortmaker"); | |||
76 | MODULE_DESCRIPTION("PCI NE2000 clone driver"); | 76 | MODULE_DESCRIPTION("PCI NE2000 clone driver"); |
77 | MODULE_LICENSE("GPL"); | 77 | MODULE_LICENSE("GPL"); |
78 | 78 | ||
79 | module_param_named(msg_enable, ne2k_msg_enable, uint, (S_IRUSR|S_IRGRP|S_IROTH)); | 79 | module_param_named(msg_enable, ne2k_msg_enable, uint, 0444); |
80 | module_param_array(options, int, NULL, 0); | 80 | module_param_array(options, int, NULL, 0); |
81 | module_param_array(full_duplex, int, NULL, 0); | 81 | module_param_array(full_duplex, int, NULL, 0); |
82 | MODULE_PARM_DESC(msg_enable, "Debug message level (see linux/netdevice.h for bitmap)"); | 82 | MODULE_PARM_DESC(msg_enable, "Debug message level (see linux/netdevice.h for bitmap)"); |
diff --git a/drivers/net/ethernet/8390/smc-ultra.c b/drivers/net/ethernet/8390/smc-ultra.c index 4e02f6a23575..3fe3b4dfa7c5 100644 --- a/drivers/net/ethernet/8390/smc-ultra.c +++ b/drivers/net/ethernet/8390/smc-ultra.c | |||
@@ -563,7 +563,7 @@ static int irq[MAX_ULTRA_CARDS]; | |||
563 | 563 | ||
564 | module_param_hw_array(io, int, ioport, NULL, 0); | 564 | module_param_hw_array(io, int, ioport, NULL, 0); |
565 | module_param_hw_array(irq, int, irq, NULL, 0); | 565 | module_param_hw_array(irq, int, irq, NULL, 0); |
566 | module_param_named(msg_enable, ultra_msg_enable, uint, (S_IRUSR|S_IRGRP|S_IROTH)); | 566 | module_param_named(msg_enable, ultra_msg_enable, uint, 0444); |
567 | MODULE_PARM_DESC(io, "I/O base address(es)"); | 567 | MODULE_PARM_DESC(io, "I/O base address(es)"); |
568 | MODULE_PARM_DESC(irq, "IRQ number(s) (assigned)"); | 568 | MODULE_PARM_DESC(irq, "IRQ number(s) (assigned)"); |
569 | MODULE_PARM_DESC(msg_enable, "Debug message level (see linux/netdevice.h for bitmap)"); | 569 | MODULE_PARM_DESC(msg_enable, "Debug message level (see linux/netdevice.h for bitmap)"); |
diff --git a/drivers/net/ethernet/8390/stnic.c b/drivers/net/ethernet/8390/stnic.c index aca957d4e121..1f0670cd3ea3 100644 --- a/drivers/net/ethernet/8390/stnic.c +++ b/drivers/net/ethernet/8390/stnic.c | |||
@@ -71,7 +71,7 @@ static void stnic_init (struct net_device *dev); | |||
71 | 71 | ||
72 | static u32 stnic_msg_enable; | 72 | static u32 stnic_msg_enable; |
73 | 73 | ||
74 | module_param_named(msg_enable, stnic_msg_enable, uint, (S_IRUSR|S_IRGRP|S_IROTH)); | 74 | module_param_named(msg_enable, stnic_msg_enable, uint, 0444); |
75 | MODULE_PARM_DESC(msg_enable, "Debug message level (see linux/netdevice.h for bitmap)"); | 75 | MODULE_PARM_DESC(msg_enable, "Debug message level (see linux/netdevice.h for bitmap)"); |
76 | 76 | ||
77 | /* SH7750 specific read/write io. */ | 77 | /* SH7750 specific read/write io. */ |
diff --git a/drivers/net/ethernet/8390/wd.c b/drivers/net/ethernet/8390/wd.c index fb17c2c7e1dd..c834123560f1 100644 --- a/drivers/net/ethernet/8390/wd.c +++ b/drivers/net/ethernet/8390/wd.c | |||
@@ -507,7 +507,7 @@ module_param_hw_array(io, int, ioport, NULL, 0); | |||
507 | module_param_hw_array(irq, int, irq, NULL, 0); | 507 | module_param_hw_array(irq, int, irq, NULL, 0); |
508 | module_param_hw_array(mem, int, iomem, NULL, 0); | 508 | module_param_hw_array(mem, int, iomem, NULL, 0); |
509 | module_param_hw_array(mem_end, int, iomem, NULL, 0); | 509 | module_param_hw_array(mem_end, int, iomem, NULL, 0); |
510 | module_param_named(msg_enable, wd_msg_enable, uint, (S_IRUSR|S_IRGRP|S_IROTH)); | 510 | module_param_named(msg_enable, wd_msg_enable, uint, 0444); |
511 | MODULE_PARM_DESC(io, "I/O base address(es)"); | 511 | MODULE_PARM_DESC(io, "I/O base address(es)"); |
512 | MODULE_PARM_DESC(irq, "IRQ number(s) (ignored for PureData boards)"); | 512 | MODULE_PARM_DESC(irq, "IRQ number(s) (ignored for PureData boards)"); |
513 | MODULE_PARM_DESC(mem, "memory base address(es)(ignored for PureData boards)"); | 513 | MODULE_PARM_DESC(mem, "memory base address(es)(ignored for PureData boards)"); |
diff --git a/drivers/net/ethernet/altera/altera_tse_main.c b/drivers/net/ethernet/altera/altera_tse_main.c index 527908c7e384..baca8f704a45 100644 --- a/drivers/net/ethernet/altera/altera_tse_main.c +++ b/drivers/net/ethernet/altera/altera_tse_main.c | |||
@@ -56,7 +56,7 @@ | |||
56 | static atomic_t instance_count = ATOMIC_INIT(~0); | 56 | static atomic_t instance_count = ATOMIC_INIT(~0); |
57 | /* Module parameters */ | 57 | /* Module parameters */ |
58 | static int debug = -1; | 58 | static int debug = -1; |
59 | module_param(debug, int, S_IRUGO | S_IWUSR); | 59 | module_param(debug, int, 0644); |
60 | MODULE_PARM_DESC(debug, "Message Level (-1: default, 0: no output, 16: all)"); | 60 | MODULE_PARM_DESC(debug, "Message Level (-1: default, 0: no output, 16: all)"); |
61 | 61 | ||
62 | static const u32 default_msg_level = (NETIF_MSG_DRV | NETIF_MSG_PROBE | | 62 | static const u32 default_msg_level = (NETIF_MSG_DRV | NETIF_MSG_PROBE | |
@@ -65,12 +65,12 @@ static const u32 default_msg_level = (NETIF_MSG_DRV | NETIF_MSG_PROBE | | |||
65 | 65 | ||
66 | #define RX_DESCRIPTORS 64 | 66 | #define RX_DESCRIPTORS 64 |
67 | static int dma_rx_num = RX_DESCRIPTORS; | 67 | static int dma_rx_num = RX_DESCRIPTORS; |
68 | module_param(dma_rx_num, int, S_IRUGO | S_IWUSR); | 68 | module_param(dma_rx_num, int, 0644); |
69 | MODULE_PARM_DESC(dma_rx_num, "Number of descriptors in the RX list"); | 69 | MODULE_PARM_DESC(dma_rx_num, "Number of descriptors in the RX list"); |
70 | 70 | ||
71 | #define TX_DESCRIPTORS 64 | 71 | #define TX_DESCRIPTORS 64 |
72 | static int dma_tx_num = TX_DESCRIPTORS; | 72 | static int dma_tx_num = TX_DESCRIPTORS; |
73 | module_param(dma_tx_num, int, S_IRUGO | S_IWUSR); | 73 | module_param(dma_tx_num, int, 0644); |
74 | MODULE_PARM_DESC(dma_tx_num, "Number of descriptors in the TX list"); | 74 | MODULE_PARM_DESC(dma_tx_num, "Number of descriptors in the TX list"); |
75 | 75 | ||
76 | 76 | ||
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c index 100adee778df..7c204f05b418 100644 --- a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c +++ b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c | |||
@@ -137,21 +137,21 @@ static unsigned int ecc_ded_period = 600; | |||
137 | 137 | ||
138 | #ifdef CONFIG_AMD_XGBE_HAVE_ECC | 138 | #ifdef CONFIG_AMD_XGBE_HAVE_ECC |
139 | /* Only expose the ECC parameters if supported */ | 139 | /* Only expose the ECC parameters if supported */ |
140 | module_param(ecc_sec_info_threshold, uint, S_IWUSR | S_IRUGO); | 140 | module_param(ecc_sec_info_threshold, uint, 0644); |
141 | MODULE_PARM_DESC(ecc_sec_info_threshold, | 141 | MODULE_PARM_DESC(ecc_sec_info_threshold, |
142 | " ECC corrected error informational threshold setting"); | 142 | " ECC corrected error informational threshold setting"); |
143 | 143 | ||
144 | module_param(ecc_sec_warn_threshold, uint, S_IWUSR | S_IRUGO); | 144 | module_param(ecc_sec_warn_threshold, uint, 0644); |
145 | MODULE_PARM_DESC(ecc_sec_warn_threshold, | 145 | MODULE_PARM_DESC(ecc_sec_warn_threshold, |
146 | " ECC corrected error warning threshold setting"); | 146 | " ECC corrected error warning threshold setting"); |
147 | 147 | ||
148 | module_param(ecc_sec_period, uint, S_IWUSR | S_IRUGO); | 148 | module_param(ecc_sec_period, uint, 0644); |
149 | MODULE_PARM_DESC(ecc_sec_period, " ECC corrected error period (in seconds)"); | 149 | MODULE_PARM_DESC(ecc_sec_period, " ECC corrected error period (in seconds)"); |
150 | 150 | ||
151 | module_param(ecc_ded_threshold, uint, S_IWUSR | S_IRUGO); | 151 | module_param(ecc_ded_threshold, uint, 0644); |
152 | MODULE_PARM_DESC(ecc_ded_threshold, " ECC detected error threshold setting"); | 152 | MODULE_PARM_DESC(ecc_ded_threshold, " ECC detected error threshold setting"); |
153 | 153 | ||
154 | module_param(ecc_ded_period, uint, S_IWUSR | S_IRUGO); | 154 | module_param(ecc_ded_period, uint, 0644); |
155 | MODULE_PARM_DESC(ecc_ded_period, " ECC detected error period (in seconds)"); | 155 | MODULE_PARM_DESC(ecc_ded_period, " ECC detected error period (in seconds)"); |
156 | #endif | 156 | #endif |
157 | 157 | ||
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-main.c b/drivers/net/ethernet/amd/xgbe/xgbe-main.c index d91fa595be98..795e556d4a3f 100644 --- a/drivers/net/ethernet/amd/xgbe/xgbe-main.c +++ b/drivers/net/ethernet/amd/xgbe/xgbe-main.c | |||
@@ -131,7 +131,7 @@ MODULE_VERSION(XGBE_DRV_VERSION); | |||
131 | MODULE_DESCRIPTION(XGBE_DRV_DESC); | 131 | MODULE_DESCRIPTION(XGBE_DRV_DESC); |
132 | 132 | ||
133 | static int debug = -1; | 133 | static int debug = -1; |
134 | module_param(debug, int, S_IWUSR | S_IRUGO); | 134 | module_param(debug, int, 0644); |
135 | MODULE_PARM_DESC(debug, " Network interface message level setting"); | 135 | MODULE_PARM_DESC(debug, " Network interface message level setting"); |
136 | 136 | ||
137 | static const u32 default_msg_level = (NETIF_MSG_LINK | NETIF_MSG_IFDOWN | | 137 | static const u32 default_msg_level = (NETIF_MSG_LINK | NETIF_MSG_IFDOWN | |
diff --git a/drivers/net/ethernet/broadcom/bnx2.c b/drivers/net/ethernet/broadcom/bnx2.c index 5e34b34f7740..9ffc4a8c5fc7 100644 --- a/drivers/net/ethernet/broadcom/bnx2.c +++ b/drivers/net/ethernet/broadcom/bnx2.c | |||
@@ -87,7 +87,7 @@ MODULE_FIRMWARE(FW_RV2P_FILE_09_Ax); | |||
87 | 87 | ||
88 | static int disable_msi = 0; | 88 | static int disable_msi = 0; |
89 | 89 | ||
90 | module_param(disable_msi, int, S_IRUGO); | 90 | module_param(disable_msi, int, 0444); |
91 | MODULE_PARM_DESC(disable_msi, "Disable Message Signaled Interrupt (MSI)"); | 91 | MODULE_PARM_DESC(disable_msi, "Disable Message Signaled Interrupt (MSI)"); |
92 | 92 | ||
93 | typedef enum { | 93 | typedef enum { |
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c index b8388e93520a..fd97250d6371 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | |||
@@ -97,29 +97,29 @@ MODULE_FIRMWARE(FW_FILE_NAME_E1H); | |||
97 | MODULE_FIRMWARE(FW_FILE_NAME_E2); | 97 | MODULE_FIRMWARE(FW_FILE_NAME_E2); |
98 | 98 | ||
99 | int bnx2x_num_queues; | 99 | int bnx2x_num_queues; |
100 | module_param_named(num_queues, bnx2x_num_queues, int, S_IRUGO); | 100 | module_param_named(num_queues, bnx2x_num_queues, int, 0444); |
101 | MODULE_PARM_DESC(num_queues, | 101 | MODULE_PARM_DESC(num_queues, |
102 | " Set number of queues (default is as a number of CPUs)"); | 102 | " Set number of queues (default is as a number of CPUs)"); |
103 | 103 | ||
104 | static int disable_tpa; | 104 | static int disable_tpa; |
105 | module_param(disable_tpa, int, S_IRUGO); | 105 | module_param(disable_tpa, int, 0444); |
106 | MODULE_PARM_DESC(disable_tpa, " Disable the TPA (LRO) feature"); | 106 | MODULE_PARM_DESC(disable_tpa, " Disable the TPA (LRO) feature"); |
107 | 107 | ||
108 | static int int_mode; | 108 | static int int_mode; |
109 | module_param(int_mode, int, S_IRUGO); | 109 | module_param(int_mode, int, 0444); |
110 | MODULE_PARM_DESC(int_mode, " Force interrupt mode other than MSI-X " | 110 | MODULE_PARM_DESC(int_mode, " Force interrupt mode other than MSI-X " |
111 | "(1 INT#x; 2 MSI)"); | 111 | "(1 INT#x; 2 MSI)"); |
112 | 112 | ||
113 | static int dropless_fc; | 113 | static int dropless_fc; |
114 | module_param(dropless_fc, int, S_IRUGO); | 114 | module_param(dropless_fc, int, 0444); |
115 | MODULE_PARM_DESC(dropless_fc, " Pause on exhausted host ring"); | 115 | MODULE_PARM_DESC(dropless_fc, " Pause on exhausted host ring"); |
116 | 116 | ||
117 | static int mrrs = -1; | 117 | static int mrrs = -1; |
118 | module_param(mrrs, int, S_IRUGO); | 118 | module_param(mrrs, int, 0444); |
119 | MODULE_PARM_DESC(mrrs, " Force Max Read Req Size (0..3) (for debug)"); | 119 | MODULE_PARM_DESC(mrrs, " Force Max Read Req Size (0..3) (for debug)"); |
120 | 120 | ||
121 | static int debug; | 121 | static int debug; |
122 | module_param(debug, int, S_IRUGO); | 122 | module_param(debug, int, 0444); |
123 | MODULE_PARM_DESC(debug, " Default debug msglevel"); | 123 | MODULE_PARM_DESC(debug, " Default debug msglevel"); |
124 | 124 | ||
125 | static struct workqueue_struct *bnx2x_wq; | 125 | static struct workqueue_struct *bnx2x_wq; |
diff --git a/drivers/net/ethernet/broadcom/sb1250-mac.c b/drivers/net/ethernet/broadcom/sb1250-mac.c index ecdef42f0ae6..ef4a0c326736 100644 --- a/drivers/net/ethernet/broadcom/sb1250-mac.c +++ b/drivers/net/ethernet/broadcom/sb1250-mac.c | |||
@@ -63,24 +63,24 @@ MODULE_DESCRIPTION("Broadcom SiByte SOC GB Ethernet driver"); | |||
63 | 63 | ||
64 | /* 1 normal messages, 0 quiet .. 7 verbose. */ | 64 | /* 1 normal messages, 0 quiet .. 7 verbose. */ |
65 | static int debug = 1; | 65 | static int debug = 1; |
66 | module_param(debug, int, S_IRUGO); | 66 | module_param(debug, int, 0444); |
67 | MODULE_PARM_DESC(debug, "Debug messages"); | 67 | MODULE_PARM_DESC(debug, "Debug messages"); |
68 | 68 | ||
69 | #ifdef CONFIG_SBMAC_COALESCE | 69 | #ifdef CONFIG_SBMAC_COALESCE |
70 | static int int_pktcnt_tx = 255; | 70 | static int int_pktcnt_tx = 255; |
71 | module_param(int_pktcnt_tx, int, S_IRUGO); | 71 | module_param(int_pktcnt_tx, int, 0444); |
72 | MODULE_PARM_DESC(int_pktcnt_tx, "TX packet count"); | 72 | MODULE_PARM_DESC(int_pktcnt_tx, "TX packet count"); |
73 | 73 | ||
74 | static int int_timeout_tx = 255; | 74 | static int int_timeout_tx = 255; |
75 | module_param(int_timeout_tx, int, S_IRUGO); | 75 | module_param(int_timeout_tx, int, 0444); |
76 | MODULE_PARM_DESC(int_timeout_tx, "TX timeout value"); | 76 | MODULE_PARM_DESC(int_timeout_tx, "TX timeout value"); |
77 | 77 | ||
78 | static int int_pktcnt_rx = 64; | 78 | static int int_pktcnt_rx = 64; |
79 | module_param(int_pktcnt_rx, int, S_IRUGO); | 79 | module_param(int_pktcnt_rx, int, 0444); |
80 | MODULE_PARM_DESC(int_pktcnt_rx, "RX packet count"); | 80 | MODULE_PARM_DESC(int_pktcnt_rx, "RX packet count"); |
81 | 81 | ||
82 | static int int_timeout_rx = 64; | 82 | static int int_timeout_rx = 64; |
83 | module_param(int_timeout_rx, int, S_IRUGO); | 83 | module_param(int_timeout_rx, int, 0444); |
84 | MODULE_PARM_DESC(int_timeout_rx, "RX timeout value"); | 84 | MODULE_PARM_DESC(int_timeout_rx, "RX timeout value"); |
85 | #endif | 85 | #endif |
86 | 86 | ||
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c index f2593978ae75..08bbb639be1a 100644 --- a/drivers/net/ethernet/broadcom/tg3.c +++ b/drivers/net/ethernet/broadcom/tg3.c | |||
@@ -10799,11 +10799,11 @@ static ssize_t tg3_show_temp(struct device *dev, | |||
10799 | } | 10799 | } |
10800 | 10800 | ||
10801 | 10801 | ||
10802 | static SENSOR_DEVICE_ATTR(temp1_input, S_IRUGO, tg3_show_temp, NULL, | 10802 | static SENSOR_DEVICE_ATTR(temp1_input, 0444, tg3_show_temp, NULL, |
10803 | TG3_TEMP_SENSOR_OFFSET); | 10803 | TG3_TEMP_SENSOR_OFFSET); |
10804 | static SENSOR_DEVICE_ATTR(temp1_crit, S_IRUGO, tg3_show_temp, NULL, | 10804 | static SENSOR_DEVICE_ATTR(temp1_crit, 0444, tg3_show_temp, NULL, |
10805 | TG3_TEMP_CAUTION_OFFSET); | 10805 | TG3_TEMP_CAUTION_OFFSET); |
10806 | static SENSOR_DEVICE_ATTR(temp1_max, S_IRUGO, tg3_show_temp, NULL, | 10806 | static SENSOR_DEVICE_ATTR(temp1_max, 0444, tg3_show_temp, NULL, |
10807 | TG3_TEMP_MAX_OFFSET); | 10807 | TG3_TEMP_MAX_OFFSET); |
10808 | 10808 | ||
10809 | static struct attribute *tg3_attrs[] = { | 10809 | static struct attribute *tg3_attrs[] = { |
diff --git a/drivers/net/ethernet/brocade/bna/bnad.c b/drivers/net/ethernet/brocade/bna/bnad.c index a843076597ec..69cc3e0119d6 100644 --- a/drivers/net/ethernet/brocade/bna/bnad.c +++ b/drivers/net/ethernet/brocade/bna/bnad.c | |||
@@ -46,7 +46,7 @@ module_param(bnad_ioc_auto_recover, uint, 0444); | |||
46 | MODULE_PARM_DESC(bnad_ioc_auto_recover, "Enable / Disable auto recovery"); | 46 | MODULE_PARM_DESC(bnad_ioc_auto_recover, "Enable / Disable auto recovery"); |
47 | 47 | ||
48 | static uint bna_debugfs_enable = 1; | 48 | static uint bna_debugfs_enable = 1; |
49 | module_param(bna_debugfs_enable, uint, S_IRUGO | S_IWUSR); | 49 | module_param(bna_debugfs_enable, uint, 0644); |
50 | MODULE_PARM_DESC(bna_debugfs_enable, "Enables debugfs feature, default=1," | 50 | MODULE_PARM_DESC(bna_debugfs_enable, "Enables debugfs feature, default=1," |
51 | " Range[false:0|true:1]"); | 51 | " Range[false:0|true:1]"); |
52 | 52 | ||
diff --git a/drivers/net/ethernet/brocade/bna/bnad_debugfs.c b/drivers/net/ethernet/brocade/bna/bnad_debugfs.c index cebfe3bd086e..933799be0471 100644 --- a/drivers/net/ethernet/brocade/bna/bnad_debugfs.c +++ b/drivers/net/ethernet/brocade/bna/bnad_debugfs.c | |||
@@ -486,11 +486,11 @@ struct bnad_debugfs_entry { | |||
486 | }; | 486 | }; |
487 | 487 | ||
488 | static const struct bnad_debugfs_entry bnad_debugfs_files[] = { | 488 | static const struct bnad_debugfs_entry bnad_debugfs_files[] = { |
489 | { "fwtrc", S_IFREG|S_IRUGO, &bnad_debugfs_op_fwtrc, }, | 489 | { "fwtrc", S_IFREG | 0444, &bnad_debugfs_op_fwtrc, }, |
490 | { "fwsave", S_IFREG|S_IRUGO, &bnad_debugfs_op_fwsave, }, | 490 | { "fwsave", S_IFREG | 0444, &bnad_debugfs_op_fwsave, }, |
491 | { "regrd", S_IFREG|S_IRUGO|S_IWUSR, &bnad_debugfs_op_regrd, }, | 491 | { "regrd", S_IFREG | 0644, &bnad_debugfs_op_regrd, }, |
492 | { "regwr", S_IFREG|S_IWUSR, &bnad_debugfs_op_regwr, }, | 492 | { "regwr", S_IFREG | 0200, &bnad_debugfs_op_regwr, }, |
493 | { "drvinfo", S_IFREG|S_IRUGO, &bnad_debugfs_op_drvinfo, }, | 493 | { "drvinfo", S_IFREG | 0444, &bnad_debugfs_op_drvinfo, }, |
494 | }; | 494 | }; |
495 | 495 | ||
496 | static struct dentry *bna_debugfs_root; | 496 | static struct dentry *bna_debugfs_root; |
diff --git a/drivers/net/ethernet/cavium/thunder/nicvf_main.c b/drivers/net/ethernet/cavium/thunder/nicvf_main.c index 7d9c5ffbd041..73fe3881414b 100644 --- a/drivers/net/ethernet/cavium/thunder/nicvf_main.c +++ b/drivers/net/ethernet/cavium/thunder/nicvf_main.c | |||
@@ -63,7 +63,7 @@ module_param(debug, int, 0644); | |||
63 | MODULE_PARM_DESC(debug, "Debug message level bitmap"); | 63 | MODULE_PARM_DESC(debug, "Debug message level bitmap"); |
64 | 64 | ||
65 | static int cpi_alg = CPI_ALG_NONE; | 65 | static int cpi_alg = CPI_ALG_NONE; |
66 | module_param(cpi_alg, int, S_IRUGO); | 66 | module_param(cpi_alg, int, 0444); |
67 | MODULE_PARM_DESC(cpi_alg, | 67 | MODULE_PARM_DESC(cpi_alg, |
68 | "PFC algorithm (0=none, 1=VLAN, 2=VLAN16, 3=IP Diffserv)"); | 68 | "PFC algorithm (0=none, 1=VLAN, 2=VLAN16, 3=IP Diffserv)"); |
69 | 69 | ||
diff --git a/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c b/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c index 185fe8df7628..2edfdbdaae48 100644 --- a/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c +++ b/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c | |||
@@ -776,11 +776,11 @@ static ssize_t store_nservers(struct device *d, struct device_attribute *attr, | |||
776 | 776 | ||
777 | #define CXGB3_ATTR_R(name, val_expr) \ | 777 | #define CXGB3_ATTR_R(name, val_expr) \ |
778 | CXGB3_SHOW(name, val_expr) \ | 778 | CXGB3_SHOW(name, val_expr) \ |
779 | static DEVICE_ATTR(name, S_IRUGO, show_##name, NULL) | 779 | static DEVICE_ATTR(name, 0444, show_##name, NULL) |
780 | 780 | ||
781 | #define CXGB3_ATTR_RW(name, val_expr, store_method) \ | 781 | #define CXGB3_ATTR_RW(name, val_expr, store_method) \ |
782 | CXGB3_SHOW(name, val_expr) \ | 782 | CXGB3_SHOW(name, val_expr) \ |
783 | static DEVICE_ATTR(name, S_IRUGO | S_IWUSR, show_##name, store_method) | 783 | static DEVICE_ATTR(name, 0644, show_##name, store_method) |
784 | 784 | ||
785 | CXGB3_ATTR_R(cam_size, t3_mc5_size(&adap->mc5)); | 785 | CXGB3_ATTR_R(cam_size, t3_mc5_size(&adap->mc5)); |
786 | CXGB3_ATTR_RW(nfilters, adap->params.mc5.nfilters, store_nfilters); | 786 | CXGB3_ATTR_RW(nfilters, adap->params.mc5.nfilters, store_nfilters); |
@@ -859,7 +859,7 @@ static ssize_t store_##name(struct device *d, struct device_attribute *attr, \ | |||
859 | { \ | 859 | { \ |
860 | return tm_attr_store(d, buf, len, sched); \ | 860 | return tm_attr_store(d, buf, len, sched); \ |
861 | } \ | 861 | } \ |
862 | static DEVICE_ATTR(name, S_IRUGO | S_IWUSR, show_##name, store_##name) | 862 | static DEVICE_ATTR(name, 0644, show_##name, store_##name) |
863 | 863 | ||
864 | TM_ATTR(sched0, 0); | 864 | TM_ATTR(sched0, 0); |
865 | TM_ATTR(sched1, 1); | 865 | TM_ATTR(sched1, 1); |
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c index de2ba86eccfd..251d5bdc972f 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c | |||
@@ -2752,7 +2752,7 @@ DEFINE_SIMPLE_DEBUGFS_FILE(tid_info); | |||
2752 | static void add_debugfs_mem(struct adapter *adap, const char *name, | 2752 | static void add_debugfs_mem(struct adapter *adap, const char *name, |
2753 | unsigned int idx, unsigned int size_mb) | 2753 | unsigned int idx, unsigned int size_mb) |
2754 | { | 2754 | { |
2755 | debugfs_create_file_size(name, S_IRUSR, adap->debugfs_root, | 2755 | debugfs_create_file_size(name, 0400, adap->debugfs_root, |
2756 | (void *)adap + idx, &mem_debugfs_fops, | 2756 | (void *)adap + idx, &mem_debugfs_fops, |
2757 | size_mb << 20); | 2757 | size_mb << 20); |
2758 | } | 2758 | } |
@@ -2947,65 +2947,65 @@ int t4_setup_debugfs(struct adapter *adap) | |||
2947 | struct dentry *de; | 2947 | struct dentry *de; |
2948 | 2948 | ||
2949 | static struct t4_debugfs_entry t4_debugfs_files[] = { | 2949 | static struct t4_debugfs_entry t4_debugfs_files[] = { |
2950 | { "cim_la", &cim_la_fops, S_IRUSR, 0 }, | 2950 | { "cim_la", &cim_la_fops, 0400, 0 }, |
2951 | { "cim_pif_la", &cim_pif_la_fops, S_IRUSR, 0 }, | 2951 | { "cim_pif_la", &cim_pif_la_fops, 0400, 0 }, |
2952 | { "cim_ma_la", &cim_ma_la_fops, S_IRUSR, 0 }, | 2952 | { "cim_ma_la", &cim_ma_la_fops, 0400, 0 }, |
2953 | { "cim_qcfg", &cim_qcfg_fops, S_IRUSR, 0 }, | 2953 | { "cim_qcfg", &cim_qcfg_fops, 0400, 0 }, |
2954 | { "clk", &clk_debugfs_fops, S_IRUSR, 0 }, | 2954 | { "clk", &clk_debugfs_fops, 0400, 0 }, |
2955 | { "devlog", &devlog_fops, S_IRUSR, 0 }, | 2955 | { "devlog", &devlog_fops, 0400, 0 }, |
2956 | { "mboxlog", &mboxlog_fops, S_IRUSR, 0 }, | 2956 | { "mboxlog", &mboxlog_fops, 0400, 0 }, |
2957 | { "mbox0", &mbox_debugfs_fops, S_IRUSR | S_IWUSR, 0 }, | 2957 | { "mbox0", &mbox_debugfs_fops, 0600, 0 }, |
2958 | { "mbox1", &mbox_debugfs_fops, S_IRUSR | S_IWUSR, 1 }, | 2958 | { "mbox1", &mbox_debugfs_fops, 0600, 1 }, |
2959 | { "mbox2", &mbox_debugfs_fops, S_IRUSR | S_IWUSR, 2 }, | 2959 | { "mbox2", &mbox_debugfs_fops, 0600, 2 }, |
2960 | { "mbox3", &mbox_debugfs_fops, S_IRUSR | S_IWUSR, 3 }, | 2960 | { "mbox3", &mbox_debugfs_fops, 0600, 3 }, |
2961 | { "mbox4", &mbox_debugfs_fops, S_IRUSR | S_IWUSR, 4 }, | 2961 | { "mbox4", &mbox_debugfs_fops, 0600, 4 }, |
2962 | { "mbox5", &mbox_debugfs_fops, S_IRUSR | S_IWUSR, 5 }, | 2962 | { "mbox5", &mbox_debugfs_fops, 0600, 5 }, |
2963 | { "mbox6", &mbox_debugfs_fops, S_IRUSR | S_IWUSR, 6 }, | 2963 | { "mbox6", &mbox_debugfs_fops, 0600, 6 }, |
2964 | { "mbox7", &mbox_debugfs_fops, S_IRUSR | S_IWUSR, 7 }, | 2964 | { "mbox7", &mbox_debugfs_fops, 0600, 7 }, |
2965 | { "trace0", &mps_trc_debugfs_fops, S_IRUSR | S_IWUSR, 0 }, | 2965 | { "trace0", &mps_trc_debugfs_fops, 0600, 0 }, |
2966 | { "trace1", &mps_trc_debugfs_fops, S_IRUSR | S_IWUSR, 1 }, | 2966 | { "trace1", &mps_trc_debugfs_fops, 0600, 1 }, |
2967 | { "trace2", &mps_trc_debugfs_fops, S_IRUSR | S_IWUSR, 2 }, | 2967 | { "trace2", &mps_trc_debugfs_fops, 0600, 2 }, |
2968 | { "trace3", &mps_trc_debugfs_fops, S_IRUSR | S_IWUSR, 3 }, | 2968 | { "trace3", &mps_trc_debugfs_fops, 0600, 3 }, |
2969 | { "l2t", &t4_l2t_fops, S_IRUSR, 0}, | 2969 | { "l2t", &t4_l2t_fops, 0400, 0}, |
2970 | { "mps_tcam", &mps_tcam_debugfs_fops, S_IRUSR, 0 }, | 2970 | { "mps_tcam", &mps_tcam_debugfs_fops, 0400, 0 }, |
2971 | { "rss", &rss_debugfs_fops, S_IRUSR, 0 }, | 2971 | { "rss", &rss_debugfs_fops, 0400, 0 }, |
2972 | { "rss_config", &rss_config_debugfs_fops, S_IRUSR, 0 }, | 2972 | { "rss_config", &rss_config_debugfs_fops, 0400, 0 }, |
2973 | { "rss_key", &rss_key_debugfs_fops, S_IRUSR, 0 }, | 2973 | { "rss_key", &rss_key_debugfs_fops, 0400, 0 }, |
2974 | { "rss_pf_config", &rss_pf_config_debugfs_fops, S_IRUSR, 0 }, | 2974 | { "rss_pf_config", &rss_pf_config_debugfs_fops, 0400, 0 }, |
2975 | { "rss_vf_config", &rss_vf_config_debugfs_fops, S_IRUSR, 0 }, | 2975 | { "rss_vf_config", &rss_vf_config_debugfs_fops, 0400, 0 }, |
2976 | { "sge_qinfo", &sge_qinfo_debugfs_fops, S_IRUSR, 0 }, | 2976 | { "sge_qinfo", &sge_qinfo_debugfs_fops, 0400, 0 }, |
2977 | { "ibq_tp0", &cim_ibq_fops, S_IRUSR, 0 }, | 2977 | { "ibq_tp0", &cim_ibq_fops, 0400, 0 }, |
2978 | { "ibq_tp1", &cim_ibq_fops, S_IRUSR, 1 }, | 2978 | { "ibq_tp1", &cim_ibq_fops, 0400, 1 }, |
2979 | { "ibq_ulp", &cim_ibq_fops, S_IRUSR, 2 }, | 2979 | { "ibq_ulp", &cim_ibq_fops, 0400, 2 }, |
2980 | { "ibq_sge0", &cim_ibq_fops, S_IRUSR, 3 }, | 2980 | { "ibq_sge0", &cim_ibq_fops, 0400, 3 }, |
2981 | { "ibq_sge1", &cim_ibq_fops, S_IRUSR, 4 }, | 2981 | { "ibq_sge1", &cim_ibq_fops, 0400, 4 }, |
2982 | { "ibq_ncsi", &cim_ibq_fops, S_IRUSR, 5 }, | 2982 | { "ibq_ncsi", &cim_ibq_fops, 0400, 5 }, |
2983 | { "obq_ulp0", &cim_obq_fops, S_IRUSR, 0 }, | 2983 | { "obq_ulp0", &cim_obq_fops, 0400, 0 }, |
2984 | { "obq_ulp1", &cim_obq_fops, S_IRUSR, 1 }, | 2984 | { "obq_ulp1", &cim_obq_fops, 0400, 1 }, |
2985 | { "obq_ulp2", &cim_obq_fops, S_IRUSR, 2 }, | 2985 | { "obq_ulp2", &cim_obq_fops, 0400, 2 }, |
2986 | { "obq_ulp3", &cim_obq_fops, S_IRUSR, 3 }, | 2986 | { "obq_ulp3", &cim_obq_fops, 0400, 3 }, |
2987 | { "obq_sge", &cim_obq_fops, S_IRUSR, 4 }, | 2987 | { "obq_sge", &cim_obq_fops, 0400, 4 }, |
2988 | { "obq_ncsi", &cim_obq_fops, S_IRUSR, 5 }, | 2988 | { "obq_ncsi", &cim_obq_fops, 0400, 5 }, |
2989 | { "tp_la", &tp_la_fops, S_IRUSR, 0 }, | 2989 | { "tp_la", &tp_la_fops, 0400, 0 }, |
2990 | { "ulprx_la", &ulprx_la_fops, S_IRUSR, 0 }, | 2990 | { "ulprx_la", &ulprx_la_fops, 0400, 0 }, |
2991 | { "sensors", &sensors_debugfs_fops, S_IRUSR, 0 }, | 2991 | { "sensors", &sensors_debugfs_fops, 0400, 0 }, |
2992 | { "pm_stats", &pm_stats_debugfs_fops, S_IRUSR, 0 }, | 2992 | { "pm_stats", &pm_stats_debugfs_fops, 0400, 0 }, |
2993 | { "tx_rate", &tx_rate_debugfs_fops, S_IRUSR, 0 }, | 2993 | { "tx_rate", &tx_rate_debugfs_fops, 0400, 0 }, |
2994 | { "cctrl", &cctrl_tbl_debugfs_fops, S_IRUSR, 0 }, | 2994 | { "cctrl", &cctrl_tbl_debugfs_fops, 0400, 0 }, |
2995 | #if IS_ENABLED(CONFIG_IPV6) | 2995 | #if IS_ENABLED(CONFIG_IPV6) |
2996 | { "clip_tbl", &clip_tbl_debugfs_fops, S_IRUSR, 0 }, | 2996 | { "clip_tbl", &clip_tbl_debugfs_fops, 0400, 0 }, |
2997 | #endif | 2997 | #endif |
2998 | { "tids", &tid_info_debugfs_fops, S_IRUSR, 0}, | 2998 | { "tids", &tid_info_debugfs_fops, 0400, 0}, |
2999 | { "blocked_fl", &blocked_fl_fops, S_IRUSR | S_IWUSR, 0 }, | 2999 | { "blocked_fl", &blocked_fl_fops, 0600, 0 }, |
3000 | { "meminfo", &meminfo_fops, S_IRUSR, 0 }, | 3000 | { "meminfo", &meminfo_fops, 0400, 0 }, |
3001 | { "crypto", &chcr_stats_debugfs_fops, S_IRUSR, 0 }, | 3001 | { "crypto", &chcr_stats_debugfs_fops, 0400, 0 }, |
3002 | }; | 3002 | }; |
3003 | 3003 | ||
3004 | /* Debug FS nodes common to all T5 and later adapters. | 3004 | /* Debug FS nodes common to all T5 and later adapters. |
3005 | */ | 3005 | */ |
3006 | static struct t4_debugfs_entry t5_debugfs_files[] = { | 3006 | static struct t4_debugfs_entry t5_debugfs_files[] = { |
3007 | { "obq_sge_rx_q0", &cim_obq_fops, S_IRUSR, 6 }, | 3007 | { "obq_sge_rx_q0", &cim_obq_fops, 0400, 6 }, |
3008 | { "obq_sge_rx_q1", &cim_obq_fops, S_IRUSR, 7 }, | 3008 | { "obq_sge_rx_q1", &cim_obq_fops, 0400, 7 }, |
3009 | }; | 3009 | }; |
3010 | 3010 | ||
3011 | add_debugfs_files(adap, | 3011 | add_debugfs_files(adap, |
@@ -3050,11 +3050,11 @@ int t4_setup_debugfs(struct adapter *adap) | |||
3050 | } | 3050 | } |
3051 | } | 3051 | } |
3052 | 3052 | ||
3053 | de = debugfs_create_file_size("flash", S_IRUSR, adap->debugfs_root, adap, | 3053 | de = debugfs_create_file_size("flash", 0400, adap->debugfs_root, adap, |
3054 | &flash_debugfs_fops, adap->params.sf_size); | 3054 | &flash_debugfs_fops, adap->params.sf_size); |
3055 | debugfs_create_bool("use_backdoor", S_IWUSR | S_IRUSR, | 3055 | debugfs_create_bool("use_backdoor", 0600, |
3056 | adap->debugfs_root, &adap->use_bd); | 3056 | adap->debugfs_root, &adap->use_bd); |
3057 | debugfs_create_bool("trace_rss", S_IWUSR | S_IRUSR, | 3057 | debugfs_create_bool("trace_rss", 0600, |
3058 | adap->debugfs_root, &adap->trace_rss); | 3058 | adap->debugfs_root, &adap->trace_rss); |
3059 | 3059 | ||
3060 | return 0; | 3060 | return 0; |
diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c index 7bd8497fd9be..9a81b52307a9 100644 --- a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c +++ b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c | |||
@@ -2402,11 +2402,11 @@ struct cxgb4vf_debugfs_entry { | |||
2402 | }; | 2402 | }; |
2403 | 2403 | ||
2404 | static struct cxgb4vf_debugfs_entry debugfs_files[] = { | 2404 | static struct cxgb4vf_debugfs_entry debugfs_files[] = { |
2405 | { "mboxlog", S_IRUGO, &mboxlog_fops }, | 2405 | { "mboxlog", 0444, &mboxlog_fops }, |
2406 | { "sge_qinfo", S_IRUGO, &sge_qinfo_debugfs_fops }, | 2406 | { "sge_qinfo", 0444, &sge_qinfo_debugfs_fops }, |
2407 | { "sge_qstats", S_IRUGO, &sge_qstats_proc_fops }, | 2407 | { "sge_qstats", 0444, &sge_qstats_proc_fops }, |
2408 | { "resources", S_IRUGO, &resources_proc_fops }, | 2408 | { "resources", 0444, &resources_proc_fops }, |
2409 | { "interfaces", S_IRUGO, &interfaces_proc_fops }, | 2409 | { "interfaces", 0444, &interfaces_proc_fops }, |
2410 | }; | 2410 | }; |
2411 | 2411 | ||
2412 | /* | 2412 | /* |
diff --git a/drivers/net/ethernet/ec_bhf.c b/drivers/net/ethernet/ec_bhf.c index 1b79a6defd56..d71cba0842c5 100644 --- a/drivers/net/ethernet/ec_bhf.c +++ b/drivers/net/ethernet/ec_bhf.c | |||
@@ -602,7 +602,7 @@ static struct pci_driver pci_driver = { | |||
602 | }; | 602 | }; |
603 | module_pci_driver(pci_driver); | 603 | module_pci_driver(pci_driver); |
604 | 604 | ||
605 | module_param(polling_frequency, long, S_IRUGO); | 605 | module_param(polling_frequency, long, 0444); |
606 | MODULE_PARM_DESC(polling_frequency, "Polling timer frequency in ns"); | 606 | MODULE_PARM_DESC(polling_frequency, "Polling timer frequency in ns"); |
607 | 607 | ||
608 | MODULE_LICENSE("GPL"); | 608 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c index 5774fb6f8aa0..c697e79e491e 100644 --- a/drivers/net/ethernet/emulex/benet/be_main.c +++ b/drivers/net/ethernet/emulex/benet/be_main.c | |||
@@ -34,11 +34,11 @@ MODULE_LICENSE("GPL"); | |||
34 | * Use sysfs method to enable/disable VFs. | 34 | * Use sysfs method to enable/disable VFs. |
35 | */ | 35 | */ |
36 | static unsigned int num_vfs; | 36 | static unsigned int num_vfs; |
37 | module_param(num_vfs, uint, S_IRUGO); | 37 | module_param(num_vfs, uint, 0444); |
38 | MODULE_PARM_DESC(num_vfs, "Number of PCI VFs to initialize"); | 38 | MODULE_PARM_DESC(num_vfs, "Number of PCI VFs to initialize"); |
39 | 39 | ||
40 | static ushort rx_frag_size = 2048; | 40 | static ushort rx_frag_size = 2048; |
41 | module_param(rx_frag_size, ushort, S_IRUGO); | 41 | module_param(rx_frag_size, ushort, 0444); |
42 | MODULE_PARM_DESC(rx_frag_size, "Size of a fragment that holds rcvd data."); | 42 | MODULE_PARM_DESC(rx_frag_size, "Size of a fragment that holds rcvd data."); |
43 | 43 | ||
44 | /* Per-module error detection/recovery workq shared across all functions. | 44 | /* Per-module error detection/recovery workq shared across all functions. |
@@ -5788,7 +5788,7 @@ static ssize_t be_hwmon_show_temp(struct device *dev, | |||
5788 | adapter->hwmon_info.be_on_die_temp * 1000); | 5788 | adapter->hwmon_info.be_on_die_temp * 1000); |
5789 | } | 5789 | } |
5790 | 5790 | ||
5791 | static SENSOR_DEVICE_ATTR(temp1_input, S_IRUGO, | 5791 | static SENSOR_DEVICE_ATTR(temp1_input, 0444, |
5792 | be_hwmon_show_temp, NULL, 1); | 5792 | be_hwmon_show_temp, NULL, 1); |
5793 | 5793 | ||
5794 | static struct attribute *be_hwmon_attrs[] = { | 5794 | static struct attribute *be_hwmon_attrs[] = { |
diff --git a/drivers/net/ethernet/ibm/ehea/ehea_main.c b/drivers/net/ethernet/ibm/ehea/ehea_main.c index 4878b7169e0f..ba580bfae512 100644 --- a/drivers/net/ethernet/ibm/ehea/ehea_main.c +++ b/drivers/net/ethernet/ibm/ehea/ehea_main.c | |||
@@ -2903,8 +2903,7 @@ static ssize_t ehea_show_port_id(struct device *dev, | |||
2903 | return sprintf(buf, "%d", port->logical_port_id); | 2903 | return sprintf(buf, "%d", port->logical_port_id); |
2904 | } | 2904 | } |
2905 | 2905 | ||
2906 | static DEVICE_ATTR(log_port_id, S_IRUSR | S_IRGRP | S_IROTH, ehea_show_port_id, | 2906 | static DEVICE_ATTR(log_port_id, 0444, ehea_show_port_id, NULL); |
2907 | NULL); | ||
2908 | 2907 | ||
2909 | static void logical_port_release(struct device *dev) | 2908 | static void logical_port_release(struct device *dev) |
2910 | { | 2909 | { |
@@ -3235,8 +3234,8 @@ static ssize_t ehea_remove_port(struct device *dev, | |||
3235 | return (ssize_t) count; | 3234 | return (ssize_t) count; |
3236 | } | 3235 | } |
3237 | 3236 | ||
3238 | static DEVICE_ATTR(probe_port, S_IWUSR, NULL, ehea_probe_port); | 3237 | static DEVICE_ATTR(probe_port, 0200, NULL, ehea_probe_port); |
3239 | static DEVICE_ATTR(remove_port, S_IWUSR, NULL, ehea_remove_port); | 3238 | static DEVICE_ATTR(remove_port, 0200, NULL, ehea_remove_port); |
3240 | 3239 | ||
3241 | static int ehea_create_device_sysfs(struct platform_device *dev) | 3240 | static int ehea_create_device_sysfs(struct platform_device *dev) |
3242 | { | 3241 | { |
diff --git a/drivers/net/ethernet/ibm/ibmveth.c b/drivers/net/ethernet/ibm/ibmveth.c index f210398200ec..c1b51edaaf62 100644 --- a/drivers/net/ethernet/ibm/ibmveth.c +++ b/drivers/net/ethernet/ibm/ibmveth.c | |||
@@ -82,7 +82,7 @@ module_param(rx_flush, uint, 0644); | |||
82 | MODULE_PARM_DESC(rx_flush, "Flush receive buffers before use"); | 82 | MODULE_PARM_DESC(rx_flush, "Flush receive buffers before use"); |
83 | 83 | ||
84 | static bool old_large_send __read_mostly; | 84 | static bool old_large_send __read_mostly; |
85 | module_param(old_large_send, bool, S_IRUGO); | 85 | module_param(old_large_send, bool, 0444); |
86 | MODULE_PARM_DESC(old_large_send, | 86 | MODULE_PARM_DESC(old_large_send, |
87 | "Use old large send method on firmware that supports the new method"); | 87 | "Use old large send method on firmware that supports the new method"); |
88 | 88 | ||
diff --git a/drivers/net/ethernet/intel/igb/igb_hwmon.c b/drivers/net/ethernet/intel/igb/igb_hwmon.c index 41b306fb90f8..bebe43b3a836 100644 --- a/drivers/net/ethernet/intel/igb/igb_hwmon.c +++ b/drivers/net/ethernet/intel/igb/igb_hwmon.c | |||
@@ -148,7 +148,7 @@ static int igb_add_hwmon_attr(struct igb_adapter *adapter, | |||
148 | &adapter->hw.mac.thermal_sensor_data.sensor[offset]; | 148 | &adapter->hw.mac.thermal_sensor_data.sensor[offset]; |
149 | igb_attr->hw = &adapter->hw; | 149 | igb_attr->hw = &adapter->hw; |
150 | igb_attr->dev_attr.store = NULL; | 150 | igb_attr->dev_attr.store = NULL; |
151 | igb_attr->dev_attr.attr.mode = S_IRUGO; | 151 | igb_attr->dev_attr.attr.mode = 0444; |
152 | igb_attr->dev_attr.attr.name = igb_attr->name; | 152 | igb_attr->dev_attr.attr.name = igb_attr->name; |
153 | sysfs_attr_init(&igb_attr->dev_attr.attr); | 153 | sysfs_attr_init(&igb_attr->dev_attr.attr); |
154 | 154 | ||
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_sysfs.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_sysfs.c index ef6df3d6437e..24766e125592 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_sysfs.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_sysfs.c | |||
@@ -146,7 +146,7 @@ static int ixgbe_add_hwmon_attr(struct ixgbe_adapter *adapter, | |||
146 | &adapter->hw.mac.thermal_sensor_data.sensor[offset]; | 146 | &adapter->hw.mac.thermal_sensor_data.sensor[offset]; |
147 | ixgbe_attr->hw = &adapter->hw; | 147 | ixgbe_attr->hw = &adapter->hw; |
148 | ixgbe_attr->dev_attr.store = NULL; | 148 | ixgbe_attr->dev_attr.store = NULL; |
149 | ixgbe_attr->dev_attr.attr.mode = S_IRUGO; | 149 | ixgbe_attr->dev_attr.attr.mode = 0444; |
150 | ixgbe_attr->dev_attr.attr.name = ixgbe_attr->name; | 150 | ixgbe_attr->dev_attr.attr.name = ixgbe_attr->name; |
151 | sysfs_attr_init(&ixgbe_attr->dev_attr.attr); | 151 | sysfs_attr_init(&ixgbe_attr->dev_attr.attr); |
152 | 152 | ||
diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c index 25e9a551cc8c..eaa4bb80f1c9 100644 --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c | |||
@@ -4655,8 +4655,8 @@ MODULE_DESCRIPTION("Marvell NETA Ethernet Driver - www.marvell.com"); | |||
4655 | MODULE_AUTHOR("Rami Rosen <rosenr@marvell.com>, Thomas Petazzoni <thomas.petazzoni@free-electrons.com>"); | 4655 | MODULE_AUTHOR("Rami Rosen <rosenr@marvell.com>, Thomas Petazzoni <thomas.petazzoni@free-electrons.com>"); |
4656 | MODULE_LICENSE("GPL"); | 4656 | MODULE_LICENSE("GPL"); |
4657 | 4657 | ||
4658 | module_param(rxq_number, int, S_IRUGO); | 4658 | module_param(rxq_number, int, 0444); |
4659 | module_param(txq_number, int, S_IRUGO); | 4659 | module_param(txq_number, int, 0444); |
4660 | 4660 | ||
4661 | module_param(rxq_def, int, S_IRUGO); | 4661 | module_param(rxq_def, int, 0444); |
4662 | module_param(rx_copybreak, int, S_IRUGO | S_IWUSR); | 4662 | module_param(rx_copybreak, int, 0644); |
diff --git a/drivers/net/ethernet/marvell/skge.c b/drivers/net/ethernet/marvell/skge.c index 31efc47c847e..9c08c3650c02 100644 --- a/drivers/net/ethernet/marvell/skge.c +++ b/drivers/net/ethernet/marvell/skge.c | |||
@@ -3783,7 +3783,7 @@ static int skge_device_event(struct notifier_block *unused, | |||
3783 | break; | 3783 | break; |
3784 | 3784 | ||
3785 | case NETDEV_UP: | 3785 | case NETDEV_UP: |
3786 | d = debugfs_create_file(dev->name, S_IRUGO, | 3786 | d = debugfs_create_file(dev->name, 0444, |
3787 | skge_debug, dev, | 3787 | skge_debug, dev, |
3788 | &skge_debug_fops); | 3788 | &skge_debug_fops); |
3789 | if (!d || IS_ERR(d)) | 3789 | if (!d || IS_ERR(d)) |
diff --git a/drivers/net/ethernet/marvell/sky2.c b/drivers/net/ethernet/marvell/sky2.c index 9fe85300e7b6..9b77db7c13d0 100644 --- a/drivers/net/ethernet/marvell/sky2.c +++ b/drivers/net/ethernet/marvell/sky2.c | |||
@@ -4667,7 +4667,7 @@ static int sky2_device_event(struct notifier_block *unused, | |||
4667 | break; | 4667 | break; |
4668 | 4668 | ||
4669 | case NETDEV_UP: | 4669 | case NETDEV_UP: |
4670 | sky2->debugfs = debugfs_create_file(dev->name, S_IRUGO, | 4670 | sky2->debugfs = debugfs_create_file(dev->name, 0444, |
4671 | sky2_debug, dev, | 4671 | sky2_debug, dev, |
4672 | &sky2_debug_fops); | 4672 | &sky2_debug_fops); |
4673 | if (IS_ERR(sky2->debugfs)) | 4673 | if (IS_ERR(sky2->debugfs)) |
diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c index 4d84cab77105..5a26851b4ffd 100644 --- a/drivers/net/ethernet/mellanox/mlx4/main.c +++ b/drivers/net/ethernet/mellanox/mlx4/main.c | |||
@@ -2993,10 +2993,10 @@ static int mlx4_init_port_info(struct mlx4_dev *dev, int port) | |||
2993 | 2993 | ||
2994 | sprintf(info->dev_name, "mlx4_port%d", port); | 2994 | sprintf(info->dev_name, "mlx4_port%d", port); |
2995 | info->port_attr.attr.name = info->dev_name; | 2995 | info->port_attr.attr.name = info->dev_name; |
2996 | if (mlx4_is_mfunc(dev)) | 2996 | if (mlx4_is_mfunc(dev)) { |
2997 | info->port_attr.attr.mode = S_IRUGO; | 2997 | info->port_attr.attr.mode = 0444; |
2998 | else { | 2998 | } else { |
2999 | info->port_attr.attr.mode = S_IRUGO | S_IWUSR; | 2999 | info->port_attr.attr.mode = 0644; |
3000 | info->port_attr.store = set_port_type; | 3000 | info->port_attr.store = set_port_type; |
3001 | } | 3001 | } |
3002 | info->port_attr.show = show_port_type; | 3002 | info->port_attr.show = show_port_type; |
@@ -3011,10 +3011,10 @@ static int mlx4_init_port_info(struct mlx4_dev *dev, int port) | |||
3011 | 3011 | ||
3012 | sprintf(info->dev_mtu_name, "mlx4_port%d_mtu", port); | 3012 | sprintf(info->dev_mtu_name, "mlx4_port%d_mtu", port); |
3013 | info->port_mtu_attr.attr.name = info->dev_mtu_name; | 3013 | info->port_mtu_attr.attr.name = info->dev_mtu_name; |
3014 | if (mlx4_is_mfunc(dev)) | 3014 | if (mlx4_is_mfunc(dev)) { |
3015 | info->port_mtu_attr.attr.mode = S_IRUGO; | 3015 | info->port_mtu_attr.attr.mode = 0444; |
3016 | else { | 3016 | } else { |
3017 | info->port_mtu_attr.attr.mode = S_IRUGO | S_IWUSR; | 3017 | info->port_mtu_attr.attr.mode = 0644; |
3018 | info->port_mtu_attr.store = set_port_ib_mtu; | 3018 | info->port_mtu_attr.store = set_port_ib_mtu; |
3019 | } | 3019 | } |
3020 | info->port_mtu_attr.show = show_port_ib_mtu; | 3020 | info->port_mtu_attr.show = show_port_ib_mtu; |
diff --git a/drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c b/drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c index ab710e37af99..84185f8dfbae 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c +++ b/drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c | |||
@@ -218,32 +218,32 @@ static void mlxsw_hwmon_attr_add(struct mlxsw_hwmon *mlxsw_hwmon, | |||
218 | switch (attr_type) { | 218 | switch (attr_type) { |
219 | case MLXSW_HWMON_ATTR_TYPE_TEMP: | 219 | case MLXSW_HWMON_ATTR_TYPE_TEMP: |
220 | mlxsw_hwmon_attr->dev_attr.show = mlxsw_hwmon_temp_show; | 220 | mlxsw_hwmon_attr->dev_attr.show = mlxsw_hwmon_temp_show; |
221 | mlxsw_hwmon_attr->dev_attr.attr.mode = S_IRUGO; | 221 | mlxsw_hwmon_attr->dev_attr.attr.mode = 0444; |
222 | snprintf(mlxsw_hwmon_attr->name, sizeof(mlxsw_hwmon_attr->name), | 222 | snprintf(mlxsw_hwmon_attr->name, sizeof(mlxsw_hwmon_attr->name), |
223 | "temp%u_input", num + 1); | 223 | "temp%u_input", num + 1); |
224 | break; | 224 | break; |
225 | case MLXSW_HWMON_ATTR_TYPE_TEMP_MAX: | 225 | case MLXSW_HWMON_ATTR_TYPE_TEMP_MAX: |
226 | mlxsw_hwmon_attr->dev_attr.show = mlxsw_hwmon_temp_max_show; | 226 | mlxsw_hwmon_attr->dev_attr.show = mlxsw_hwmon_temp_max_show; |
227 | mlxsw_hwmon_attr->dev_attr.attr.mode = S_IRUGO; | 227 | mlxsw_hwmon_attr->dev_attr.attr.mode = 0444; |
228 | snprintf(mlxsw_hwmon_attr->name, sizeof(mlxsw_hwmon_attr->name), | 228 | snprintf(mlxsw_hwmon_attr->name, sizeof(mlxsw_hwmon_attr->name), |
229 | "temp%u_highest", num + 1); | 229 | "temp%u_highest", num + 1); |
230 | break; | 230 | break; |
231 | case MLXSW_HWMON_ATTR_TYPE_TEMP_RST: | 231 | case MLXSW_HWMON_ATTR_TYPE_TEMP_RST: |
232 | mlxsw_hwmon_attr->dev_attr.store = mlxsw_hwmon_temp_rst_store; | 232 | mlxsw_hwmon_attr->dev_attr.store = mlxsw_hwmon_temp_rst_store; |
233 | mlxsw_hwmon_attr->dev_attr.attr.mode = S_IWUSR; | 233 | mlxsw_hwmon_attr->dev_attr.attr.mode = 0200; |
234 | snprintf(mlxsw_hwmon_attr->name, sizeof(mlxsw_hwmon_attr->name), | 234 | snprintf(mlxsw_hwmon_attr->name, sizeof(mlxsw_hwmon_attr->name), |
235 | "temp%u_reset_history", num + 1); | 235 | "temp%u_reset_history", num + 1); |
236 | break; | 236 | break; |
237 | case MLXSW_HWMON_ATTR_TYPE_FAN_RPM: | 237 | case MLXSW_HWMON_ATTR_TYPE_FAN_RPM: |
238 | mlxsw_hwmon_attr->dev_attr.show = mlxsw_hwmon_fan_rpm_show; | 238 | mlxsw_hwmon_attr->dev_attr.show = mlxsw_hwmon_fan_rpm_show; |
239 | mlxsw_hwmon_attr->dev_attr.attr.mode = S_IRUGO; | 239 | mlxsw_hwmon_attr->dev_attr.attr.mode = 0444; |
240 | snprintf(mlxsw_hwmon_attr->name, sizeof(mlxsw_hwmon_attr->name), | 240 | snprintf(mlxsw_hwmon_attr->name, sizeof(mlxsw_hwmon_attr->name), |
241 | "fan%u_input", num + 1); | 241 | "fan%u_input", num + 1); |
242 | break; | 242 | break; |
243 | case MLXSW_HWMON_ATTR_TYPE_PWM: | 243 | case MLXSW_HWMON_ATTR_TYPE_PWM: |
244 | mlxsw_hwmon_attr->dev_attr.show = mlxsw_hwmon_pwm_show; | 244 | mlxsw_hwmon_attr->dev_attr.show = mlxsw_hwmon_pwm_show; |
245 | mlxsw_hwmon_attr->dev_attr.store = mlxsw_hwmon_pwm_store; | 245 | mlxsw_hwmon_attr->dev_attr.store = mlxsw_hwmon_pwm_store; |
246 | mlxsw_hwmon_attr->dev_attr.attr.mode = S_IWUSR | S_IRUGO; | 246 | mlxsw_hwmon_attr->dev_attr.attr.mode = 0644; |
247 | snprintf(mlxsw_hwmon_attr->name, sizeof(mlxsw_hwmon_attr->name), | 247 | snprintf(mlxsw_hwmon_attr->name, sizeof(mlxsw_hwmon_attr->name), |
248 | "pwm%u", num + 1); | 248 | "pwm%u", num + 1); |
249 | break; | 249 | break; |
diff --git a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c index 2521c8c40015..b2d2ec8c11e2 100644 --- a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c +++ b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c | |||
@@ -266,7 +266,7 @@ MODULE_FIRMWARE("myri10ge_rss_eth_z8e.dat"); | |||
266 | 266 | ||
267 | /* Careful: must be accessed under kernel_param_lock() */ | 267 | /* Careful: must be accessed under kernel_param_lock() */ |
268 | static char *myri10ge_fw_name = NULL; | 268 | static char *myri10ge_fw_name = NULL; |
269 | module_param(myri10ge_fw_name, charp, S_IRUGO | S_IWUSR); | 269 | module_param(myri10ge_fw_name, charp, 0644); |
270 | MODULE_PARM_DESC(myri10ge_fw_name, "Firmware image name"); | 270 | MODULE_PARM_DESC(myri10ge_fw_name, "Firmware image name"); |
271 | 271 | ||
272 | #define MYRI10GE_MAX_BOARDS 8 | 272 | #define MYRI10GE_MAX_BOARDS 8 |
@@ -277,49 +277,49 @@ module_param_array_named(myri10ge_fw_names, myri10ge_fw_names, charp, NULL, | |||
277 | MODULE_PARM_DESC(myri10ge_fw_names, "Firmware image names per board"); | 277 | MODULE_PARM_DESC(myri10ge_fw_names, "Firmware image names per board"); |
278 | 278 | ||
279 | static int myri10ge_ecrc_enable = 1; | 279 | static int myri10ge_ecrc_enable = 1; |
280 | module_param(myri10ge_ecrc_enable, int, S_IRUGO); | 280 | module_param(myri10ge_ecrc_enable, int, 0444); |
281 | MODULE_PARM_DESC(myri10ge_ecrc_enable, "Enable Extended CRC on PCI-E"); | 281 | MODULE_PARM_DESC(myri10ge_ecrc_enable, "Enable Extended CRC on PCI-E"); |
282 | 282 | ||
283 | static int myri10ge_small_bytes = -1; /* -1 == auto */ | 283 | static int myri10ge_small_bytes = -1; /* -1 == auto */ |
284 | module_param(myri10ge_small_bytes, int, S_IRUGO | S_IWUSR); | 284 | module_param(myri10ge_small_bytes, int, 0644); |
285 | MODULE_PARM_DESC(myri10ge_small_bytes, "Threshold of small packets"); | 285 | MODULE_PARM_DESC(myri10ge_small_bytes, "Threshold of small packets"); |
286 | 286 | ||
287 | static int myri10ge_msi = 1; /* enable msi by default */ | 287 | static int myri10ge_msi = 1; /* enable msi by default */ |
288 | module_param(myri10ge_msi, int, S_IRUGO | S_IWUSR); | 288 | module_param(myri10ge_msi, int, 0644); |
289 | MODULE_PARM_DESC(myri10ge_msi, "Enable Message Signalled Interrupts"); | 289 | MODULE_PARM_DESC(myri10ge_msi, "Enable Message Signalled Interrupts"); |
290 | 290 | ||
291 | static int myri10ge_intr_coal_delay = 75; | 291 | static int myri10ge_intr_coal_delay = 75; |
292 | module_param(myri10ge_intr_coal_delay, int, S_IRUGO); | 292 | module_param(myri10ge_intr_coal_delay, int, 0444); |
293 | MODULE_PARM_DESC(myri10ge_intr_coal_delay, "Interrupt coalescing delay"); | 293 | MODULE_PARM_DESC(myri10ge_intr_coal_delay, "Interrupt coalescing delay"); |
294 | 294 | ||
295 | static int myri10ge_flow_control = 1; | 295 | static int myri10ge_flow_control = 1; |
296 | module_param(myri10ge_flow_control, int, S_IRUGO); | 296 | module_param(myri10ge_flow_control, int, 0444); |
297 | MODULE_PARM_DESC(myri10ge_flow_control, "Pause parameter"); | 297 | MODULE_PARM_DESC(myri10ge_flow_control, "Pause parameter"); |
298 | 298 | ||
299 | static int myri10ge_deassert_wait = 1; | 299 | static int myri10ge_deassert_wait = 1; |
300 | module_param(myri10ge_deassert_wait, int, S_IRUGO | S_IWUSR); | 300 | module_param(myri10ge_deassert_wait, int, 0644); |
301 | MODULE_PARM_DESC(myri10ge_deassert_wait, | 301 | MODULE_PARM_DESC(myri10ge_deassert_wait, |
302 | "Wait when deasserting legacy interrupts"); | 302 | "Wait when deasserting legacy interrupts"); |
303 | 303 | ||
304 | static int myri10ge_force_firmware = 0; | 304 | static int myri10ge_force_firmware = 0; |
305 | module_param(myri10ge_force_firmware, int, S_IRUGO); | 305 | module_param(myri10ge_force_firmware, int, 0444); |
306 | MODULE_PARM_DESC(myri10ge_force_firmware, | 306 | MODULE_PARM_DESC(myri10ge_force_firmware, |
307 | "Force firmware to assume aligned completions"); | 307 | "Force firmware to assume aligned completions"); |
308 | 308 | ||
309 | static int myri10ge_initial_mtu = MYRI10GE_MAX_ETHER_MTU - ETH_HLEN; | 309 | static int myri10ge_initial_mtu = MYRI10GE_MAX_ETHER_MTU - ETH_HLEN; |
310 | module_param(myri10ge_initial_mtu, int, S_IRUGO); | 310 | module_param(myri10ge_initial_mtu, int, 0444); |
311 | MODULE_PARM_DESC(myri10ge_initial_mtu, "Initial MTU"); | 311 | MODULE_PARM_DESC(myri10ge_initial_mtu, "Initial MTU"); |
312 | 312 | ||
313 | static int myri10ge_napi_weight = 64; | 313 | static int myri10ge_napi_weight = 64; |
314 | module_param(myri10ge_napi_weight, int, S_IRUGO); | 314 | module_param(myri10ge_napi_weight, int, 0444); |
315 | MODULE_PARM_DESC(myri10ge_napi_weight, "Set NAPI weight"); | 315 | MODULE_PARM_DESC(myri10ge_napi_weight, "Set NAPI weight"); |
316 | 316 | ||
317 | static int myri10ge_watchdog_timeout = 1; | 317 | static int myri10ge_watchdog_timeout = 1; |
318 | module_param(myri10ge_watchdog_timeout, int, S_IRUGO); | 318 | module_param(myri10ge_watchdog_timeout, int, 0444); |
319 | MODULE_PARM_DESC(myri10ge_watchdog_timeout, "Set watchdog timeout"); | 319 | MODULE_PARM_DESC(myri10ge_watchdog_timeout, "Set watchdog timeout"); |
320 | 320 | ||
321 | static int myri10ge_max_irq_loops = 1048576; | 321 | static int myri10ge_max_irq_loops = 1048576; |
322 | module_param(myri10ge_max_irq_loops, int, S_IRUGO); | 322 | module_param(myri10ge_max_irq_loops, int, 0444); |
323 | MODULE_PARM_DESC(myri10ge_max_irq_loops, | 323 | MODULE_PARM_DESC(myri10ge_max_irq_loops, |
324 | "Set stuck legacy IRQ detection threshold"); | 324 | "Set stuck legacy IRQ detection threshold"); |
325 | 325 | ||
@@ -330,21 +330,21 @@ module_param(myri10ge_debug, int, 0); | |||
330 | MODULE_PARM_DESC(myri10ge_debug, "Debug level (0=none,...,16=all)"); | 330 | MODULE_PARM_DESC(myri10ge_debug, "Debug level (0=none,...,16=all)"); |
331 | 331 | ||
332 | static int myri10ge_fill_thresh = 256; | 332 | static int myri10ge_fill_thresh = 256; |
333 | module_param(myri10ge_fill_thresh, int, S_IRUGO | S_IWUSR); | 333 | module_param(myri10ge_fill_thresh, int, 0644); |
334 | MODULE_PARM_DESC(myri10ge_fill_thresh, "Number of empty rx slots allowed"); | 334 | MODULE_PARM_DESC(myri10ge_fill_thresh, "Number of empty rx slots allowed"); |
335 | 335 | ||
336 | static int myri10ge_reset_recover = 1; | 336 | static int myri10ge_reset_recover = 1; |
337 | 337 | ||
338 | static int myri10ge_max_slices = 1; | 338 | static int myri10ge_max_slices = 1; |
339 | module_param(myri10ge_max_slices, int, S_IRUGO); | 339 | module_param(myri10ge_max_slices, int, 0444); |
340 | MODULE_PARM_DESC(myri10ge_max_slices, "Max tx/rx queues"); | 340 | MODULE_PARM_DESC(myri10ge_max_slices, "Max tx/rx queues"); |
341 | 341 | ||
342 | static int myri10ge_rss_hash = MXGEFW_RSS_HASH_TYPE_SRC_DST_PORT; | 342 | static int myri10ge_rss_hash = MXGEFW_RSS_HASH_TYPE_SRC_DST_PORT; |
343 | module_param(myri10ge_rss_hash, int, S_IRUGO); | 343 | module_param(myri10ge_rss_hash, int, 0444); |
344 | MODULE_PARM_DESC(myri10ge_rss_hash, "Type of RSS hashing to do"); | 344 | MODULE_PARM_DESC(myri10ge_rss_hash, "Type of RSS hashing to do"); |
345 | 345 | ||
346 | static int myri10ge_dca = 1; | 346 | static int myri10ge_dca = 1; |
347 | module_param(myri10ge_dca, int, S_IRUGO); | 347 | module_param(myri10ge_dca, int, 0444); |
348 | MODULE_PARM_DESC(myri10ge_dca, "Enable DCA if possible"); | 348 | MODULE_PARM_DESC(myri10ge_dca, "Enable DCA if possible"); |
349 | 349 | ||
350 | #define MYRI10GE_FW_OFFSET 1024*1024 | 350 | #define MYRI10GE_FW_OFFSET 1024*1024 |
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_debugfs.c b/drivers/net/ethernet/netronome/nfp/nfp_net_debugfs.c index cf81cf95d1d8..67cdd8330c59 100644 --- a/drivers/net/ethernet/netronome/nfp/nfp_net_debugfs.c +++ b/drivers/net/ethernet/netronome/nfp/nfp_net_debugfs.c | |||
@@ -231,15 +231,15 @@ void nfp_net_debugfs_vnic_add(struct nfp_net *nn, struct dentry *ddir, int id) | |||
231 | 231 | ||
232 | for (i = 0; i < min(nn->max_rx_rings, nn->max_r_vecs); i++) { | 232 | for (i = 0; i < min(nn->max_rx_rings, nn->max_r_vecs); i++) { |
233 | sprintf(name, "%d", i); | 233 | sprintf(name, "%d", i); |
234 | debugfs_create_file(name, S_IRUSR, rx, | 234 | debugfs_create_file(name, 0400, rx, |
235 | &nn->r_vecs[i], &nfp_rx_q_fops); | 235 | &nn->r_vecs[i], &nfp_rx_q_fops); |
236 | debugfs_create_file(name, S_IRUSR, xdp, | 236 | debugfs_create_file(name, 0400, xdp, |
237 | &nn->r_vecs[i], &nfp_xdp_q_fops); | 237 | &nn->r_vecs[i], &nfp_xdp_q_fops); |
238 | } | 238 | } |
239 | 239 | ||
240 | for (i = 0; i < min(nn->max_tx_rings, nn->max_r_vecs); i++) { | 240 | for (i = 0; i < min(nn->max_tx_rings, nn->max_r_vecs); i++) { |
241 | sprintf(name, "%d", i); | 241 | sprintf(name, "%d", i); |
242 | debugfs_create_file(name, S_IRUSR, tx, | 242 | debugfs_create_file(name, 0400, tx, |
243 | &nn->r_vecs[i], &nfp_tx_q_fops); | 243 | &nn->r_vecs[i], &nfp_tx_q_fops); |
244 | } | 244 | } |
245 | } | 245 | } |
diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c b/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c index f2e8de607119..8259e8309320 100644 --- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c +++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c | |||
@@ -2829,9 +2829,9 @@ netxen_show_bridged_mode(struct device *dev, | |||
2829 | } | 2829 | } |
2830 | 2830 | ||
2831 | static const struct device_attribute dev_attr_bridged_mode = { | 2831 | static const struct device_attribute dev_attr_bridged_mode = { |
2832 | .attr = {.name = "bridged_mode", .mode = (S_IRUGO | S_IWUSR)}, | 2832 | .attr = { .name = "bridged_mode", .mode = 0644 }, |
2833 | .show = netxen_show_bridged_mode, | 2833 | .show = netxen_show_bridged_mode, |
2834 | .store = netxen_store_bridged_mode, | 2834 | .store = netxen_store_bridged_mode, |
2835 | }; | 2835 | }; |
2836 | 2836 | ||
2837 | static ssize_t | 2837 | static ssize_t |
@@ -2861,7 +2861,7 @@ netxen_show_diag_mode(struct device *dev, | |||
2861 | } | 2861 | } |
2862 | 2862 | ||
2863 | static const struct device_attribute dev_attr_diag_mode = { | 2863 | static const struct device_attribute dev_attr_diag_mode = { |
2864 | .attr = {.name = "diag_mode", .mode = (S_IRUGO | S_IWUSR)}, | 2864 | .attr = { .name = "diag_mode", .mode = 0644 }, |
2865 | .show = netxen_show_diag_mode, | 2865 | .show = netxen_show_diag_mode, |
2866 | .store = netxen_store_diag_mode, | 2866 | .store = netxen_store_diag_mode, |
2867 | }; | 2867 | }; |
@@ -3006,14 +3006,14 @@ static ssize_t netxen_sysfs_write_mem(struct file *filp, struct kobject *kobj, | |||
3006 | 3006 | ||
3007 | 3007 | ||
3008 | static const struct bin_attribute bin_attr_crb = { | 3008 | static const struct bin_attribute bin_attr_crb = { |
3009 | .attr = {.name = "crb", .mode = (S_IRUGO | S_IWUSR)}, | 3009 | .attr = { .name = "crb", .mode = 0644 }, |
3010 | .size = 0, | 3010 | .size = 0, |
3011 | .read = netxen_sysfs_read_crb, | 3011 | .read = netxen_sysfs_read_crb, |
3012 | .write = netxen_sysfs_write_crb, | 3012 | .write = netxen_sysfs_write_crb, |
3013 | }; | 3013 | }; |
3014 | 3014 | ||
3015 | static const struct bin_attribute bin_attr_mem = { | 3015 | static const struct bin_attribute bin_attr_mem = { |
3016 | .attr = {.name = "mem", .mode = (S_IRUGO | S_IWUSR)}, | 3016 | .attr = { .name = "mem", .mode = 0644 }, |
3017 | .size = 0, | 3017 | .size = 0, |
3018 | .read = netxen_sysfs_read_mem, | 3018 | .read = netxen_sysfs_read_mem, |
3019 | .write = netxen_sysfs_write_mem, | 3019 | .write = netxen_sysfs_write_mem, |
@@ -3142,7 +3142,7 @@ out: | |||
3142 | } | 3142 | } |
3143 | 3143 | ||
3144 | static const struct bin_attribute bin_attr_dimm = { | 3144 | static const struct bin_attribute bin_attr_dimm = { |
3145 | .attr = { .name = "dimm", .mode = (S_IRUGO | S_IWUSR) }, | 3145 | .attr = { .name = "dimm", .mode = 0644 }, |
3146 | .size = sizeof(struct netxen_dimm_cfg), | 3146 | .size = sizeof(struct netxen_dimm_cfg), |
3147 | .read = netxen_sysfs_read_dimm, | 3147 | .read = netxen_sysfs_read_dimm, |
3148 | }; | 3148 | }; |
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c index 287d89dd086f..891f03a7a33d 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c | |||
@@ -1175,81 +1175,81 @@ static ssize_t qlcnic_83xx_sysfs_flash_write_handler(struct file *filp, | |||
1175 | } | 1175 | } |
1176 | 1176 | ||
1177 | static const struct device_attribute dev_attr_bridged_mode = { | 1177 | static const struct device_attribute dev_attr_bridged_mode = { |
1178 | .attr = {.name = "bridged_mode", .mode = (S_IRUGO | S_IWUSR)}, | 1178 | .attr = { .name = "bridged_mode", .mode = 0644 }, |
1179 | .show = qlcnic_show_bridged_mode, | 1179 | .show = qlcnic_show_bridged_mode, |
1180 | .store = qlcnic_store_bridged_mode, | 1180 | .store = qlcnic_store_bridged_mode, |
1181 | }; | 1181 | }; |
1182 | 1182 | ||
1183 | static const struct device_attribute dev_attr_diag_mode = { | 1183 | static const struct device_attribute dev_attr_diag_mode = { |
1184 | .attr = {.name = "diag_mode", .mode = (S_IRUGO | S_IWUSR)}, | 1184 | .attr = { .name = "diag_mode", .mode = 0644 }, |
1185 | .show = qlcnic_show_diag_mode, | 1185 | .show = qlcnic_show_diag_mode, |
1186 | .store = qlcnic_store_diag_mode, | 1186 | .store = qlcnic_store_diag_mode, |
1187 | }; | 1187 | }; |
1188 | 1188 | ||
1189 | static const struct device_attribute dev_attr_beacon = { | 1189 | static const struct device_attribute dev_attr_beacon = { |
1190 | .attr = {.name = "beacon", .mode = (S_IRUGO | S_IWUSR)}, | 1190 | .attr = { .name = "beacon", .mode = 0644 }, |
1191 | .show = qlcnic_show_beacon, | 1191 | .show = qlcnic_show_beacon, |
1192 | .store = qlcnic_store_beacon, | 1192 | .store = qlcnic_store_beacon, |
1193 | }; | 1193 | }; |
1194 | 1194 | ||
1195 | static const struct bin_attribute bin_attr_crb = { | 1195 | static const struct bin_attribute bin_attr_crb = { |
1196 | .attr = {.name = "crb", .mode = (S_IRUGO | S_IWUSR)}, | 1196 | .attr = { .name = "crb", .mode = 0644 }, |
1197 | .size = 0, | 1197 | .size = 0, |
1198 | .read = qlcnic_sysfs_read_crb, | 1198 | .read = qlcnic_sysfs_read_crb, |
1199 | .write = qlcnic_sysfs_write_crb, | 1199 | .write = qlcnic_sysfs_write_crb, |
1200 | }; | 1200 | }; |
1201 | 1201 | ||
1202 | static const struct bin_attribute bin_attr_mem = { | 1202 | static const struct bin_attribute bin_attr_mem = { |
1203 | .attr = {.name = "mem", .mode = (S_IRUGO | S_IWUSR)}, | 1203 | .attr = { .name = "mem", .mode = 0644 }, |
1204 | .size = 0, | 1204 | .size = 0, |
1205 | .read = qlcnic_sysfs_read_mem, | 1205 | .read = qlcnic_sysfs_read_mem, |
1206 | .write = qlcnic_sysfs_write_mem, | 1206 | .write = qlcnic_sysfs_write_mem, |
1207 | }; | 1207 | }; |
1208 | 1208 | ||
1209 | static const struct bin_attribute bin_attr_npar_config = { | 1209 | static const struct bin_attribute bin_attr_npar_config = { |
1210 | .attr = {.name = "npar_config", .mode = (S_IRUGO | S_IWUSR)}, | 1210 | .attr = { .name = "npar_config", .mode = 0644 }, |
1211 | .size = 0, | 1211 | .size = 0, |
1212 | .read = qlcnic_sysfs_read_npar_config, | 1212 | .read = qlcnic_sysfs_read_npar_config, |
1213 | .write = qlcnic_sysfs_write_npar_config, | 1213 | .write = qlcnic_sysfs_write_npar_config, |
1214 | }; | 1214 | }; |
1215 | 1215 | ||
1216 | static const struct bin_attribute bin_attr_pci_config = { | 1216 | static const struct bin_attribute bin_attr_pci_config = { |
1217 | .attr = {.name = "pci_config", .mode = (S_IRUGO | S_IWUSR)}, | 1217 | .attr = { .name = "pci_config", .mode = 0644 }, |
1218 | .size = 0, | 1218 | .size = 0, |
1219 | .read = qlcnic_sysfs_read_pci_config, | 1219 | .read = qlcnic_sysfs_read_pci_config, |
1220 | .write = NULL, | 1220 | .write = NULL, |
1221 | }; | 1221 | }; |
1222 | 1222 | ||
1223 | static const struct bin_attribute bin_attr_port_stats = { | 1223 | static const struct bin_attribute bin_attr_port_stats = { |
1224 | .attr = {.name = "port_stats", .mode = (S_IRUGO | S_IWUSR)}, | 1224 | .attr = { .name = "port_stats", .mode = 0644 }, |
1225 | .size = 0, | 1225 | .size = 0, |
1226 | .read = qlcnic_sysfs_get_port_stats, | 1226 | .read = qlcnic_sysfs_get_port_stats, |
1227 | .write = qlcnic_sysfs_clear_port_stats, | 1227 | .write = qlcnic_sysfs_clear_port_stats, |
1228 | }; | 1228 | }; |
1229 | 1229 | ||
1230 | static const struct bin_attribute bin_attr_esw_stats = { | 1230 | static const struct bin_attribute bin_attr_esw_stats = { |
1231 | .attr = {.name = "esw_stats", .mode = (S_IRUGO | S_IWUSR)}, | 1231 | .attr = { .name = "esw_stats", .mode = 0644 }, |
1232 | .size = 0, | 1232 | .size = 0, |
1233 | .read = qlcnic_sysfs_get_esw_stats, | 1233 | .read = qlcnic_sysfs_get_esw_stats, |
1234 | .write = qlcnic_sysfs_clear_esw_stats, | 1234 | .write = qlcnic_sysfs_clear_esw_stats, |
1235 | }; | 1235 | }; |
1236 | 1236 | ||
1237 | static const struct bin_attribute bin_attr_esw_config = { | 1237 | static const struct bin_attribute bin_attr_esw_config = { |
1238 | .attr = {.name = "esw_config", .mode = (S_IRUGO | S_IWUSR)}, | 1238 | .attr = { .name = "esw_config", .mode = 0644 }, |
1239 | .size = 0, | 1239 | .size = 0, |
1240 | .read = qlcnic_sysfs_read_esw_config, | 1240 | .read = qlcnic_sysfs_read_esw_config, |
1241 | .write = qlcnic_sysfs_write_esw_config, | 1241 | .write = qlcnic_sysfs_write_esw_config, |
1242 | }; | 1242 | }; |
1243 | 1243 | ||
1244 | static const struct bin_attribute bin_attr_pm_config = { | 1244 | static const struct bin_attribute bin_attr_pm_config = { |
1245 | .attr = {.name = "pm_config", .mode = (S_IRUGO | S_IWUSR)}, | 1245 | .attr = { .name = "pm_config", .mode = 0644 }, |
1246 | .size = 0, | 1246 | .size = 0, |
1247 | .read = qlcnic_sysfs_read_pm_config, | 1247 | .read = qlcnic_sysfs_read_pm_config, |
1248 | .write = qlcnic_sysfs_write_pm_config, | 1248 | .write = qlcnic_sysfs_write_pm_config, |
1249 | }; | 1249 | }; |
1250 | 1250 | ||
1251 | static const struct bin_attribute bin_attr_flash = { | 1251 | static const struct bin_attribute bin_attr_flash = { |
1252 | .attr = {.name = "flash", .mode = (S_IRUGO | S_IWUSR)}, | 1252 | .attr = { .name = "flash", .mode = 0644 }, |
1253 | .size = 0, | 1253 | .size = 0, |
1254 | .read = qlcnic_83xx_sysfs_flash_read_handler, | 1254 | .read = qlcnic_83xx_sysfs_flash_read_handler, |
1255 | .write = qlcnic_83xx_sysfs_flash_write_handler, | 1255 | .write = qlcnic_83xx_sysfs_flash_write_handler, |
@@ -1276,7 +1276,7 @@ static ssize_t qlcnic_hwmon_show_temp(struct device *dev, | |||
1276 | } | 1276 | } |
1277 | 1277 | ||
1278 | /* hwmon-sysfs attributes */ | 1278 | /* hwmon-sysfs attributes */ |
1279 | static SENSOR_DEVICE_ATTR(temp1_input, S_IRUGO, | 1279 | static SENSOR_DEVICE_ATTR(temp1_input, 0444, |
1280 | qlcnic_hwmon_show_temp, NULL, 1); | 1280 | qlcnic_hwmon_show_temp, NULL, 1); |
1281 | 1281 | ||
1282 | static struct attribute *qlcnic_hwmon_attrs[] = { | 1282 | static struct attribute *qlcnic_hwmon_attrs[] = { |
diff --git a/drivers/net/ethernet/qualcomm/qca_debug.c b/drivers/net/ethernet/qualcomm/qca_debug.c index 92b6be9c4429..51d89c86e60f 100644 --- a/drivers/net/ethernet/qualcomm/qca_debug.c +++ b/drivers/net/ethernet/qualcomm/qca_debug.c | |||
@@ -151,7 +151,7 @@ qcaspi_init_device_debugfs(struct qcaspi *qca) | |||
151 | dev_name(&qca->net_dev->dev)); | 151 | dev_name(&qca->net_dev->dev)); |
152 | return; | 152 | return; |
153 | } | 153 | } |
154 | debugfs_create_file("info", S_IFREG | S_IRUGO, device_root, qca, | 154 | debugfs_create_file("info", S_IFREG | 0444, device_root, qca, |
155 | &qcaspi_info_ops); | 155 | &qcaspi_info_ops); |
156 | } | 156 | } |
157 | 157 | ||
diff --git a/drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c b/drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c index fd35d8004a78..a9da1ad4b4f2 100644 --- a/drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c +++ b/drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c | |||
@@ -57,9 +57,9 @@ | |||
57 | static int debug = -1; | 57 | static int debug = -1; |
58 | static int eee_timer = SXGBE_DEFAULT_LPI_TIMER; | 58 | static int eee_timer = SXGBE_DEFAULT_LPI_TIMER; |
59 | 59 | ||
60 | module_param(eee_timer, int, S_IRUGO | S_IWUSR); | 60 | module_param(eee_timer, int, 0644); |
61 | 61 | ||
62 | module_param(debug, int, S_IRUGO | S_IWUSR); | 62 | module_param(debug, int, 0644); |
63 | static const u32 default_msg_level = (NETIF_MSG_DRV | NETIF_MSG_PROBE | | 63 | static const u32 default_msg_level = (NETIF_MSG_DRV | NETIF_MSG_PROBE | |
64 | NETIF_MSG_LINK | NETIF_MSG_IFUP | | 64 | NETIF_MSG_LINK | NETIF_MSG_IFUP | |
65 | NETIF_MSG_IFDOWN | NETIF_MSG_TIMER); | 65 | NETIF_MSG_IFDOWN | NETIF_MSG_TIMER); |
diff --git a/drivers/net/ethernet/sfc/mcdi_mon.c b/drivers/net/ethernet/sfc/mcdi_mon.c index f97da05952c7..f17751559ccc 100644 --- a/drivers/net/ethernet/sfc/mcdi_mon.c +++ b/drivers/net/ethernet/sfc/mcdi_mon.c | |||
@@ -298,7 +298,7 @@ efx_mcdi_mon_add_attr(struct efx_nic *efx, const char *name, | |||
298 | attr->limit_value = limit_value; | 298 | attr->limit_value = limit_value; |
299 | sysfs_attr_init(&attr->dev_attr.attr); | 299 | sysfs_attr_init(&attr->dev_attr.attr); |
300 | attr->dev_attr.attr.name = attr->name; | 300 | attr->dev_attr.attr.name = attr->name; |
301 | attr->dev_attr.attr.mode = S_IRUGO; | 301 | attr->dev_attr.attr.mode = 0444; |
302 | attr->dev_attr.show = reader; | 302 | attr->dev_attr.show = reader; |
303 | hwmon->group.attrs[hwmon->n_attrs++] = &attr->dev_attr.attr; | 303 | hwmon->group.attrs[hwmon->n_attrs++] = &attr->dev_attr.attr; |
304 | } | 304 | } |
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index a9856a8bf8ad..9f983dd069d5 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | |||
@@ -57,36 +57,36 @@ | |||
57 | /* Module parameters */ | 57 | /* Module parameters */ |
58 | #define TX_TIMEO 5000 | 58 | #define TX_TIMEO 5000 |
59 | static int watchdog = TX_TIMEO; | 59 | static int watchdog = TX_TIMEO; |
60 | module_param(watchdog, int, S_IRUGO | S_IWUSR); | 60 | module_param(watchdog, int, 0644); |
61 | MODULE_PARM_DESC(watchdog, "Transmit timeout in milliseconds (default 5s)"); | 61 | MODULE_PARM_DESC(watchdog, "Transmit timeout in milliseconds (default 5s)"); |
62 | 62 | ||
63 | static int debug = -1; | 63 | static int debug = -1; |
64 | module_param(debug, int, S_IRUGO | S_IWUSR); | 64 | module_param(debug, int, 0644); |
65 | MODULE_PARM_DESC(debug, "Message Level (-1: default, 0: no output, 16: all)"); | 65 | MODULE_PARM_DESC(debug, "Message Level (-1: default, 0: no output, 16: all)"); |
66 | 66 | ||
67 | static int phyaddr = -1; | 67 | static int phyaddr = -1; |
68 | module_param(phyaddr, int, S_IRUGO); | 68 | module_param(phyaddr, int, 0444); |
69 | MODULE_PARM_DESC(phyaddr, "Physical device address"); | 69 | MODULE_PARM_DESC(phyaddr, "Physical device address"); |
70 | 70 | ||
71 | #define STMMAC_TX_THRESH (DMA_TX_SIZE / 4) | 71 | #define STMMAC_TX_THRESH (DMA_TX_SIZE / 4) |
72 | #define STMMAC_RX_THRESH (DMA_RX_SIZE / 4) | 72 | #define STMMAC_RX_THRESH (DMA_RX_SIZE / 4) |
73 | 73 | ||
74 | static int flow_ctrl = FLOW_OFF; | 74 | static int flow_ctrl = FLOW_OFF; |
75 | module_param(flow_ctrl, int, S_IRUGO | S_IWUSR); | 75 | module_param(flow_ctrl, int, 0644); |
76 | MODULE_PARM_DESC(flow_ctrl, "Flow control ability [on/off]"); | 76 | MODULE_PARM_DESC(flow_ctrl, "Flow control ability [on/off]"); |
77 | 77 | ||
78 | static int pause = PAUSE_TIME; | 78 | static int pause = PAUSE_TIME; |
79 | module_param(pause, int, S_IRUGO | S_IWUSR); | 79 | module_param(pause, int, 0644); |
80 | MODULE_PARM_DESC(pause, "Flow Control Pause Time"); | 80 | MODULE_PARM_DESC(pause, "Flow Control Pause Time"); |
81 | 81 | ||
82 | #define TC_DEFAULT 64 | 82 | #define TC_DEFAULT 64 |
83 | static int tc = TC_DEFAULT; | 83 | static int tc = TC_DEFAULT; |
84 | module_param(tc, int, S_IRUGO | S_IWUSR); | 84 | module_param(tc, int, 0644); |
85 | MODULE_PARM_DESC(tc, "DMA threshold control value"); | 85 | MODULE_PARM_DESC(tc, "DMA threshold control value"); |
86 | 86 | ||
87 | #define DEFAULT_BUFSIZE 1536 | 87 | #define DEFAULT_BUFSIZE 1536 |
88 | static int buf_sz = DEFAULT_BUFSIZE; | 88 | static int buf_sz = DEFAULT_BUFSIZE; |
89 | module_param(buf_sz, int, S_IRUGO | S_IWUSR); | 89 | module_param(buf_sz, int, 0644); |
90 | MODULE_PARM_DESC(buf_sz, "DMA buffer size"); | 90 | MODULE_PARM_DESC(buf_sz, "DMA buffer size"); |
91 | 91 | ||
92 | #define STMMAC_RX_COPYBREAK 256 | 92 | #define STMMAC_RX_COPYBREAK 256 |
@@ -97,7 +97,7 @@ static const u32 default_msg_level = (NETIF_MSG_DRV | NETIF_MSG_PROBE | | |||
97 | 97 | ||
98 | #define STMMAC_DEFAULT_LPI_TIMER 1000 | 98 | #define STMMAC_DEFAULT_LPI_TIMER 1000 |
99 | static int eee_timer = STMMAC_DEFAULT_LPI_TIMER; | 99 | static int eee_timer = STMMAC_DEFAULT_LPI_TIMER; |
100 | module_param(eee_timer, int, S_IRUGO | S_IWUSR); | 100 | module_param(eee_timer, int, 0644); |
101 | MODULE_PARM_DESC(eee_timer, "LPI tx expiration time in msec"); | 101 | MODULE_PARM_DESC(eee_timer, "LPI tx expiration time in msec"); |
102 | #define STMMAC_LPI_T(x) (jiffies + msecs_to_jiffies(x)) | 102 | #define STMMAC_LPI_T(x) (jiffies + msecs_to_jiffies(x)) |
103 | 103 | ||
@@ -105,7 +105,7 @@ MODULE_PARM_DESC(eee_timer, "LPI tx expiration time in msec"); | |||
105 | * but allow user to force to use the chain instead of the ring | 105 | * but allow user to force to use the chain instead of the ring |
106 | */ | 106 | */ |
107 | static unsigned int chain_mode; | 107 | static unsigned int chain_mode; |
108 | module_param(chain_mode, int, S_IRUGO); | 108 | module_param(chain_mode, int, 0444); |
109 | MODULE_PARM_DESC(chain_mode, "To use chain instead of ring mode"); | 109 | MODULE_PARM_DESC(chain_mode, "To use chain instead of ring mode"); |
110 | 110 | ||
111 | static irqreturn_t stmmac_interrupt(int irq, void *dev_id); | 111 | static irqreturn_t stmmac_interrupt(int irq, void *dev_id); |
@@ -4001,7 +4001,7 @@ static int stmmac_init_fs(struct net_device *dev) | |||
4001 | 4001 | ||
4002 | /* Entry to report DMA RX/TX rings */ | 4002 | /* Entry to report DMA RX/TX rings */ |
4003 | priv->dbgfs_rings_status = | 4003 | priv->dbgfs_rings_status = |
4004 | debugfs_create_file("descriptors_status", S_IRUGO, | 4004 | debugfs_create_file("descriptors_status", 0444, |
4005 | priv->dbgfs_dir, dev, | 4005 | priv->dbgfs_dir, dev, |
4006 | &stmmac_rings_status_fops); | 4006 | &stmmac_rings_status_fops); |
4007 | 4007 | ||
@@ -4013,9 +4013,9 @@ static int stmmac_init_fs(struct net_device *dev) | |||
4013 | } | 4013 | } |
4014 | 4014 | ||
4015 | /* Entry to report the DMA HW features */ | 4015 | /* Entry to report the DMA HW features */ |
4016 | priv->dbgfs_dma_cap = debugfs_create_file("dma_cap", S_IRUGO, | 4016 | priv->dbgfs_dma_cap = debugfs_create_file("dma_cap", 0444, |
4017 | priv->dbgfs_dir, | 4017 | priv->dbgfs_dir, |
4018 | dev, &stmmac_dma_cap_fops); | 4018 | dev, &stmmac_dma_cap_fops); |
4019 | 4019 | ||
4020 | if (!priv->dbgfs_dma_cap || IS_ERR(priv->dbgfs_dma_cap)) { | 4020 | if (!priv->dbgfs_dma_cap || IS_ERR(priv->dbgfs_dma_cap)) { |
4021 | netdev_err(priv->dev, "ERROR creating stmmac MMC debugfs file\n"); | 4021 | netdev_err(priv->dev, "ERROR creating stmmac MMC debugfs file\n"); |
diff --git a/drivers/net/ethernet/sun/niu.c b/drivers/net/ethernet/sun/niu.c index 8dd545fed30d..f081de4f38d7 100644 --- a/drivers/net/ethernet/sun/niu.c +++ b/drivers/net/ethernet/sun/niu.c | |||
@@ -9437,11 +9437,11 @@ static ssize_t show_num_ports(struct device *dev, | |||
9437 | } | 9437 | } |
9438 | 9438 | ||
9439 | static struct device_attribute niu_parent_attributes[] = { | 9439 | static struct device_attribute niu_parent_attributes[] = { |
9440 | __ATTR(port_phy, S_IRUGO, show_port_phy, NULL), | 9440 | __ATTR(port_phy, 0444, show_port_phy, NULL), |
9441 | __ATTR(plat_type, S_IRUGO, show_plat_type, NULL), | 9441 | __ATTR(plat_type, 0444, show_plat_type, NULL), |
9442 | __ATTR(rxchan_per_port, S_IRUGO, show_rxchan_per_port, NULL), | 9442 | __ATTR(rxchan_per_port, 0444, show_rxchan_per_port, NULL), |
9443 | __ATTR(txchan_per_port, S_IRUGO, show_txchan_per_port, NULL), | 9443 | __ATTR(txchan_per_port, 0444, show_txchan_per_port, NULL), |
9444 | __ATTR(num_ports, S_IRUGO, show_num_ports, NULL), | 9444 | __ATTR(num_ports, 0444, show_num_ports, NULL), |
9445 | {} | 9445 | {} |
9446 | }; | 9446 | }; |
9447 | 9447 | ||