Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Joe Perches and committed by
David S. Miller
d3757ba4 d61e4038

+194 -195
+1 -1
drivers/net/ethernet/8390/apne.c
··· 117 117 static int apne_owned; /* signal if card already owned */ 118 118 119 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 121 MODULE_PARM_DESC(msg_enable, "Debug message level (see linux/netdevice.h for bitmap)"); 122 122 123 123 struct net_device * __init apne_probe(int unit)
+1 -1
drivers/net/ethernet/8390/lib8390.c
··· 113 113 114 114 static unsigned version_printed; 115 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 117 MODULE_PARM_DESC(msg_enable, "Debug message level (see linux/netdevice.h for bitmap)"); 118 118 119 119 /*
+1 -1
drivers/net/ethernet/8390/ne.c
··· 77 77 module_param_hw_array(io, int, ioport, NULL, 0); 78 78 module_param_hw_array(irq, int, irq, NULL, 0); 79 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 81 MODULE_PARM_DESC(io, "I/O base address(es),required"); 82 82 MODULE_PARM_DESC(irq, "IRQ number(s)"); 83 83 MODULE_PARM_DESC(bad, "Accept card(s) with bad signatures");
+1 -1
drivers/net/ethernet/8390/ne2k-pci.c
··· 76 76 MODULE_DESCRIPTION("PCI NE2000 clone driver"); 77 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 80 module_param_array(options, int, NULL, 0); 81 81 module_param_array(full_duplex, int, NULL, 0); 82 82 MODULE_PARM_DESC(msg_enable, "Debug message level (see linux/netdevice.h for bitmap)");
+1 -1
drivers/net/ethernet/8390/smc-ultra.c
··· 563 563 564 564 module_param_hw_array(io, int, ioport, NULL, 0); 565 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 567 MODULE_PARM_DESC(io, "I/O base address(es)"); 568 568 MODULE_PARM_DESC(irq, "IRQ number(s) (assigned)"); 569 569 MODULE_PARM_DESC(msg_enable, "Debug message level (see linux/netdevice.h for bitmap)");
+1 -1
drivers/net/ethernet/8390/stnic.c
··· 71 71 72 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 75 MODULE_PARM_DESC(msg_enable, "Debug message level (see linux/netdevice.h for bitmap)"); 76 76 77 77 /* SH7750 specific read/write io. */
+1 -1
drivers/net/ethernet/8390/wd.c
··· 507 507 module_param_hw_array(irq, int, irq, NULL, 0); 508 508 module_param_hw_array(mem, int, iomem, NULL, 0); 509 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 511 MODULE_PARM_DESC(io, "I/O base address(es)"); 512 512 MODULE_PARM_DESC(irq, "IRQ number(s) (ignored for PureData boards)"); 513 513 MODULE_PARM_DESC(mem, "memory base address(es)(ignored for PureData boards)");
+3 -3
drivers/net/ethernet/altera/altera_tse_main.c
··· 56 56 static atomic_t instance_count = ATOMIC_INIT(~0); 57 57 /* Module parameters */ 58 58 static int debug = -1; 59 - module_param(debug, int, S_IRUGO | S_IWUSR); 59 + module_param(debug, int, 0644); 60 60 MODULE_PARM_DESC(debug, "Message Level (-1: default, 0: no output, 16: all)"); 61 61 62 62 static const u32 default_msg_level = (NETIF_MSG_DRV | NETIF_MSG_PROBE | ··· 65 65 66 66 #define RX_DESCRIPTORS 64 67 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 69 MODULE_PARM_DESC(dma_rx_num, "Number of descriptors in the RX list"); 70 70 71 71 #define TX_DESCRIPTORS 64 72 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 74 MODULE_PARM_DESC(dma_tx_num, "Number of descriptors in the TX list"); 75 75 76 76
+5 -5
drivers/net/ethernet/amd/xgbe/xgbe-drv.c
··· 137 137 138 138 #ifdef CONFIG_AMD_XGBE_HAVE_ECC 139 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 141 MODULE_PARM_DESC(ecc_sec_info_threshold, 142 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 145 MODULE_PARM_DESC(ecc_sec_warn_threshold, 146 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 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 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 155 MODULE_PARM_DESC(ecc_ded_period, " ECC detected error period (in seconds)"); 156 156 #endif 157 157
+1 -1
drivers/net/ethernet/amd/xgbe/xgbe-main.c
··· 131 131 MODULE_DESCRIPTION(XGBE_DRV_DESC); 132 132 133 133 static int debug = -1; 134 - module_param(debug, int, S_IWUSR | S_IRUGO); 134 + module_param(debug, int, 0644); 135 135 MODULE_PARM_DESC(debug, " Network interface message level setting"); 136 136 137 137 static const u32 default_msg_level = (NETIF_MSG_LINK | NETIF_MSG_IFDOWN |
+1 -1
drivers/net/ethernet/broadcom/bnx2.c
··· 87 87 88 88 static int disable_msi = 0; 89 89 90 - module_param(disable_msi, int, S_IRUGO); 90 + module_param(disable_msi, int, 0444); 91 91 MODULE_PARM_DESC(disable_msi, "Disable Message Signaled Interrupt (MSI)"); 92 92 93 93 typedef enum {
+6 -6
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
··· 97 97 MODULE_FIRMWARE(FW_FILE_NAME_E2); 98 98 99 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 101 MODULE_PARM_DESC(num_queues, 102 102 " Set number of queues (default is as a number of CPUs)"); 103 103 104 104 static int disable_tpa; 105 - module_param(disable_tpa, int, S_IRUGO); 105 + module_param(disable_tpa, int, 0444); 106 106 MODULE_PARM_DESC(disable_tpa, " Disable the TPA (LRO) feature"); 107 107 108 108 static int int_mode; 109 - module_param(int_mode, int, S_IRUGO); 109 + module_param(int_mode, int, 0444); 110 110 MODULE_PARM_DESC(int_mode, " Force interrupt mode other than MSI-X " 111 111 "(1 INT#x; 2 MSI)"); 112 112 113 113 static int dropless_fc; 114 - module_param(dropless_fc, int, S_IRUGO); 114 + module_param(dropless_fc, int, 0444); 115 115 MODULE_PARM_DESC(dropless_fc, " Pause on exhausted host ring"); 116 116 117 117 static int mrrs = -1; 118 - module_param(mrrs, int, S_IRUGO); 118 + module_param(mrrs, int, 0444); 119 119 MODULE_PARM_DESC(mrrs, " Force Max Read Req Size (0..3) (for debug)"); 120 120 121 121 static int debug; 122 - module_param(debug, int, S_IRUGO); 122 + module_param(debug, int, 0444); 123 123 MODULE_PARM_DESC(debug, " Default debug msglevel"); 124 124 125 125 static struct workqueue_struct *bnx2x_wq;
+5 -5
drivers/net/ethernet/broadcom/sb1250-mac.c
··· 63 63 64 64 /* 1 normal messages, 0 quiet .. 7 verbose. */ 65 65 static int debug = 1; 66 - module_param(debug, int, S_IRUGO); 66 + module_param(debug, int, 0444); 67 67 MODULE_PARM_DESC(debug, "Debug messages"); 68 68 69 69 #ifdef CONFIG_SBMAC_COALESCE 70 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 72 MODULE_PARM_DESC(int_pktcnt_tx, "TX packet count"); 73 73 74 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 76 MODULE_PARM_DESC(int_timeout_tx, "TX timeout value"); 77 77 78 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 80 MODULE_PARM_DESC(int_pktcnt_rx, "RX packet count"); 81 81 82 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 84 MODULE_PARM_DESC(int_timeout_rx, "RX timeout value"); 85 85 #endif 86 86
+3 -3
drivers/net/ethernet/broadcom/tg3.c
··· 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 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 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 10807 TG3_TEMP_MAX_OFFSET); 10808 10808 10809 10809 static struct attribute *tg3_attrs[] = {
+1 -1
drivers/net/ethernet/brocade/bna/bnad.c
··· 46 46 MODULE_PARM_DESC(bnad_ioc_auto_recover, "Enable / Disable auto recovery"); 47 47 48 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 50 MODULE_PARM_DESC(bna_debugfs_enable, "Enables debugfs feature, default=1," 51 51 " Range[false:0|true:1]"); 52 52
+5 -5
drivers/net/ethernet/brocade/bna/bnad_debugfs.c
··· 486 486 }; 487 487 488 488 static const struct bnad_debugfs_entry bnad_debugfs_files[] = { 489 - { "fwtrc", S_IFREG|S_IRUGO, &bnad_debugfs_op_fwtrc, }, 490 - { "fwsave", S_IFREG|S_IRUGO, &bnad_debugfs_op_fwsave, }, 491 - { "regrd", S_IFREG|S_IRUGO|S_IWUSR, &bnad_debugfs_op_regrd, }, 492 - { "regwr", S_IFREG|S_IWUSR, &bnad_debugfs_op_regwr, }, 493 - { "drvinfo", S_IFREG|S_IRUGO, &bnad_debugfs_op_drvinfo, }, 489 + { "fwtrc", S_IFREG | 0444, &bnad_debugfs_op_fwtrc, }, 490 + { "fwsave", S_IFREG | 0444, &bnad_debugfs_op_fwsave, }, 491 + { "regrd", S_IFREG | 0644, &bnad_debugfs_op_regrd, }, 492 + { "regwr", S_IFREG | 0200, &bnad_debugfs_op_regwr, }, 493 + { "drvinfo", S_IFREG | 0444, &bnad_debugfs_op_drvinfo, }, 494 494 }; 495 495 496 496 static struct dentry *bna_debugfs_root;
+1 -1
drivers/net/ethernet/cavium/thunder/nicvf_main.c
··· 63 63 MODULE_PARM_DESC(debug, "Debug message level bitmap"); 64 64 65 65 static int cpi_alg = CPI_ALG_NONE; 66 - module_param(cpi_alg, int, S_IRUGO); 66 + module_param(cpi_alg, int, 0444); 67 67 MODULE_PARM_DESC(cpi_alg, 68 68 "PFC algorithm (0=none, 1=VLAN, 2=VLAN16, 3=IP Diffserv)"); 69 69
+3 -3
drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c
··· 776 776 777 777 #define CXGB3_ATTR_R(name, val_expr) \ 778 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 781 #define CXGB3_ATTR_RW(name, val_expr, store_method) \ 782 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 785 CXGB3_ATTR_R(cam_size, t3_mc5_size(&adap->mc5)); 786 786 CXGB3_ATTR_RW(nfilters, adap->params.mc5.nfilters, store_nfilters); ··· 859 859 { \ 860 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 864 TM_ATTR(sched0, 0); 865 865 TM_ATTR(sched1, 1);
+56 -56
drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c
··· 2752 2752 static void add_debugfs_mem(struct adapter *adap, const char *name, 2753 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 2756 (void *)adap + idx, &mem_debugfs_fops, 2757 2757 size_mb << 20); 2758 2758 } ··· 2947 2947 struct dentry *de; 2948 2948 2949 2949 static struct t4_debugfs_entry t4_debugfs_files[] = { 2950 - { "cim_la", &cim_la_fops, S_IRUSR, 0 }, 2951 - { "cim_pif_la", &cim_pif_la_fops, S_IRUSR, 0 }, 2952 - { "cim_ma_la", &cim_ma_la_fops, S_IRUSR, 0 }, 2953 - { "cim_qcfg", &cim_qcfg_fops, S_IRUSR, 0 }, 2954 - { "clk", &clk_debugfs_fops, S_IRUSR, 0 }, 2955 - { "devlog", &devlog_fops, S_IRUSR, 0 }, 2956 - { "mboxlog", &mboxlog_fops, S_IRUSR, 0 }, 2957 - { "mbox0", &mbox_debugfs_fops, S_IRUSR | S_IWUSR, 0 }, 2958 - { "mbox1", &mbox_debugfs_fops, S_IRUSR | S_IWUSR, 1 }, 2959 - { "mbox2", &mbox_debugfs_fops, S_IRUSR | S_IWUSR, 2 }, 2960 - { "mbox3", &mbox_debugfs_fops, S_IRUSR | S_IWUSR, 3 }, 2961 - { "mbox4", &mbox_debugfs_fops, S_IRUSR | S_IWUSR, 4 }, 2962 - { "mbox5", &mbox_debugfs_fops, S_IRUSR | S_IWUSR, 5 }, 2963 - { "mbox6", &mbox_debugfs_fops, S_IRUSR | S_IWUSR, 6 }, 2964 - { "mbox7", &mbox_debugfs_fops, S_IRUSR | S_IWUSR, 7 }, 2965 - { "trace0", &mps_trc_debugfs_fops, S_IRUSR | S_IWUSR, 0 }, 2966 - { "trace1", &mps_trc_debugfs_fops, S_IRUSR | S_IWUSR, 1 }, 2967 - { "trace2", &mps_trc_debugfs_fops, S_IRUSR | S_IWUSR, 2 }, 2968 - { "trace3", &mps_trc_debugfs_fops, S_IRUSR | S_IWUSR, 3 }, 2969 - { "l2t", &t4_l2t_fops, S_IRUSR, 0}, 2970 - { "mps_tcam", &mps_tcam_debugfs_fops, S_IRUSR, 0 }, 2971 - { "rss", &rss_debugfs_fops, S_IRUSR, 0 }, 2972 - { "rss_config", &rss_config_debugfs_fops, S_IRUSR, 0 }, 2973 - { "rss_key", &rss_key_debugfs_fops, S_IRUSR, 0 }, 2974 - { "rss_pf_config", &rss_pf_config_debugfs_fops, S_IRUSR, 0 }, 2975 - { "rss_vf_config", &rss_vf_config_debugfs_fops, S_IRUSR, 0 }, 2976 - { "sge_qinfo", &sge_qinfo_debugfs_fops, S_IRUSR, 0 }, 2977 - { "ibq_tp0", &cim_ibq_fops, S_IRUSR, 0 }, 2978 - { "ibq_tp1", &cim_ibq_fops, S_IRUSR, 1 }, 2979 - { "ibq_ulp", &cim_ibq_fops, S_IRUSR, 2 }, 2980 - { "ibq_sge0", &cim_ibq_fops, S_IRUSR, 3 }, 2981 - { "ibq_sge1", &cim_ibq_fops, S_IRUSR, 4 }, 2982 - { "ibq_ncsi", &cim_ibq_fops, S_IRUSR, 5 }, 2983 - { "obq_ulp0", &cim_obq_fops, S_IRUSR, 0 }, 2984 - { "obq_ulp1", &cim_obq_fops, S_IRUSR, 1 }, 2985 - { "obq_ulp2", &cim_obq_fops, S_IRUSR, 2 }, 2986 - { "obq_ulp3", &cim_obq_fops, S_IRUSR, 3 }, 2987 - { "obq_sge", &cim_obq_fops, S_IRUSR, 4 }, 2988 - { "obq_ncsi", &cim_obq_fops, S_IRUSR, 5 }, 2989 - { "tp_la", &tp_la_fops, S_IRUSR, 0 }, 2990 - { "ulprx_la", &ulprx_la_fops, S_IRUSR, 0 }, 2991 - { "sensors", &sensors_debugfs_fops, S_IRUSR, 0 }, 2992 - { "pm_stats", &pm_stats_debugfs_fops, S_IRUSR, 0 }, 2993 - { "tx_rate", &tx_rate_debugfs_fops, S_IRUSR, 0 }, 2994 - { "cctrl", &cctrl_tbl_debugfs_fops, S_IRUSR, 0 }, 2950 + { "cim_la", &cim_la_fops, 0400, 0 }, 2951 + { "cim_pif_la", &cim_pif_la_fops, 0400, 0 }, 2952 + { "cim_ma_la", &cim_ma_la_fops, 0400, 0 }, 2953 + { "cim_qcfg", &cim_qcfg_fops, 0400, 0 }, 2954 + { "clk", &clk_debugfs_fops, 0400, 0 }, 2955 + { "devlog", &devlog_fops, 0400, 0 }, 2956 + { "mboxlog", &mboxlog_fops, 0400, 0 }, 2957 + { "mbox0", &mbox_debugfs_fops, 0600, 0 }, 2958 + { "mbox1", &mbox_debugfs_fops, 0600, 1 }, 2959 + { "mbox2", &mbox_debugfs_fops, 0600, 2 }, 2960 + { "mbox3", &mbox_debugfs_fops, 0600, 3 }, 2961 + { "mbox4", &mbox_debugfs_fops, 0600, 4 }, 2962 + { "mbox5", &mbox_debugfs_fops, 0600, 5 }, 2963 + { "mbox6", &mbox_debugfs_fops, 0600, 6 }, 2964 + { "mbox7", &mbox_debugfs_fops, 0600, 7 }, 2965 + { "trace0", &mps_trc_debugfs_fops, 0600, 0 }, 2966 + { "trace1", &mps_trc_debugfs_fops, 0600, 1 }, 2967 + { "trace2", &mps_trc_debugfs_fops, 0600, 2 }, 2968 + { "trace3", &mps_trc_debugfs_fops, 0600, 3 }, 2969 + { "l2t", &t4_l2t_fops, 0400, 0}, 2970 + { "mps_tcam", &mps_tcam_debugfs_fops, 0400, 0 }, 2971 + { "rss", &rss_debugfs_fops, 0400, 0 }, 2972 + { "rss_config", &rss_config_debugfs_fops, 0400, 0 }, 2973 + { "rss_key", &rss_key_debugfs_fops, 0400, 0 }, 2974 + { "rss_pf_config", &rss_pf_config_debugfs_fops, 0400, 0 }, 2975 + { "rss_vf_config", &rss_vf_config_debugfs_fops, 0400, 0 }, 2976 + { "sge_qinfo", &sge_qinfo_debugfs_fops, 0400, 0 }, 2977 + { "ibq_tp0", &cim_ibq_fops, 0400, 0 }, 2978 + { "ibq_tp1", &cim_ibq_fops, 0400, 1 }, 2979 + { "ibq_ulp", &cim_ibq_fops, 0400, 2 }, 2980 + { "ibq_sge0", &cim_ibq_fops, 0400, 3 }, 2981 + { "ibq_sge1", &cim_ibq_fops, 0400, 4 }, 2982 + { "ibq_ncsi", &cim_ibq_fops, 0400, 5 }, 2983 + { "obq_ulp0", &cim_obq_fops, 0400, 0 }, 2984 + { "obq_ulp1", &cim_obq_fops, 0400, 1 }, 2985 + { "obq_ulp2", &cim_obq_fops, 0400, 2 }, 2986 + { "obq_ulp3", &cim_obq_fops, 0400, 3 }, 2987 + { "obq_sge", &cim_obq_fops, 0400, 4 }, 2988 + { "obq_ncsi", &cim_obq_fops, 0400, 5 }, 2989 + { "tp_la", &tp_la_fops, 0400, 0 }, 2990 + { "ulprx_la", &ulprx_la_fops, 0400, 0 }, 2991 + { "sensors", &sensors_debugfs_fops, 0400, 0 }, 2992 + { "pm_stats", &pm_stats_debugfs_fops, 0400, 0 }, 2993 + { "tx_rate", &tx_rate_debugfs_fops, 0400, 0 }, 2994 + { "cctrl", &cctrl_tbl_debugfs_fops, 0400, 0 }, 2995 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 2997 #endif 2998 - { "tids", &tid_info_debugfs_fops, S_IRUSR, 0}, 2999 - { "blocked_fl", &blocked_fl_fops, S_IRUSR | S_IWUSR, 0 }, 3000 - { "meminfo", &meminfo_fops, S_IRUSR, 0 }, 3001 - { "crypto", &chcr_stats_debugfs_fops, S_IRUSR, 0 }, 2998 + { "tids", &tid_info_debugfs_fops, 0400, 0}, 2999 + { "blocked_fl", &blocked_fl_fops, 0600, 0 }, 3000 + { "meminfo", &meminfo_fops, 0400, 0 }, 3001 + { "crypto", &chcr_stats_debugfs_fops, 0400, 0 }, 3002 3002 }; 3003 3003 3004 3004 /* Debug FS nodes common to all T5 and later adapters. 3005 3005 */ 3006 3006 static struct t4_debugfs_entry t5_debugfs_files[] = { 3007 - { "obq_sge_rx_q0", &cim_obq_fops, S_IRUSR, 6 }, 3008 - { "obq_sge_rx_q1", &cim_obq_fops, S_IRUSR, 7 }, 3007 + { "obq_sge_rx_q0", &cim_obq_fops, 0400, 6 }, 3008 + { "obq_sge_rx_q1", &cim_obq_fops, 0400, 7 }, 3009 3009 }; 3010 3010 3011 3011 add_debugfs_files(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 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 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 3058 adap->debugfs_root, &adap->trace_rss); 3059 3059 3060 3060 return 0;
+5 -5
drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
··· 2402 2402 }; 2403 2403 2404 2404 static struct cxgb4vf_debugfs_entry debugfs_files[] = { 2405 - { "mboxlog", S_IRUGO, &mboxlog_fops }, 2406 - { "sge_qinfo", S_IRUGO, &sge_qinfo_debugfs_fops }, 2407 - { "sge_qstats", S_IRUGO, &sge_qstats_proc_fops }, 2408 - { "resources", S_IRUGO, &resources_proc_fops }, 2409 - { "interfaces", S_IRUGO, &interfaces_proc_fops }, 2405 + { "mboxlog", 0444, &mboxlog_fops }, 2406 + { "sge_qinfo", 0444, &sge_qinfo_debugfs_fops }, 2407 + { "sge_qstats", 0444, &sge_qstats_proc_fops }, 2408 + { "resources", 0444, &resources_proc_fops }, 2409 + { "interfaces", 0444, &interfaces_proc_fops }, 2410 2410 }; 2411 2411 2412 2412 /*
+1 -1
drivers/net/ethernet/ec_bhf.c
··· 602 602 }; 603 603 module_pci_driver(pci_driver); 604 604 605 - module_param(polling_frequency, long, S_IRUGO); 605 + module_param(polling_frequency, long, 0444); 606 606 MODULE_PARM_DESC(polling_frequency, "Polling timer frequency in ns"); 607 607 608 608 MODULE_LICENSE("GPL");
+3 -3
drivers/net/ethernet/emulex/benet/be_main.c
··· 34 34 * Use sysfs method to enable/disable VFs. 35 35 */ 36 36 static unsigned int num_vfs; 37 - module_param(num_vfs, uint, S_IRUGO); 37 + module_param(num_vfs, uint, 0444); 38 38 MODULE_PARM_DESC(num_vfs, "Number of PCI VFs to initialize"); 39 39 40 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 42 MODULE_PARM_DESC(rx_frag_size, "Size of a fragment that holds rcvd data."); 43 43 44 44 /* Per-module error detection/recovery workq shared across all functions. ··· 5788 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 5792 be_hwmon_show_temp, NULL, 1); 5793 5793 5794 5794 static struct attribute *be_hwmon_attrs[] = {
+3 -4
drivers/net/ethernet/ibm/ehea/ehea_main.c
··· 2903 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, 2907 - NULL); 2906 + static DEVICE_ATTR(log_port_id, 0444, ehea_show_port_id, NULL); 2908 2907 2909 2908 static void logical_port_release(struct device *dev) 2910 2909 { ··· 3234 3235 return (ssize_t) count; 3235 3236 } 3236 3237 3237 - static DEVICE_ATTR(probe_port, S_IWUSR, NULL, ehea_probe_port); 3238 - static DEVICE_ATTR(remove_port, S_IWUSR, NULL, ehea_remove_port); 3238 + static DEVICE_ATTR(probe_port, 0200, NULL, ehea_probe_port); 3239 + static DEVICE_ATTR(remove_port, 0200, NULL, ehea_remove_port); 3239 3240 3240 3241 static int ehea_create_device_sysfs(struct platform_device *dev) 3241 3242 {
+1 -1
drivers/net/ethernet/ibm/ibmveth.c
··· 82 82 MODULE_PARM_DESC(rx_flush, "Flush receive buffers before use"); 83 83 84 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 86 MODULE_PARM_DESC(old_large_send, 87 87 "Use old large send method on firmware that supports the new method"); 88 88
+1 -1
drivers/net/ethernet/intel/igb/igb_hwmon.c
··· 148 148 &adapter->hw.mac.thermal_sensor_data.sensor[offset]; 149 149 igb_attr->hw = &adapter->hw; 150 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 152 igb_attr->dev_attr.attr.name = igb_attr->name; 153 153 sysfs_attr_init(&igb_attr->dev_attr.attr); 154 154
+1 -1
drivers/net/ethernet/intel/ixgbe/ixgbe_sysfs.c
··· 146 146 &adapter->hw.mac.thermal_sensor_data.sensor[offset]; 147 147 ixgbe_attr->hw = &adapter->hw; 148 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 150 ixgbe_attr->dev_attr.attr.name = ixgbe_attr->name; 151 151 sysfs_attr_init(&ixgbe_attr->dev_attr.attr); 152 152
+4 -4
drivers/net/ethernet/marvell/mvneta.c
··· 4655 4655 MODULE_AUTHOR("Rami Rosen <rosenr@marvell.com>, Thomas Petazzoni <thomas.petazzoni@free-electrons.com>"); 4656 4656 MODULE_LICENSE("GPL"); 4657 4657 4658 - module_param(rxq_number, int, S_IRUGO); 4659 - module_param(txq_number, int, S_IRUGO); 4658 + module_param(rxq_number, int, 0444); 4659 + module_param(txq_number, int, 0444); 4660 4660 4661 - module_param(rxq_def, int, S_IRUGO); 4662 - module_param(rx_copybreak, int, S_IRUGO | S_IWUSR); 4661 + module_param(rxq_def, int, 0444); 4662 + module_param(rx_copybreak, int, 0644);
+1 -1
drivers/net/ethernet/marvell/skge.c
··· 3783 3783 break; 3784 3784 3785 3785 case NETDEV_UP: 3786 - d = debugfs_create_file(dev->name, S_IRUGO, 3786 + d = debugfs_create_file(dev->name, 0444, 3787 3787 skge_debug, dev, 3788 3788 &skge_debug_fops); 3789 3789 if (!d || IS_ERR(d))
+1 -1
drivers/net/ethernet/marvell/sky2.c
··· 4667 4667 break; 4668 4668 4669 4669 case NETDEV_UP: 4670 - sky2->debugfs = debugfs_create_file(dev->name, S_IRUGO, 4670 + sky2->debugfs = debugfs_create_file(dev->name, 0444, 4671 4671 sky2_debug, dev, 4672 4672 &sky2_debug_fops); 4673 4673 if (IS_ERR(sky2->debugfs))
+8 -8
drivers/net/ethernet/mellanox/mlx4/main.c
··· 2993 2993 2994 2994 sprintf(info->dev_name, "mlx4_port%d", port); 2995 2995 info->port_attr.attr.name = info->dev_name; 2996 - if (mlx4_is_mfunc(dev)) 2997 - info->port_attr.attr.mode = S_IRUGO; 2998 - else { 2999 - info->port_attr.attr.mode = S_IRUGO | S_IWUSR; 2996 + if (mlx4_is_mfunc(dev)) { 2997 + info->port_attr.attr.mode = 0444; 2998 + } else { 2999 + info->port_attr.attr.mode = 0644; 3000 3000 info->port_attr.store = set_port_type; 3001 3001 } 3002 3002 info->port_attr.show = show_port_type; ··· 3011 3011 3012 3012 sprintf(info->dev_mtu_name, "mlx4_port%d_mtu", port); 3013 3013 info->port_mtu_attr.attr.name = info->dev_mtu_name; 3014 - if (mlx4_is_mfunc(dev)) 3015 - info->port_mtu_attr.attr.mode = S_IRUGO; 3016 - else { 3017 - info->port_mtu_attr.attr.mode = S_IRUGO | S_IWUSR; 3014 + if (mlx4_is_mfunc(dev)) { 3015 + info->port_mtu_attr.attr.mode = 0444; 3016 + } else { 3017 + info->port_mtu_attr.attr.mode = 0644; 3018 3018 info->port_mtu_attr.store = set_port_ib_mtu; 3019 3019 } 3020 3020 info->port_mtu_attr.show = show_port_ib_mtu;
+5 -5
drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c
··· 218 218 switch (attr_type) { 219 219 case MLXSW_HWMON_ATTR_TYPE_TEMP: 220 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 222 snprintf(mlxsw_hwmon_attr->name, sizeof(mlxsw_hwmon_attr->name), 223 223 "temp%u_input", num + 1); 224 224 break; 225 225 case MLXSW_HWMON_ATTR_TYPE_TEMP_MAX: 226 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 228 snprintf(mlxsw_hwmon_attr->name, sizeof(mlxsw_hwmon_attr->name), 229 229 "temp%u_highest", num + 1); 230 230 break; 231 231 case MLXSW_HWMON_ATTR_TYPE_TEMP_RST: 232 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 234 snprintf(mlxsw_hwmon_attr->name, sizeof(mlxsw_hwmon_attr->name), 235 235 "temp%u_reset_history", num + 1); 236 236 break; 237 237 case MLXSW_HWMON_ATTR_TYPE_FAN_RPM: 238 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 240 snprintf(mlxsw_hwmon_attr->name, sizeof(mlxsw_hwmon_attr->name), 241 241 "fan%u_input", num + 1); 242 242 break; 243 243 case MLXSW_HWMON_ATTR_TYPE_PWM: 244 244 mlxsw_hwmon_attr->dev_attr.show = mlxsw_hwmon_pwm_show; 245 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 247 snprintf(mlxsw_hwmon_attr->name, sizeof(mlxsw_hwmon_attr->name), 248 248 "pwm%u", num + 1); 249 249 break;
+16 -16
drivers/net/ethernet/myricom/myri10ge/myri10ge.c
··· 266 266 267 267 /* Careful: must be accessed under kernel_param_lock() */ 268 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 270 MODULE_PARM_DESC(myri10ge_fw_name, "Firmware image name"); 271 271 272 272 #define MYRI10GE_MAX_BOARDS 8 ··· 277 277 MODULE_PARM_DESC(myri10ge_fw_names, "Firmware image names per board"); 278 278 279 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 281 MODULE_PARM_DESC(myri10ge_ecrc_enable, "Enable Extended CRC on PCI-E"); 282 282 283 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 285 MODULE_PARM_DESC(myri10ge_small_bytes, "Threshold of small packets"); 286 286 287 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 289 MODULE_PARM_DESC(myri10ge_msi, "Enable Message Signalled Interrupts"); 290 290 291 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 293 MODULE_PARM_DESC(myri10ge_intr_coal_delay, "Interrupt coalescing delay"); 294 294 295 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 297 MODULE_PARM_DESC(myri10ge_flow_control, "Pause parameter"); 298 298 299 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 301 MODULE_PARM_DESC(myri10ge_deassert_wait, 302 302 "Wait when deasserting legacy interrupts"); 303 303 304 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 306 MODULE_PARM_DESC(myri10ge_force_firmware, 307 307 "Force firmware to assume aligned completions"); 308 308 309 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 311 MODULE_PARM_DESC(myri10ge_initial_mtu, "Initial MTU"); 312 312 313 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 315 MODULE_PARM_DESC(myri10ge_napi_weight, "Set NAPI weight"); 316 316 317 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 319 MODULE_PARM_DESC(myri10ge_watchdog_timeout, "Set watchdog timeout"); 320 320 321 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 323 MODULE_PARM_DESC(myri10ge_max_irq_loops, 324 324 "Set stuck legacy IRQ detection threshold"); 325 325 ··· 330 330 MODULE_PARM_DESC(myri10ge_debug, "Debug level (0=none,...,16=all)"); 331 331 332 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 334 MODULE_PARM_DESC(myri10ge_fill_thresh, "Number of empty rx slots allowed"); 335 335 336 336 static int myri10ge_reset_recover = 1; 337 337 338 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 340 MODULE_PARM_DESC(myri10ge_max_slices, "Max tx/rx queues"); 341 341 342 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 344 MODULE_PARM_DESC(myri10ge_rss_hash, "Type of RSS hashing to do"); 345 345 346 346 static int myri10ge_dca = 1; 347 - module_param(myri10ge_dca, int, S_IRUGO); 347 + module_param(myri10ge_dca, int, 0444); 348 348 MODULE_PARM_DESC(myri10ge_dca, "Enable DCA if possible"); 349 349 350 350 #define MYRI10GE_FW_OFFSET 1024*1024
+3 -3
drivers/net/ethernet/netronome/nfp/nfp_net_debugfs.c
··· 231 231 232 232 for (i = 0; i < min(nn->max_rx_rings, nn->max_r_vecs); i++) { 233 233 sprintf(name, "%d", i); 234 - debugfs_create_file(name, S_IRUSR, rx, 234 + debugfs_create_file(name, 0400, rx, 235 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 237 &nn->r_vecs[i], &nfp_xdp_q_fops); 238 238 } 239 239 240 240 for (i = 0; i < min(nn->max_tx_rings, nn->max_r_vecs); i++) { 241 241 sprintf(name, "%d", i); 242 - debugfs_create_file(name, S_IRUSR, tx, 242 + debugfs_create_file(name, 0400, tx, 243 243 &nn->r_vecs[i], &nfp_tx_q_fops); 244 244 } 245 245 }
+7 -7
drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c
··· 2829 2829 } 2830 2830 2831 2831 static const struct device_attribute dev_attr_bridged_mode = { 2832 - .attr = {.name = "bridged_mode", .mode = (S_IRUGO | S_IWUSR)}, 2833 - .show = netxen_show_bridged_mode, 2834 - .store = netxen_store_bridged_mode, 2832 + .attr = { .name = "bridged_mode", .mode = 0644 }, 2833 + .show = netxen_show_bridged_mode, 2834 + .store = netxen_store_bridged_mode, 2835 2835 }; 2836 2836 2837 2837 static ssize_t ··· 2861 2861 } 2862 2862 2863 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 2865 .show = netxen_show_diag_mode, 2866 2866 .store = netxen_store_diag_mode, 2867 2867 }; ··· 3006 3006 3007 3007 3008 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 3010 .size = 0, 3011 3011 .read = netxen_sysfs_read_crb, 3012 3012 .write = netxen_sysfs_write_crb, 3013 3013 }; 3014 3014 3015 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 3017 .size = 0, 3018 3018 .read = netxen_sysfs_read_mem, 3019 3019 .write = netxen_sysfs_write_mem, ··· 3142 3142 } 3143 3143 3144 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 3146 .size = sizeof(struct netxen_dimm_cfg), 3147 3147 .read = netxen_sysfs_read_dimm, 3148 3148 };
+15 -15
drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c
··· 1175 1175 } 1176 1176 1177 1177 static const struct device_attribute dev_attr_bridged_mode = { 1178 - .attr = {.name = "bridged_mode", .mode = (S_IRUGO | S_IWUSR)}, 1179 - .show = qlcnic_show_bridged_mode, 1180 - .store = qlcnic_store_bridged_mode, 1178 + .attr = { .name = "bridged_mode", .mode = 0644 }, 1179 + .show = qlcnic_show_bridged_mode, 1180 + .store = qlcnic_store_bridged_mode, 1181 1181 }; 1182 1182 1183 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 1185 .show = qlcnic_show_diag_mode, 1186 1186 .store = qlcnic_store_diag_mode, 1187 1187 }; 1188 1188 1189 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 1191 .show = qlcnic_show_beacon, 1192 1192 .store = qlcnic_store_beacon, 1193 1193 }; 1194 1194 1195 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 1197 .size = 0, 1198 1198 .read = qlcnic_sysfs_read_crb, 1199 1199 .write = qlcnic_sysfs_write_crb, 1200 1200 }; 1201 1201 1202 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 1204 .size = 0, 1205 1205 .read = qlcnic_sysfs_read_mem, 1206 1206 .write = qlcnic_sysfs_write_mem, 1207 1207 }; 1208 1208 1209 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 1211 .size = 0, 1212 1212 .read = qlcnic_sysfs_read_npar_config, 1213 1213 .write = qlcnic_sysfs_write_npar_config, 1214 1214 }; 1215 1215 1216 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 1218 .size = 0, 1219 1219 .read = qlcnic_sysfs_read_pci_config, 1220 1220 .write = NULL, 1221 1221 }; 1222 1222 1223 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 1225 .size = 0, 1226 1226 .read = qlcnic_sysfs_get_port_stats, 1227 1227 .write = qlcnic_sysfs_clear_port_stats, 1228 1228 }; 1229 1229 1230 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 1232 .size = 0, 1233 1233 .read = qlcnic_sysfs_get_esw_stats, 1234 1234 .write = qlcnic_sysfs_clear_esw_stats, 1235 1235 }; 1236 1236 1237 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 1239 .size = 0, 1240 1240 .read = qlcnic_sysfs_read_esw_config, 1241 1241 .write = qlcnic_sysfs_write_esw_config, 1242 1242 }; 1243 1243 1244 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 1246 .size = 0, 1247 1247 .read = qlcnic_sysfs_read_pm_config, 1248 1248 .write = qlcnic_sysfs_write_pm_config, 1249 1249 }; 1250 1250 1251 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 1253 .size = 0, 1254 1254 .read = qlcnic_83xx_sysfs_flash_read_handler, 1255 1255 .write = qlcnic_83xx_sysfs_flash_write_handler, ··· 1276 1276 } 1277 1277 1278 1278 /* hwmon-sysfs attributes */ 1279 - static SENSOR_DEVICE_ATTR(temp1_input, S_IRUGO, 1279 + static SENSOR_DEVICE_ATTR(temp1_input, 0444, 1280 1280 qlcnic_hwmon_show_temp, NULL, 1); 1281 1281 1282 1282 static struct attribute *qlcnic_hwmon_attrs[] = {
+1 -1
drivers/net/ethernet/qualcomm/qca_debug.c
··· 151 151 dev_name(&qca->net_dev->dev)); 152 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 155 &qcaspi_info_ops); 156 156 } 157 157
+2 -2
drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c
··· 57 57 static int debug = -1; 58 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 63 static const u32 default_msg_level = (NETIF_MSG_DRV | NETIF_MSG_PROBE | 64 64 NETIF_MSG_LINK | NETIF_MSG_IFUP | 65 65 NETIF_MSG_IFDOWN | NETIF_MSG_TIMER);
+1 -1
drivers/net/ethernet/sfc/mcdi_mon.c
··· 298 298 attr->limit_value = limit_value; 299 299 sysfs_attr_init(&attr->dev_attr.attr); 300 300 attr->dev_attr.attr.name = attr->name; 301 - attr->dev_attr.attr.mode = S_IRUGO; 301 + attr->dev_attr.attr.mode = 0444; 302 302 attr->dev_attr.show = reader; 303 303 hwmon->group.attrs[hwmon->n_attrs++] = &attr->dev_attr.attr; 304 304 }
+13 -13
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
··· 57 57 /* Module parameters */ 58 58 #define TX_TIMEO 5000 59 59 static int watchdog = TX_TIMEO; 60 - module_param(watchdog, int, S_IRUGO | S_IWUSR); 60 + module_param(watchdog, int, 0644); 61 61 MODULE_PARM_DESC(watchdog, "Transmit timeout in milliseconds (default 5s)"); 62 62 63 63 static int debug = -1; 64 - module_param(debug, int, S_IRUGO | S_IWUSR); 64 + module_param(debug, int, 0644); 65 65 MODULE_PARM_DESC(debug, "Message Level (-1: default, 0: no output, 16: all)"); 66 66 67 67 static int phyaddr = -1; 68 - module_param(phyaddr, int, S_IRUGO); 68 + module_param(phyaddr, int, 0444); 69 69 MODULE_PARM_DESC(phyaddr, "Physical device address"); 70 70 71 71 #define STMMAC_TX_THRESH (DMA_TX_SIZE / 4) 72 72 #define STMMAC_RX_THRESH (DMA_RX_SIZE / 4) 73 73 74 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 76 MODULE_PARM_DESC(flow_ctrl, "Flow control ability [on/off]"); 77 77 78 78 static int pause = PAUSE_TIME; 79 - module_param(pause, int, S_IRUGO | S_IWUSR); 79 + module_param(pause, int, 0644); 80 80 MODULE_PARM_DESC(pause, "Flow Control Pause Time"); 81 81 82 82 #define TC_DEFAULT 64 83 83 static int tc = TC_DEFAULT; 84 - module_param(tc, int, S_IRUGO | S_IWUSR); 84 + module_param(tc, int, 0644); 85 85 MODULE_PARM_DESC(tc, "DMA threshold control value"); 86 86 87 87 #define DEFAULT_BUFSIZE 1536 88 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 90 MODULE_PARM_DESC(buf_sz, "DMA buffer size"); 91 91 92 92 #define STMMAC_RX_COPYBREAK 256 ··· 97 97 98 98 #define STMMAC_DEFAULT_LPI_TIMER 1000 99 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 101 MODULE_PARM_DESC(eee_timer, "LPI tx expiration time in msec"); 102 102 #define STMMAC_LPI_T(x) (jiffies + msecs_to_jiffies(x)) 103 103 ··· 105 105 * but allow user to force to use the chain instead of the ring 106 106 */ 107 107 static unsigned int chain_mode; 108 - module_param(chain_mode, int, S_IRUGO); 108 + module_param(chain_mode, int, 0444); 109 109 MODULE_PARM_DESC(chain_mode, "To use chain instead of ring mode"); 110 110 111 111 static irqreturn_t stmmac_interrupt(int irq, void *dev_id); ··· 4001 4001 4002 4002 /* Entry to report DMA RX/TX rings */ 4003 4003 priv->dbgfs_rings_status = 4004 - debugfs_create_file("descriptors_status", S_IRUGO, 4004 + debugfs_create_file("descriptors_status", 0444, 4005 4005 priv->dbgfs_dir, dev, 4006 4006 &stmmac_rings_status_fops); 4007 4007 ··· 4013 4013 } 4014 4014 4015 4015 /* Entry to report the DMA HW features */ 4016 - priv->dbgfs_dma_cap = debugfs_create_file("dma_cap", S_IRUGO, 4017 - priv->dbgfs_dir, 4018 - dev, &stmmac_dma_cap_fops); 4016 + priv->dbgfs_dma_cap = debugfs_create_file("dma_cap", 0444, 4017 + priv->dbgfs_dir, 4018 + dev, &stmmac_dma_cap_fops); 4019 4019 4020 4020 if (!priv->dbgfs_dma_cap || IS_ERR(priv->dbgfs_dma_cap)) { 4021 4021 netdev_err(priv->dev, "ERROR creating stmmac MMC debugfs file\n");
+5 -5
drivers/net/ethernet/sun/niu.c
··· 9437 9437 } 9438 9438 9439 9439 static struct device_attribute niu_parent_attributes[] = { 9440 - __ATTR(port_phy, S_IRUGO, show_port_phy, NULL), 9441 - __ATTR(plat_type, S_IRUGO, show_plat_type, NULL), 9442 - __ATTR(rxchan_per_port, S_IRUGO, show_rxchan_per_port, NULL), 9443 - __ATTR(txchan_per_port, S_IRUGO, show_txchan_per_port, NULL), 9444 - __ATTR(num_ports, S_IRUGO, show_num_ports, NULL), 9440 + __ATTR(port_phy, 0444, show_port_phy, NULL), 9441 + __ATTR(plat_type, 0444, show_plat_type, NULL), 9442 + __ATTR(rxchan_per_port, 0444, show_rxchan_per_port, NULL), 9443 + __ATTR(txchan_per_port, 0444, show_txchan_per_port, NULL), 9444 + __ATTR(num_ports, 0444, show_num_ports, NULL), 9445 9445 {} 9446 9446 }; 9447 9447