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

drivers/net: 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>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Joe Perches and committed by
David S. Miller
d61e4038 d6444062

+124 -127
+1 -1
drivers/net/bonding/bond_procfs.c
··· 287 287 288 288 if (bn->proc_dir) { 289 289 bond->proc_entry = proc_create_data(bond_dev->name, 290 - S_IRUGO, bn->proc_dir, 290 + 0444, bn->proc_dir, 291 291 &bond_info_fops, bond); 292 292 if (bond->proc_entry == NULL) 293 293 netdev_warn(bond_dev, "Cannot create /proc/net/%s/%s\n",
+36 -37
drivers/net/bonding/bond_sysfs.c
··· 147 147 static const struct class_attribute class_attr_bonding_masters = { 148 148 .attr = { 149 149 .name = "bonding_masters", 150 - .mode = S_IWUSR | S_IRUGO, 150 + .mode = 0644, 151 151 }, 152 152 .show = bonding_show_bonds, 153 153 .store = bonding_store_bonds, ··· 202 202 203 203 return res; 204 204 } 205 - static DEVICE_ATTR(slaves, S_IRUGO | S_IWUSR, bonding_show_slaves, 205 + static DEVICE_ATTR(slaves, 0644, bonding_show_slaves, 206 206 bonding_sysfs_store_option); 207 207 208 208 /* Show the bonding mode. */ ··· 216 216 217 217 return sprintf(buf, "%s %d\n", val->string, BOND_MODE(bond)); 218 218 } 219 - static DEVICE_ATTR(mode, S_IRUGO | S_IWUSR, 220 - bonding_show_mode, bonding_sysfs_store_option); 219 + static DEVICE_ATTR(mode, 0644, bonding_show_mode, bonding_sysfs_store_option); 221 220 222 221 /* Show the bonding transmit hash method. */ 223 222 static ssize_t bonding_show_xmit_hash(struct device *d, ··· 230 231 231 232 return sprintf(buf, "%s %d\n", val->string, bond->params.xmit_policy); 232 233 } 233 - static DEVICE_ATTR(xmit_hash_policy, S_IRUGO | S_IWUSR, 234 + static DEVICE_ATTR(xmit_hash_policy, 0644, 234 235 bonding_show_xmit_hash, bonding_sysfs_store_option); 235 236 236 237 /* Show arp_validate. */ ··· 246 247 247 248 return sprintf(buf, "%s %d\n", val->string, bond->params.arp_validate); 248 249 } 249 - static DEVICE_ATTR(arp_validate, S_IRUGO | S_IWUSR, bonding_show_arp_validate, 250 + static DEVICE_ATTR(arp_validate, 0644, bonding_show_arp_validate, 250 251 bonding_sysfs_store_option); 251 252 252 253 /* Show arp_all_targets. */ ··· 262 263 return sprintf(buf, "%s %d\n", 263 264 val->string, bond->params.arp_all_targets); 264 265 } 265 - static DEVICE_ATTR(arp_all_targets, S_IRUGO | S_IWUSR, 266 + static DEVICE_ATTR(arp_all_targets, 0644, 266 267 bonding_show_arp_all_targets, bonding_sysfs_store_option); 267 268 268 269 /* Show fail_over_mac. */ ··· 278 279 279 280 return sprintf(buf, "%s %d\n", val->string, bond->params.fail_over_mac); 280 281 } 281 - static DEVICE_ATTR(fail_over_mac, S_IRUGO | S_IWUSR, 282 + static DEVICE_ATTR(fail_over_mac, 0644, 282 283 bonding_show_fail_over_mac, bonding_sysfs_store_option); 283 284 284 285 /* Show the arp timer interval. */ ··· 290 291 291 292 return sprintf(buf, "%d\n", bond->params.arp_interval); 292 293 } 293 - static DEVICE_ATTR(arp_interval, S_IRUGO | S_IWUSR, 294 + static DEVICE_ATTR(arp_interval, 0644, 294 295 bonding_show_arp_interval, bonding_sysfs_store_option); 295 296 296 297 /* Show the arp targets. */ ··· 311 312 312 313 return res; 313 314 } 314 - static DEVICE_ATTR(arp_ip_target, S_IRUGO | S_IWUSR, 315 + static DEVICE_ATTR(arp_ip_target, 0644, 315 316 bonding_show_arp_targets, bonding_sysfs_store_option); 316 317 317 318 /* Show the up and down delays. */ ··· 323 324 324 325 return sprintf(buf, "%d\n", bond->params.downdelay * bond->params.miimon); 325 326 } 326 - static DEVICE_ATTR(downdelay, S_IRUGO | S_IWUSR, 327 + static DEVICE_ATTR(downdelay, 0644, 327 328 bonding_show_downdelay, bonding_sysfs_store_option); 328 329 329 330 static ssize_t bonding_show_updelay(struct device *d, ··· 335 336 return sprintf(buf, "%d\n", bond->params.updelay * bond->params.miimon); 336 337 337 338 } 338 - static DEVICE_ATTR(updelay, S_IRUGO | S_IWUSR, 339 + static DEVICE_ATTR(updelay, 0644, 339 340 bonding_show_updelay, bonding_sysfs_store_option); 340 341 341 342 /* Show the LACP interval. */ ··· 350 351 351 352 return sprintf(buf, "%s %d\n", val->string, bond->params.lacp_fast); 352 353 } 353 - static DEVICE_ATTR(lacp_rate, S_IRUGO | S_IWUSR, 354 + static DEVICE_ATTR(lacp_rate, 0644, 354 355 bonding_show_lacp, bonding_sysfs_store_option); 355 356 356 357 static ssize_t bonding_show_min_links(struct device *d, ··· 361 362 362 363 return sprintf(buf, "%u\n", bond->params.min_links); 363 364 } 364 - static DEVICE_ATTR(min_links, S_IRUGO | S_IWUSR, 365 + static DEVICE_ATTR(min_links, 0644, 365 366 bonding_show_min_links, bonding_sysfs_store_option); 366 367 367 368 static ssize_t bonding_show_ad_select(struct device *d, ··· 375 376 376 377 return sprintf(buf, "%s %d\n", val->string, bond->params.ad_select); 377 378 } 378 - static DEVICE_ATTR(ad_select, S_IRUGO | S_IWUSR, 379 + static DEVICE_ATTR(ad_select, 0644, 379 380 bonding_show_ad_select, bonding_sysfs_store_option); 380 381 381 382 /* Show the number of peer notifications to send after a failover event. */ ··· 386 387 struct bonding *bond = to_bond(d); 387 388 return sprintf(buf, "%d\n", bond->params.num_peer_notif); 388 389 } 389 - static DEVICE_ATTR(num_grat_arp, S_IRUGO | S_IWUSR, 390 + static DEVICE_ATTR(num_grat_arp, 0644, 390 391 bonding_show_num_peer_notif, bonding_sysfs_store_option); 391 - static DEVICE_ATTR(num_unsol_na, S_IRUGO | S_IWUSR, 392 + static DEVICE_ATTR(num_unsol_na, 0644, 392 393 bonding_show_num_peer_notif, bonding_sysfs_store_option); 393 394 394 395 /* Show the MII monitor interval. */ ··· 400 401 401 402 return sprintf(buf, "%d\n", bond->params.miimon); 402 403 } 403 - static DEVICE_ATTR(miimon, S_IRUGO | S_IWUSR, 404 + static DEVICE_ATTR(miimon, 0644, 404 405 bonding_show_miimon, bonding_sysfs_store_option); 405 406 406 407 /* Show the primary slave. */ ··· 420 421 421 422 return count; 422 423 } 423 - static DEVICE_ATTR(primary, S_IRUGO | S_IWUSR, 424 + static DEVICE_ATTR(primary, 0644, 424 425 bonding_show_primary, bonding_sysfs_store_option); 425 426 426 427 /* Show the primary_reselect flag. */ ··· 437 438 return sprintf(buf, "%s %d\n", 438 439 val->string, bond->params.primary_reselect); 439 440 } 440 - static DEVICE_ATTR(primary_reselect, S_IRUGO | S_IWUSR, 441 + static DEVICE_ATTR(primary_reselect, 0644, 441 442 bonding_show_primary_reselect, bonding_sysfs_store_option); 442 443 443 444 /* Show the use_carrier flag. */ ··· 449 450 450 451 return sprintf(buf, "%d\n", bond->params.use_carrier); 451 452 } 452 - static DEVICE_ATTR(use_carrier, S_IRUGO | S_IWUSR, 453 + static DEVICE_ATTR(use_carrier, 0644, 453 454 bonding_show_carrier, bonding_sysfs_store_option); 454 455 455 456 ··· 470 471 471 472 return count; 472 473 } 473 - static DEVICE_ATTR(active_slave, S_IRUGO | S_IWUSR, 474 + static DEVICE_ATTR(active_slave, 0644, 474 475 bonding_show_active_slave, bonding_sysfs_store_option); 475 476 476 477 /* Show link status of the bond interface. */ ··· 483 484 484 485 return sprintf(buf, "%s\n", active ? "up" : "down"); 485 486 } 486 - static DEVICE_ATTR(mii_status, S_IRUGO, bonding_show_mii_status, NULL); 487 + static DEVICE_ATTR(mii_status, 0444, bonding_show_mii_status, NULL); 487 488 488 489 /* Show current 802.3ad aggregator ID. */ 489 490 static ssize_t bonding_show_ad_aggregator(struct device *d, ··· 502 503 503 504 return count; 504 505 } 505 - static DEVICE_ATTR(ad_aggregator, S_IRUGO, bonding_show_ad_aggregator, NULL); 506 + static DEVICE_ATTR(ad_aggregator, 0444, bonding_show_ad_aggregator, NULL); 506 507 507 508 508 509 /* Show number of active 802.3ad ports. */ ··· 522 523 523 524 return count; 524 525 } 525 - static DEVICE_ATTR(ad_num_ports, S_IRUGO, bonding_show_ad_num_ports, NULL); 526 + static DEVICE_ATTR(ad_num_ports, 0444, bonding_show_ad_num_ports, NULL); 526 527 527 528 528 529 /* Show current 802.3ad actor key. */ ··· 542 543 543 544 return count; 544 545 } 545 - static DEVICE_ATTR(ad_actor_key, S_IRUGO, bonding_show_ad_actor_key, NULL); 546 + static DEVICE_ATTR(ad_actor_key, 0444, bonding_show_ad_actor_key, NULL); 546 547 547 548 548 549 /* Show current 802.3ad partner key. */ ··· 562 563 563 564 return count; 564 565 } 565 - static DEVICE_ATTR(ad_partner_key, S_IRUGO, bonding_show_ad_partner_key, NULL); 566 + static DEVICE_ATTR(ad_partner_key, 0444, bonding_show_ad_partner_key, NULL); 566 567 567 568 568 569 /* Show current 802.3ad partner mac. */ ··· 581 582 582 583 return count; 583 584 } 584 - static DEVICE_ATTR(ad_partner_mac, S_IRUGO, bonding_show_ad_partner_mac, NULL); 585 + static DEVICE_ATTR(ad_partner_mac, 0444, bonding_show_ad_partner_mac, NULL); 585 586 586 587 /* Show the queue_ids of the slaves in the current bond. */ 587 588 static ssize_t bonding_show_queue_id(struct device *d, ··· 614 615 615 616 return res; 616 617 } 617 - static DEVICE_ATTR(queue_id, S_IRUGO | S_IWUSR, bonding_show_queue_id, 618 + static DEVICE_ATTR(queue_id, 0644, bonding_show_queue_id, 618 619 bonding_sysfs_store_option); 619 620 620 621 ··· 627 628 628 629 return sprintf(buf, "%d\n", bond->params.all_slaves_active); 629 630 } 630 - static DEVICE_ATTR(all_slaves_active, S_IRUGO | S_IWUSR, 631 + static DEVICE_ATTR(all_slaves_active, 0644, 631 632 bonding_show_slaves_active, bonding_sysfs_store_option); 632 633 633 634 /* Show the number of IGMP membership reports to send on link failure */ ··· 639 640 640 641 return sprintf(buf, "%d\n", bond->params.resend_igmp); 641 642 } 642 - static DEVICE_ATTR(resend_igmp, S_IRUGO | S_IWUSR, 643 + static DEVICE_ATTR(resend_igmp, 0644, 643 644 bonding_show_resend_igmp, bonding_sysfs_store_option); 644 645 645 646 ··· 651 652 652 653 return sprintf(buf, "%d\n", bond->params.lp_interval); 653 654 } 654 - static DEVICE_ATTR(lp_interval, S_IRUGO | S_IWUSR, 655 + static DEVICE_ATTR(lp_interval, 0644, 655 656 bonding_show_lp_interval, bonding_sysfs_store_option); 656 657 657 658 static ssize_t bonding_show_tlb_dynamic_lb(struct device *d, ··· 661 662 struct bonding *bond = to_bond(d); 662 663 return sprintf(buf, "%d\n", bond->params.tlb_dynamic_lb); 663 664 } 664 - static DEVICE_ATTR(tlb_dynamic_lb, S_IRUGO | S_IWUSR, 665 + static DEVICE_ATTR(tlb_dynamic_lb, 0644, 665 666 bonding_show_tlb_dynamic_lb, bonding_sysfs_store_option); 666 667 667 668 static ssize_t bonding_show_packets_per_slave(struct device *d, ··· 673 674 674 675 return sprintf(buf, "%u\n", packets_per_slave); 675 676 } 676 - static DEVICE_ATTR(packets_per_slave, S_IRUGO | S_IWUSR, 677 + static DEVICE_ATTR(packets_per_slave, 0644, 677 678 bonding_show_packets_per_slave, bonding_sysfs_store_option); 678 679 679 680 static ssize_t bonding_show_ad_actor_sys_prio(struct device *d, ··· 687 688 688 689 return 0; 689 690 } 690 - static DEVICE_ATTR(ad_actor_sys_prio, S_IRUGO | S_IWUSR, 691 + static DEVICE_ATTR(ad_actor_sys_prio, 0644, 691 692 bonding_show_ad_actor_sys_prio, bonding_sysfs_store_option); 692 693 693 694 static ssize_t bonding_show_ad_actor_system(struct device *d, ··· 702 703 return 0; 703 704 } 704 705 705 - static DEVICE_ATTR(ad_actor_system, S_IRUGO | S_IWUSR, 706 + static DEVICE_ATTR(ad_actor_system, 0644, 706 707 bonding_show_ad_actor_system, bonding_sysfs_store_option); 707 708 708 709 static ssize_t bonding_show_ad_user_port_key(struct device *d, ··· 716 717 717 718 return 0; 718 719 } 719 - static DEVICE_ATTR(ad_user_port_key, S_IRUGO | S_IWUSR, 720 + static DEVICE_ATTR(ad_user_port_key, 0644, 720 721 bonding_show_ad_user_port_key, bonding_sysfs_store_option); 721 722 722 723 static struct attribute *per_bond_attrs[] = {
+2 -2
drivers/net/bonding/bond_sysfs_slave.c
··· 25 25 .mode = _mode }, \ 26 26 .show = _show, \ 27 27 }; 28 - #define SLAVE_ATTR_RO(_name) \ 29 - SLAVE_ATTR(_name, S_IRUGO, _name##_show) 28 + #define SLAVE_ATTR_RO(_name) \ 29 + SLAVE_ATTR(_name, 0444, _name##_show) 30 30 31 31 static ssize_t state_show(struct slave *slave, char *buf) 32 32 {
+16 -16
drivers/net/caif/caif_serial.c
··· 40 40 static LIST_HEAD(ser_release_list); 41 41 42 42 static bool ser_loop; 43 - module_param(ser_loop, bool, S_IRUGO); 43 + module_param(ser_loop, bool, 0444); 44 44 MODULE_PARM_DESC(ser_loop, "Run in simulated loopback mode."); 45 45 46 46 static bool ser_use_stx = true; 47 - module_param(ser_use_stx, bool, S_IRUGO); 47 + module_param(ser_use_stx, bool, 0444); 48 48 MODULE_PARM_DESC(ser_use_stx, "STX enabled or not."); 49 49 50 50 static bool ser_use_fcs = true; 51 51 52 - module_param(ser_use_fcs, bool, S_IRUGO); 52 + module_param(ser_use_fcs, bool, 0444); 53 53 MODULE_PARM_DESC(ser_use_fcs, "FCS enabled or not."); 54 54 55 55 static int ser_write_chunk = MAX_WRITE_CHUNK; 56 - module_param(ser_write_chunk, int, S_IRUGO); 56 + module_param(ser_write_chunk, int, 0444); 57 57 58 58 MODULE_PARM_DESC(ser_write_chunk, "Maximum size of data written to UART."); 59 59 ··· 97 97 ser->debugfs_tty_dir = 98 98 debugfs_create_dir(tty->name, debugfsdir); 99 99 if (!IS_ERR(ser->debugfs_tty_dir)) { 100 - debugfs_create_blob("last_tx_msg", S_IRUSR, 101 - ser->debugfs_tty_dir, 102 - &ser->tx_blob); 100 + debugfs_create_blob("last_tx_msg", 0400, 101 + ser->debugfs_tty_dir, 102 + &ser->tx_blob); 103 103 104 - debugfs_create_blob("last_rx_msg", S_IRUSR, 105 - ser->debugfs_tty_dir, 106 - &ser->rx_blob); 104 + debugfs_create_blob("last_rx_msg", 0400, 105 + ser->debugfs_tty_dir, 106 + &ser->rx_blob); 107 107 108 - debugfs_create_x32("ser_state", S_IRUSR, 109 - ser->debugfs_tty_dir, 110 - (u32 *)&ser->state); 108 + debugfs_create_x32("ser_state", 0400, 109 + ser->debugfs_tty_dir, 110 + (u32 *)&ser->state); 111 111 112 - debugfs_create_x8("tty_status", S_IRUSR, 113 - ser->debugfs_tty_dir, 114 - &ser->tty_status); 112 + debugfs_create_x8("tty_status", 0400, 113 + ser->debugfs_tty_dir, 114 + &ser->tty_status); 115 115 116 116 } 117 117 ser->tx_blob.data = ser->tx_data;
+8 -8
drivers/net/caif/caif_spi.c
··· 35 35 #define PAD_POW2(x, pow) ((((x)&((pow)-1))==0) ? 0 : (((pow)-((x)&((pow)-1))))) 36 36 37 37 static bool spi_loop; 38 - module_param(spi_loop, bool, S_IRUGO); 38 + module_param(spi_loop, bool, 0444); 39 39 MODULE_PARM_DESC(spi_loop, "SPI running in loopback mode."); 40 40 41 41 /* SPI frame alignment. */ 42 - module_param(spi_frm_align, int, S_IRUGO); 42 + module_param(spi_frm_align, int, 0444); 43 43 MODULE_PARM_DESC(spi_frm_align, "SPI frame alignment."); 44 44 45 45 /* 46 46 * SPI padding options. 47 47 * Warning: must be a base of 2 (& operation used) and can not be zero ! 48 48 */ 49 - module_param(spi_up_head_align, int, S_IRUGO); 49 + module_param(spi_up_head_align, int, 0444); 50 50 MODULE_PARM_DESC(spi_up_head_align, "SPI uplink head alignment."); 51 51 52 - module_param(spi_up_tail_align, int, S_IRUGO); 52 + module_param(spi_up_tail_align, int, 0444); 53 53 MODULE_PARM_DESC(spi_up_tail_align, "SPI uplink tail alignment."); 54 54 55 - module_param(spi_down_head_align, int, S_IRUGO); 55 + module_param(spi_down_head_align, int, 0444); 56 56 MODULE_PARM_DESC(spi_down_head_align, "SPI downlink head alignment."); 57 57 58 - module_param(spi_down_tail_align, int, S_IRUGO); 58 + module_param(spi_down_tail_align, int, 0444); 59 59 MODULE_PARM_DESC(spi_down_tail_align, "SPI downlink tail alignment."); 60 60 61 61 #ifdef CONFIG_ARM ··· 250 250 static inline void dev_debugfs_add(struct cfspi *cfspi) 251 251 { 252 252 cfspi->dbgfs_dir = debugfs_create_dir(cfspi->pdev->name, dbgfs_root); 253 - cfspi->dbgfs_state = debugfs_create_file("state", S_IRUGO, 253 + cfspi->dbgfs_state = debugfs_create_file("state", 0444, 254 254 cfspi->dbgfs_dir, cfspi, 255 255 &dbgfs_state_fops); 256 - cfspi->dbgfs_frame = debugfs_create_file("frame", S_IRUGO, 256 + cfspi->dbgfs_frame = debugfs_create_file("frame", 0444, 257 257 cfspi->dbgfs_dir, cfspi, 258 258 &dbgfs_frame_fops); 259 259 }
+8 -8
drivers/net/caif/caif_virtio.c
··· 629 629 if (IS_ERR(cfv->debugfs)) 630 630 return; 631 631 632 - debugfs_create_u32("rx-napi-complete", S_IRUSR, cfv->debugfs, 632 + debugfs_create_u32("rx-napi-complete", 0400, cfv->debugfs, 633 633 &cfv->stats.rx_napi_complete); 634 - debugfs_create_u32("rx-napi-resched", S_IRUSR, cfv->debugfs, 634 + debugfs_create_u32("rx-napi-resched", 0400, cfv->debugfs, 635 635 &cfv->stats.rx_napi_resched); 636 - debugfs_create_u32("rx-nomem", S_IRUSR, cfv->debugfs, 636 + debugfs_create_u32("rx-nomem", 0400, cfv->debugfs, 637 637 &cfv->stats.rx_nomem); 638 - debugfs_create_u32("rx-kicks", S_IRUSR, cfv->debugfs, 638 + debugfs_create_u32("rx-kicks", 0400, cfv->debugfs, 639 639 &cfv->stats.rx_kicks); 640 - debugfs_create_u32("tx-full-ring", S_IRUSR, cfv->debugfs, 640 + debugfs_create_u32("tx-full-ring", 0400, cfv->debugfs, 641 641 &cfv->stats.tx_full_ring); 642 - debugfs_create_u32("tx-no-mem", S_IRUSR, cfv->debugfs, 642 + debugfs_create_u32("tx-no-mem", 0400, cfv->debugfs, 643 643 &cfv->stats.tx_no_mem); 644 - debugfs_create_u32("tx-kicks", S_IRUSR, cfv->debugfs, 644 + debugfs_create_u32("tx-kicks", 0400, cfv->debugfs, 645 645 &cfv->stats.tx_kicks); 646 - debugfs_create_u32("tx-flow-on", S_IRUSR, cfv->debugfs, 646 + debugfs_create_u32("tx-flow-on", 0400, cfv->debugfs, 647 647 &cfv->stats.tx_flow_on); 648 648 } 649 649
+1 -2
drivers/net/can/at91_can.c
··· 1224 1224 return ret; 1225 1225 } 1226 1226 1227 - static DEVICE_ATTR(mb0_id, S_IWUSR | S_IRUGO, 1228 - at91_sysfs_show_mb0_id, at91_sysfs_set_mb0_id); 1227 + static DEVICE_ATTR(mb0_id, 0644, at91_sysfs_show_mb0_id, at91_sysfs_set_mb0_id); 1229 1228 1230 1229 static struct attribute *at91_sysfs_attrs[] = { 1231 1230 &dev_attr_mb0_id.attr,
+2 -2
drivers/net/can/cc770/cc770.c
··· 67 67 * otherwise 11 bit SFF messages. 68 68 */ 69 69 static int msgobj15_eff; 70 - module_param(msgobj15_eff, int, S_IRUGO); 70 + module_param(msgobj15_eff, int, 0444); 71 71 MODULE_PARM_DESC(msgobj15_eff, "Extended 29-bit frames for message object 15 " 72 72 "(default: 11-bit standard frames)"); 73 73 74 74 static int i82527_compat; 75 - module_param(i82527_compat, int, S_IRUGO); 75 + module_param(i82527_compat, int, 0444); 76 76 MODULE_PARM_DESC(i82527_compat, "Strict Intel 82527 comptibility mode " 77 77 "without using additional functions"); 78 78
+8 -8
drivers/net/can/cc770/cc770_isa.c
··· 82 82 static u8 bcr[MAXDEV] = {[0 ... (MAXDEV - 1)] = 0xff}; 83 83 static int indirect[MAXDEV] = {[0 ... (MAXDEV - 1)] = -1}; 84 84 85 - module_param_hw_array(port, ulong, ioport, NULL, S_IRUGO); 85 + module_param_hw_array(port, ulong, ioport, NULL, 0444); 86 86 MODULE_PARM_DESC(port, "I/O port number"); 87 87 88 - module_param_hw_array(mem, ulong, iomem, NULL, S_IRUGO); 88 + module_param_hw_array(mem, ulong, iomem, NULL, 0444); 89 89 MODULE_PARM_DESC(mem, "I/O memory address"); 90 90 91 - module_param_hw_array(indirect, int, ioport, NULL, S_IRUGO); 91 + module_param_hw_array(indirect, int, ioport, NULL, 0444); 92 92 MODULE_PARM_DESC(indirect, "Indirect access via address and data port"); 93 93 94 - module_param_hw_array(irq, int, irq, NULL, S_IRUGO); 94 + module_param_hw_array(irq, int, irq, NULL, 0444); 95 95 MODULE_PARM_DESC(irq, "IRQ number"); 96 96 97 - module_param_array(clk, int, NULL, S_IRUGO); 97 + module_param_array(clk, int, NULL, 0444); 98 98 MODULE_PARM_DESC(clk, "External oscillator clock frequency " 99 99 "(default=16000000 [16 MHz])"); 100 100 101 - module_param_array(cir, byte, NULL, S_IRUGO); 101 + module_param_array(cir, byte, NULL, 0444); 102 102 MODULE_PARM_DESC(cir, "CPU interface register (default=0x40 [DSC])"); 103 103 104 - module_param_array(cor, byte, NULL, S_IRUGO); 104 + module_param_array(cor, byte, NULL, 0444); 105 105 MODULE_PARM_DESC(cor, "Clockout register (default=0x00)"); 106 106 107 - module_param_array(bcr, byte, NULL, S_IRUGO); 107 + module_param_array(bcr, byte, NULL, 0444); 108 108 MODULE_PARM_DESC(bcr, "Bus configuration register (default=0x40 [CBY])"); 109 109 110 110 #define CC770_IOSIZE 0x20
+2 -2
drivers/net/can/grcan.c
··· 1484 1484 } \ 1485 1485 } \ 1486 1486 module_param_named(name, grcan_module_config.name, \ 1487 - mtype, S_IRUGO); \ 1487 + mtype, 0444); \ 1488 1488 MODULE_PARM_DESC(name, desc) 1489 1489 1490 1490 #define GRCAN_CONFIG_ATTR(name, desc) \ ··· 1513 1513 struct grcan_priv *priv = netdev_priv(dev); \ 1514 1514 return sprintf(buf, "%d\n", priv->config.name); \ 1515 1515 } \ 1516 - static DEVICE_ATTR(name, S_IRUGO | S_IWUSR, \ 1516 + static DEVICE_ATTR(name, 0644, \ 1517 1517 grcan_show_##name, \ 1518 1518 grcan_store_##name); \ 1519 1519 GRCAN_MODULE_PARAM(name, ushort, GRCAN_NOT_BOOL, desc)
+3 -3
drivers/net/can/janz-ican3.c
··· 1865 1865 return scnprintf(buf, PAGE_SIZE, "%s\n", mod->fwinfo); 1866 1866 } 1867 1867 1868 - static DEVICE_ATTR(termination, S_IWUSR | S_IRUGO, ican3_sysfs_show_term, 1869 - ican3_sysfs_set_term); 1870 - static DEVICE_ATTR(fwinfo, S_IRUSR | S_IRUGO, ican3_sysfs_show_fwinfo, NULL); 1868 + static DEVICE_ATTR(termination, 0644, ican3_sysfs_show_term, 1869 + ican3_sysfs_set_term); 1870 + static DEVICE_ATTR(fwinfo, 0444, ican3_sysfs_show_fwinfo, NULL); 1871 1871 1872 1872 static struct attribute *ican3_sysfs_attrs[] = { 1873 1873 &dev_attr_termination.attr,
+7 -7
drivers/net/can/sja1000/sja1000_isa.c
··· 48 48 static int indirect[MAXDEV] = {[0 ... (MAXDEV - 1)] = -1}; 49 49 static spinlock_t indirect_lock[MAXDEV]; /* lock for indirect access mode */ 50 50 51 - module_param_hw_array(port, ulong, ioport, NULL, S_IRUGO); 51 + module_param_hw_array(port, ulong, ioport, NULL, 0444); 52 52 MODULE_PARM_DESC(port, "I/O port number"); 53 53 54 - module_param_hw_array(mem, ulong, iomem, NULL, S_IRUGO); 54 + module_param_hw_array(mem, ulong, iomem, NULL, 0444); 55 55 MODULE_PARM_DESC(mem, "I/O memory address"); 56 56 57 - module_param_hw_array(indirect, int, ioport, NULL, S_IRUGO); 57 + module_param_hw_array(indirect, int, ioport, NULL, 0444); 58 58 MODULE_PARM_DESC(indirect, "Indirect access via address and data port"); 59 59 60 - module_param_hw_array(irq, int, irq, NULL, S_IRUGO); 60 + module_param_hw_array(irq, int, irq, NULL, 0444); 61 61 MODULE_PARM_DESC(irq, "IRQ number"); 62 62 63 - module_param_array(clk, int, NULL, S_IRUGO); 63 + module_param_array(clk, int, NULL, 0444); 64 64 MODULE_PARM_DESC(clk, "External oscillator clock frequency " 65 65 "(default=16000000 [16 MHz])"); 66 66 67 - module_param_array(cdr, byte, NULL, S_IRUGO); 67 + module_param_array(cdr, byte, NULL, 0444); 68 68 MODULE_PARM_DESC(cdr, "Clock divider register " 69 69 "(default=0x48 [CDR_CBP | CDR_CLK_OFF])"); 70 70 71 - module_param_array(ocr, byte, NULL, S_IRUGO); 71 + module_param_array(ocr, byte, NULL, 0444); 72 72 MODULE_PARM_DESC(ocr, "Output control register " 73 73 "(default=0x18 [OCR_TX0_PUSHPULL])"); 74 74
+2 -2
drivers/net/can/softing/softing_main.c
··· 601 601 return count; 602 602 } 603 603 604 - static const DEVICE_ATTR(chip, S_IRUGO, show_chip, NULL); 605 - static const DEVICE_ATTR(output, S_IRUGO | S_IWUSR, show_output, store_output); 604 + static const DEVICE_ATTR(chip, 0444, show_chip, NULL); 605 + static const DEVICE_ATTR(output, 0644, show_output, store_output); 606 606 607 607 static const struct attribute *const netdev_sysfs_attrs[] = { 608 608 &dev_attr_chip.attr,
+1 -1
drivers/net/can/spi/mcp251x.c
··· 220 220 #define DEVICE_NAME "mcp251x" 221 221 222 222 static int mcp251x_enable_dma; /* Enable SPI DMA. Default: 0 (Off) */ 223 - module_param(mcp251x_enable_dma, int, S_IRUGO); 223 + module_param(mcp251x_enable_dma, int, 0444); 224 224 MODULE_PARM_DESC(mcp251x_enable_dma, "Enable SPI DMA. Default: 0 (Off)"); 225 225 226 226 static const struct can_bittiming_const mcp251x_bittiming_const = {
+3 -3
drivers/net/can/usb/esd_usb2.c
··· 496 496 (dev->version >> 8) & 0xf, 497 497 dev->version & 0xff); 498 498 } 499 - static DEVICE_ATTR(firmware, S_IRUGO, show_firmware, NULL); 499 + static DEVICE_ATTR(firmware, 0444, show_firmware, NULL); 500 500 501 501 static ssize_t show_hardware(struct device *d, 502 502 struct device_attribute *attr, char *buf) ··· 509 509 (dev->version >> 24) & 0xf, 510 510 (dev->version >> 16) & 0xff); 511 511 } 512 - static DEVICE_ATTR(hardware, S_IRUGO, show_hardware, NULL); 512 + static DEVICE_ATTR(hardware, 0444, show_hardware, NULL); 513 513 514 514 static ssize_t show_nets(struct device *d, 515 515 struct device_attribute *attr, char *buf) ··· 519 519 520 520 return sprintf(buf, "%d", dev->net_count); 521 521 } 522 - static DEVICE_ATTR(nets, S_IRUGO, show_nets, NULL); 522 + static DEVICE_ATTR(nets, 0444, show_nets, NULL); 523 523 524 524 static int esd_usb2_send_msg(struct esd_usb2 *dev, struct esd_usb2_msg *msg) 525 525 {
+1 -1
drivers/net/can/vcan.c
··· 65 65 */ 66 66 67 67 static bool echo; /* echo testing. Default: 0 (Off) */ 68 - module_param(echo, bool, S_IRUGO); 68 + module_param(echo, bool, 0444); 69 69 MODULE_PARM_DESC(echo, "Echo sent frames (for testing). Default: 0 (Off)"); 70 70 71 71
+1 -2
drivers/net/hamradio/bpqether.c
··· 590 590 static int __init bpq_init_driver(void) 591 591 { 592 592 #ifdef CONFIG_PROC_FS 593 - if (!proc_create("bpqether", S_IRUGO, init_net.proc_net, 594 - &bpq_info_fops)) { 593 + if (!proc_create("bpqether", 0444, init_net.proc_net, &bpq_info_fops)) { 595 594 printk(KERN_ERR 596 595 "bpq: cannot create /proc/net/bpqether entry.\n"); 597 596 return -ENOENT;
+1 -1
drivers/net/hamradio/yam.c
··· 1168 1168 yam_timer.expires = jiffies + HZ / 100; 1169 1169 add_timer(&yam_timer); 1170 1170 1171 - proc_create("yam", S_IRUGO, init_net.proc_net, &yam_info_fops); 1171 + proc_create("yam", 0444, init_net.proc_net, &yam_info_fops); 1172 1172 return 0; 1173 1173 error: 1174 1174 while (--i >= 0) {
+2 -2
drivers/net/hyperv/netvsc_drv.c
··· 55 55 #define VF_TAKEOVER_INT (HZ / 10) 56 56 57 57 static unsigned int ring_size __ro_after_init = 128; 58 - module_param(ring_size, uint, S_IRUGO); 58 + module_param(ring_size, uint, 0444); 59 59 MODULE_PARM_DESC(ring_size, "Ring buffer size (# of pages)"); 60 60 unsigned int netvsc_ring_bytes __ro_after_init; 61 61 struct reciprocal_value netvsc_ring_reciprocal __ro_after_init; ··· 66 66 NETIF_MSG_TX_ERR; 67 67 68 68 static int debug = -1; 69 - module_param(debug, int, S_IRUGO); 69 + module_param(debug, int, 0444); 70 70 MODULE_PARM_DESC(debug, "Debug level (0=none,...,16=all)"); 71 71 72 72 static void netvsc_change_rx_flags(struct net_device *net, int change)
+1 -1
drivers/net/ieee802154/at86rf230.c
··· 1661 1661 if (!at86rf230_debugfs_root) 1662 1662 return -ENOMEM; 1663 1663 1664 - stats = debugfs_create_file("trac_stats", S_IRUGO, 1664 + stats = debugfs_create_file("trac_stats", 0444, 1665 1665 at86rf230_debugfs_root, lp, 1666 1666 &at86rf230_stats_fops); 1667 1667 if (!stats)
+1 -1
drivers/net/phy/spi_ks8995.c
··· 417 417 static const struct bin_attribute ks8995_registers_attr = { 418 418 .attr = { 419 419 .name = "registers", 420 - .mode = S_IRUSR | S_IWUSR, 420 + .mode = 0600, 421 421 }, 422 422 .size = KS8995_REGS_SIZE, 423 423 .read = ks8995_registers_read,
+1 -1
drivers/net/ppp/ppp_generic.c
··· 1687 1687 1688 1688 #ifdef CONFIG_PPP_MULTILINK 1689 1689 static bool mp_protocol_compress __read_mostly = true; 1690 - module_param(mp_protocol_compress, bool, S_IRUGO | S_IWUSR); 1690 + module_param(mp_protocol_compress, bool, 0644); 1691 1691 MODULE_PARM_DESC(mp_protocol_compress, 1692 1692 "compress protocol id in multilink fragments"); 1693 1693
+1 -1
drivers/net/ppp/pppoe.c
··· 1142 1142 1143 1143 rwlock_init(&pn->hash_lock); 1144 1144 1145 - pde = proc_create("pppoe", S_IRUGO, net->proc_net, &pppoe_seq_fops); 1145 + pde = proc_create("pppoe", 0444, net->proc_net, &pppoe_seq_fops); 1146 1146 #ifdef CONFIG_PROC_FS 1147 1147 if (!pde) 1148 1148 return -ENOMEM;
+6 -6
drivers/net/usb/cdc_ncm.c
··· 58 58 #else 59 59 static bool prefer_mbim; 60 60 #endif 61 - module_param(prefer_mbim, bool, S_IRUGO | S_IWUSR); 61 + module_param(prefer_mbim, bool, 0644); 62 62 MODULE_PARM_DESC(prefer_mbim, "Prefer MBIM setting on dual NCM/MBIM functions"); 63 63 64 64 static void cdc_ncm_txpath_bh(unsigned long param); ··· 281 281 return len; 282 282 } 283 283 284 - static DEVICE_ATTR(min_tx_pkt, S_IRUGO | S_IWUSR, cdc_ncm_show_min_tx_pkt, cdc_ncm_store_min_tx_pkt); 285 - static DEVICE_ATTR(rx_max, S_IRUGO | S_IWUSR, cdc_ncm_show_rx_max, cdc_ncm_store_rx_max); 286 - static DEVICE_ATTR(tx_max, S_IRUGO | S_IWUSR, cdc_ncm_show_tx_max, cdc_ncm_store_tx_max); 287 - static DEVICE_ATTR(tx_timer_usecs, S_IRUGO | S_IWUSR, cdc_ncm_show_tx_timer_usecs, cdc_ncm_store_tx_timer_usecs); 284 + static DEVICE_ATTR(min_tx_pkt, 0644, cdc_ncm_show_min_tx_pkt, cdc_ncm_store_min_tx_pkt); 285 + static DEVICE_ATTR(rx_max, 0644, cdc_ncm_show_rx_max, cdc_ncm_store_rx_max); 286 + static DEVICE_ATTR(tx_max, 0644, cdc_ncm_show_tx_max, cdc_ncm_store_tx_max); 287 + static DEVICE_ATTR(tx_timer_usecs, 0644, cdc_ncm_show_tx_timer_usecs, cdc_ncm_store_tx_timer_usecs); 288 288 289 289 static ssize_t ndp_to_end_show(struct device *d, struct device_attribute *attr, char *buf) 290 290 { ··· 335 335 struct cdc_ncm_ctx *ctx = (struct cdc_ncm_ctx *)dev->data[0]; \ 336 336 return sprintf(buf, format "\n", tocpu(ctx->ncm_parm.name)); \ 337 337 } \ 338 - static DEVICE_ATTR(name, S_IRUGO, cdc_ncm_show_##name, NULL) 338 + static DEVICE_ATTR(name, 0444, cdc_ncm_show_##name, NULL) 339 339 340 340 NCM_PARM_ATTR(bmNtbFormatsSupported, "0x%04x", le16_to_cpu); 341 341 NCM_PARM_ATTR(dwNtbInMaxSize, "%u", le32_to_cpu);
+4 -4
drivers/net/usb/hso.c
··· 519 519 520 520 return sprintf(buf, "%s\n", port_name); 521 521 } 522 - static DEVICE_ATTR(hsotype, S_IRUGO, hso_sysfs_show_porttype, NULL); 522 + static DEVICE_ATTR(hsotype, 0444, hso_sysfs_show_porttype, NULL); 523 523 524 524 static struct attribute *hso_serial_dev_attrs[] = { 525 525 &dev_attr_hsotype.attr, ··· 3289 3289 3290 3290 /* change the debug level (eg: insmod hso.ko debug=0x04) */ 3291 3291 MODULE_PARM_DESC(debug, "debug level mask [0x01 | 0x02 | 0x04 | 0x08 | 0x10]"); 3292 - module_param(debug, int, S_IRUGO | S_IWUSR); 3292 + module_param(debug, int, 0644); 3293 3293 3294 3294 /* set the major tty number (eg: insmod hso.ko tty_major=245) */ 3295 3295 MODULE_PARM_DESC(tty_major, "Set the major tty number"); 3296 - module_param(tty_major, int, S_IRUGO | S_IWUSR); 3296 + module_param(tty_major, int, 0644); 3297 3297 3298 3298 /* disable network interface (eg: insmod hso.ko disable_net=1) */ 3299 3299 MODULE_PARM_DESC(disable_net, "Disable the network interface"); 3300 - module_param(disable_net, int, S_IRUGO | S_IWUSR); 3300 + module_param(disable_net, int, 0644);
+2 -2
drivers/net/xen-netback/xenbus.c
··· 224 224 225 225 snprintf(filename, sizeof(filename), "io_ring_q%d", i); 226 226 pfile = debugfs_create_file(filename, 227 - S_IRUSR | S_IWUSR, 227 + 0600, 228 228 vif->xenvif_dbg_root, 229 229 &vif->queues[i], 230 230 &xenvif_dbg_io_ring_ops_fops); ··· 235 235 236 236 if (vif->ctrl_irq) { 237 237 pfile = debugfs_create_file("ctrl", 238 - S_IRUSR, 238 + 0400, 239 239 vif->xenvif_dbg_root, 240 240 vif, 241 241 &xenvif_dbg_ctrl_ops_fops);
+3 -3
drivers/net/xen-netfront.c
··· 2113 2113 return len; 2114 2114 } 2115 2115 2116 - static DEVICE_ATTR(rxbuf_min, S_IRUGO|S_IWUSR, show_rxbuf, store_rxbuf); 2117 - static DEVICE_ATTR(rxbuf_max, S_IRUGO|S_IWUSR, show_rxbuf, store_rxbuf); 2118 - static DEVICE_ATTR(rxbuf_cur, S_IRUGO, show_rxbuf, NULL); 2116 + static DEVICE_ATTR(rxbuf_min, 0644, show_rxbuf, store_rxbuf); 2117 + static DEVICE_ATTR(rxbuf_max, 0644, show_rxbuf, store_rxbuf); 2118 + static DEVICE_ATTR(rxbuf_cur, 0444, show_rxbuf, NULL); 2119 2119 2120 2120 static struct attribute *xennet_dev_attrs[] = { 2121 2121 &dev_attr_rxbuf_min.attr,