aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2018-03-23 18:54:39 -0400
committerDavid S. Miller <davem@davemloft.net>2018-03-26 12:07:49 -0400
commitd61e40385655fbba659fc3d81df9bdf1b848e263 (patch)
tree434dfc436eae37889fa25c484c310ce05952269a /drivers/net/bonding
parentd6444062f8f07c346a21bd815af4a3dc8b231574 (diff)
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>
Diffstat (limited to 'drivers/net/bonding')
-rw-r--r--drivers/net/bonding/bond_procfs.c2
-rw-r--r--drivers/net/bonding/bond_sysfs.c73
-rw-r--r--drivers/net/bonding/bond_sysfs_slave.c4
3 files changed, 39 insertions, 40 deletions
diff --git a/drivers/net/bonding/bond_procfs.c b/drivers/net/bonding/bond_procfs.c
index f7799321dffb..01059f1a7bca 100644
--- a/drivers/net/bonding/bond_procfs.c
+++ b/drivers/net/bonding/bond_procfs.c
@@ -287,7 +287,7 @@ void bond_create_proc_entry(struct bonding *bond)
287 287
288 if (bn->proc_dir) { 288 if (bn->proc_dir) {
289 bond->proc_entry = proc_create_data(bond_dev->name, 289 bond->proc_entry = proc_create_data(bond_dev->name,
290 S_IRUGO, bn->proc_dir, 290 0444, bn->proc_dir,
291 &bond_info_fops, bond); 291 &bond_info_fops, bond);
292 if (bond->proc_entry == NULL) 292 if (bond->proc_entry == NULL)
293 netdev_warn(bond_dev, "Cannot create /proc/net/%s/%s\n", 293 netdev_warn(bond_dev, "Cannot create /proc/net/%s/%s\n",
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
index 040b493f60ae..6096440e96ea 100644
--- a/drivers/net/bonding/bond_sysfs.c
+++ b/drivers/net/bonding/bond_sysfs.c
@@ -147,7 +147,7 @@ err_no_cmd:
147static const struct class_attribute class_attr_bonding_masters = { 147static const struct class_attribute class_attr_bonding_masters = {
148 .attr = { 148 .attr = {
149 .name = "bonding_masters", 149 .name = "bonding_masters",
150 .mode = S_IWUSR | S_IRUGO, 150 .mode = 0644,
151 }, 151 },
152 .show = bonding_show_bonds, 152 .show = bonding_show_bonds,
153 .store = bonding_store_bonds, 153 .store = bonding_store_bonds,
@@ -202,7 +202,7 @@ static ssize_t bonding_show_slaves(struct device *d,
202 202
203 return res; 203 return res;
204} 204}
205static DEVICE_ATTR(slaves, S_IRUGO | S_IWUSR, bonding_show_slaves, 205static DEVICE_ATTR(slaves, 0644, bonding_show_slaves,
206 bonding_sysfs_store_option); 206 bonding_sysfs_store_option);
207 207
208/* Show the bonding mode. */ 208/* Show the bonding mode. */
@@ -216,8 +216,7 @@ static ssize_t bonding_show_mode(struct device *d,
216 216
217 return sprintf(buf, "%s %d\n", val->string, BOND_MODE(bond)); 217 return sprintf(buf, "%s %d\n", val->string, BOND_MODE(bond));
218} 218}
219static DEVICE_ATTR(mode, S_IRUGO | S_IWUSR, 219static DEVICE_ATTR(mode, 0644, bonding_show_mode, bonding_sysfs_store_option);
220 bonding_show_mode, bonding_sysfs_store_option);
221 220
222/* Show the bonding transmit hash method. */ 221/* Show the bonding transmit hash method. */
223static ssize_t bonding_show_xmit_hash(struct device *d, 222static ssize_t bonding_show_xmit_hash(struct device *d,
@@ -231,7 +230,7 @@ static ssize_t bonding_show_xmit_hash(struct device *d,
231 230
232 return sprintf(buf, "%s %d\n", val->string, bond->params.xmit_policy); 231 return sprintf(buf, "%s %d\n", val->string, bond->params.xmit_policy);
233} 232}
234static DEVICE_ATTR(xmit_hash_policy, S_IRUGO | S_IWUSR, 233static DEVICE_ATTR(xmit_hash_policy, 0644,
235 bonding_show_xmit_hash, bonding_sysfs_store_option); 234 bonding_show_xmit_hash, bonding_sysfs_store_option);
236 235
237/* Show arp_validate. */ 236/* Show arp_validate. */
@@ -247,7 +246,7 @@ static ssize_t bonding_show_arp_validate(struct device *d,
247 246
248 return sprintf(buf, "%s %d\n", val->string, bond->params.arp_validate); 247 return sprintf(buf, "%s %d\n", val->string, bond->params.arp_validate);
249} 248}
250static DEVICE_ATTR(arp_validate, S_IRUGO | S_IWUSR, bonding_show_arp_validate, 249static DEVICE_ATTR(arp_validate, 0644, bonding_show_arp_validate,
251 bonding_sysfs_store_option); 250 bonding_sysfs_store_option);
252 251
253/* Show arp_all_targets. */ 252/* Show arp_all_targets. */
@@ -263,7 +262,7 @@ static ssize_t bonding_show_arp_all_targets(struct device *d,
263 return sprintf(buf, "%s %d\n", 262 return sprintf(buf, "%s %d\n",
264 val->string, bond->params.arp_all_targets); 263 val->string, bond->params.arp_all_targets);
265} 264}
266static DEVICE_ATTR(arp_all_targets, S_IRUGO | S_IWUSR, 265static DEVICE_ATTR(arp_all_targets, 0644,
267 bonding_show_arp_all_targets, bonding_sysfs_store_option); 266 bonding_show_arp_all_targets, bonding_sysfs_store_option);
268 267
269/* Show fail_over_mac. */ 268/* Show fail_over_mac. */
@@ -279,7 +278,7 @@ static ssize_t bonding_show_fail_over_mac(struct device *d,
279 278
280 return sprintf(buf, "%s %d\n", val->string, bond->params.fail_over_mac); 279 return sprintf(buf, "%s %d\n", val->string, bond->params.fail_over_mac);
281} 280}
282static DEVICE_ATTR(fail_over_mac, S_IRUGO | S_IWUSR, 281static DEVICE_ATTR(fail_over_mac, 0644,
283 bonding_show_fail_over_mac, bonding_sysfs_store_option); 282 bonding_show_fail_over_mac, bonding_sysfs_store_option);
284 283
285/* Show the arp timer interval. */ 284/* Show the arp timer interval. */
@@ -291,7 +290,7 @@ static ssize_t bonding_show_arp_interval(struct device *d,
291 290
292 return sprintf(buf, "%d\n", bond->params.arp_interval); 291 return sprintf(buf, "%d\n", bond->params.arp_interval);
293} 292}
294static DEVICE_ATTR(arp_interval, S_IRUGO | S_IWUSR, 293static DEVICE_ATTR(arp_interval, 0644,
295 bonding_show_arp_interval, bonding_sysfs_store_option); 294 bonding_show_arp_interval, bonding_sysfs_store_option);
296 295
297/* Show the arp targets. */ 296/* Show the arp targets. */
@@ -312,7 +311,7 @@ static ssize_t bonding_show_arp_targets(struct device *d,
312 311
313 return res; 312 return res;
314} 313}
315static DEVICE_ATTR(arp_ip_target, S_IRUGO | S_IWUSR, 314static DEVICE_ATTR(arp_ip_target, 0644,
316 bonding_show_arp_targets, bonding_sysfs_store_option); 315 bonding_show_arp_targets, bonding_sysfs_store_option);
317 316
318/* Show the up and down delays. */ 317/* Show the up and down delays. */
@@ -324,7 +323,7 @@ static ssize_t bonding_show_downdelay(struct device *d,
324 323
325 return sprintf(buf, "%d\n", bond->params.downdelay * bond->params.miimon); 324 return sprintf(buf, "%d\n", bond->params.downdelay * bond->params.miimon);
326} 325}
327static DEVICE_ATTR(downdelay, S_IRUGO | S_IWUSR, 326static DEVICE_ATTR(downdelay, 0644,
328 bonding_show_downdelay, bonding_sysfs_store_option); 327 bonding_show_downdelay, bonding_sysfs_store_option);
329 328
330static ssize_t bonding_show_updelay(struct device *d, 329static ssize_t bonding_show_updelay(struct device *d,
@@ -336,7 +335,7 @@ static ssize_t bonding_show_updelay(struct device *d,
336 return sprintf(buf, "%d\n", bond->params.updelay * bond->params.miimon); 335 return sprintf(buf, "%d\n", bond->params.updelay * bond->params.miimon);
337 336
338} 337}
339static DEVICE_ATTR(updelay, S_IRUGO | S_IWUSR, 338static DEVICE_ATTR(updelay, 0644,
340 bonding_show_updelay, bonding_sysfs_store_option); 339 bonding_show_updelay, bonding_sysfs_store_option);
341 340
342/* Show the LACP interval. */ 341/* Show the LACP interval. */
@@ -351,7 +350,7 @@ static ssize_t bonding_show_lacp(struct device *d,
351 350
352 return sprintf(buf, "%s %d\n", val->string, bond->params.lacp_fast); 351 return sprintf(buf, "%s %d\n", val->string, bond->params.lacp_fast);
353} 352}
354static DEVICE_ATTR(lacp_rate, S_IRUGO | S_IWUSR, 353static DEVICE_ATTR(lacp_rate, 0644,
355 bonding_show_lacp, bonding_sysfs_store_option); 354 bonding_show_lacp, bonding_sysfs_store_option);
356 355
357static ssize_t bonding_show_min_links(struct device *d, 356static ssize_t bonding_show_min_links(struct device *d,
@@ -362,7 +361,7 @@ static ssize_t bonding_show_min_links(struct device *d,
362 361
363 return sprintf(buf, "%u\n", bond->params.min_links); 362 return sprintf(buf, "%u\n", bond->params.min_links);
364} 363}
365static DEVICE_ATTR(min_links, S_IRUGO | S_IWUSR, 364static DEVICE_ATTR(min_links, 0644,
366 bonding_show_min_links, bonding_sysfs_store_option); 365 bonding_show_min_links, bonding_sysfs_store_option);
367 366
368static ssize_t bonding_show_ad_select(struct device *d, 367static ssize_t bonding_show_ad_select(struct device *d,
@@ -376,7 +375,7 @@ static ssize_t bonding_show_ad_select(struct device *d,
376 375
377 return sprintf(buf, "%s %d\n", val->string, bond->params.ad_select); 376 return sprintf(buf, "%s %d\n", val->string, bond->params.ad_select);
378} 377}
379static DEVICE_ATTR(ad_select, S_IRUGO | S_IWUSR, 378static DEVICE_ATTR(ad_select, 0644,
380 bonding_show_ad_select, bonding_sysfs_store_option); 379 bonding_show_ad_select, bonding_sysfs_store_option);
381 380
382/* Show the number of peer notifications to send after a failover event. */ 381/* Show the number of peer notifications to send after a failover event. */
@@ -387,9 +386,9 @@ static ssize_t bonding_show_num_peer_notif(struct device *d,
387 struct bonding *bond = to_bond(d); 386 struct bonding *bond = to_bond(d);
388 return sprintf(buf, "%d\n", bond->params.num_peer_notif); 387 return sprintf(buf, "%d\n", bond->params.num_peer_notif);
389} 388}
390static DEVICE_ATTR(num_grat_arp, S_IRUGO | S_IWUSR, 389static DEVICE_ATTR(num_grat_arp, 0644,
391 bonding_show_num_peer_notif, bonding_sysfs_store_option); 390 bonding_show_num_peer_notif, bonding_sysfs_store_option);
392static DEVICE_ATTR(num_unsol_na, S_IRUGO | S_IWUSR, 391static DEVICE_ATTR(num_unsol_na, 0644,
393 bonding_show_num_peer_notif, bonding_sysfs_store_option); 392 bonding_show_num_peer_notif, bonding_sysfs_store_option);
394 393
395/* Show the MII monitor interval. */ 394/* Show the MII monitor interval. */
@@ -401,7 +400,7 @@ static ssize_t bonding_show_miimon(struct device *d,
401 400
402 return sprintf(buf, "%d\n", bond->params.miimon); 401 return sprintf(buf, "%d\n", bond->params.miimon);
403} 402}
404static DEVICE_ATTR(miimon, S_IRUGO | S_IWUSR, 403static DEVICE_ATTR(miimon, 0644,
405 bonding_show_miimon, bonding_sysfs_store_option); 404 bonding_show_miimon, bonding_sysfs_store_option);
406 405
407/* Show the primary slave. */ 406/* Show the primary slave. */
@@ -421,7 +420,7 @@ static ssize_t bonding_show_primary(struct device *d,
421 420
422 return count; 421 return count;
423} 422}
424static DEVICE_ATTR(primary, S_IRUGO | S_IWUSR, 423static DEVICE_ATTR(primary, 0644,
425 bonding_show_primary, bonding_sysfs_store_option); 424 bonding_show_primary, bonding_sysfs_store_option);
426 425
427/* Show the primary_reselect flag. */ 426/* Show the primary_reselect flag. */
@@ -438,7 +437,7 @@ static ssize_t bonding_show_primary_reselect(struct device *d,
438 return sprintf(buf, "%s %d\n", 437 return sprintf(buf, "%s %d\n",
439 val->string, bond->params.primary_reselect); 438 val->string, bond->params.primary_reselect);
440} 439}
441static DEVICE_ATTR(primary_reselect, S_IRUGO | S_IWUSR, 440static DEVICE_ATTR(primary_reselect, 0644,
442 bonding_show_primary_reselect, bonding_sysfs_store_option); 441 bonding_show_primary_reselect, bonding_sysfs_store_option);
443 442
444/* Show the use_carrier flag. */ 443/* Show the use_carrier flag. */
@@ -450,7 +449,7 @@ static ssize_t bonding_show_carrier(struct device *d,
450 449
451 return sprintf(buf, "%d\n", bond->params.use_carrier); 450 return sprintf(buf, "%d\n", bond->params.use_carrier);
452} 451}
453static DEVICE_ATTR(use_carrier, S_IRUGO | S_IWUSR, 452static DEVICE_ATTR(use_carrier, 0644,
454 bonding_show_carrier, bonding_sysfs_store_option); 453 bonding_show_carrier, bonding_sysfs_store_option);
455 454
456 455
@@ -471,7 +470,7 @@ static ssize_t bonding_show_active_slave(struct device *d,
471 470
472 return count; 471 return count;
473} 472}
474static DEVICE_ATTR(active_slave, S_IRUGO | S_IWUSR, 473static DEVICE_ATTR(active_slave, 0644,
475 bonding_show_active_slave, bonding_sysfs_store_option); 474 bonding_show_active_slave, bonding_sysfs_store_option);
476 475
477/* Show link status of the bond interface. */ 476/* Show link status of the bond interface. */
@@ -484,7 +483,7 @@ static ssize_t bonding_show_mii_status(struct device *d,
484 483
485 return sprintf(buf, "%s\n", active ? "up" : "down"); 484 return sprintf(buf, "%s\n", active ? "up" : "down");
486} 485}
487static DEVICE_ATTR(mii_status, S_IRUGO, bonding_show_mii_status, NULL); 486static DEVICE_ATTR(mii_status, 0444, bonding_show_mii_status, NULL);
488 487
489/* Show current 802.3ad aggregator ID. */ 488/* Show current 802.3ad aggregator ID. */
490static ssize_t bonding_show_ad_aggregator(struct device *d, 489static ssize_t bonding_show_ad_aggregator(struct device *d,
@@ -503,7 +502,7 @@ static ssize_t bonding_show_ad_aggregator(struct device *d,
503 502
504 return count; 503 return count;
505} 504}
506static DEVICE_ATTR(ad_aggregator, S_IRUGO, bonding_show_ad_aggregator, NULL); 505static DEVICE_ATTR(ad_aggregator, 0444, bonding_show_ad_aggregator, NULL);
507 506
508 507
509/* Show number of active 802.3ad ports. */ 508/* Show number of active 802.3ad ports. */
@@ -523,7 +522,7 @@ static ssize_t bonding_show_ad_num_ports(struct device *d,
523 522
524 return count; 523 return count;
525} 524}
526static DEVICE_ATTR(ad_num_ports, S_IRUGO, bonding_show_ad_num_ports, NULL); 525static DEVICE_ATTR(ad_num_ports, 0444, bonding_show_ad_num_ports, NULL);
527 526
528 527
529/* Show current 802.3ad actor key. */ 528/* Show current 802.3ad actor key. */
@@ -543,7 +542,7 @@ static ssize_t bonding_show_ad_actor_key(struct device *d,
543 542
544 return count; 543 return count;
545} 544}
546static DEVICE_ATTR(ad_actor_key, S_IRUGO, bonding_show_ad_actor_key, NULL); 545static DEVICE_ATTR(ad_actor_key, 0444, bonding_show_ad_actor_key, NULL);
547 546
548 547
549/* Show current 802.3ad partner key. */ 548/* Show current 802.3ad partner key. */
@@ -563,7 +562,7 @@ static ssize_t bonding_show_ad_partner_key(struct device *d,
563 562
564 return count; 563 return count;
565} 564}
566static DEVICE_ATTR(ad_partner_key, S_IRUGO, bonding_show_ad_partner_key, NULL); 565static DEVICE_ATTR(ad_partner_key, 0444, bonding_show_ad_partner_key, NULL);
567 566
568 567
569/* Show current 802.3ad partner mac. */ 568/* Show current 802.3ad partner mac. */
@@ -582,7 +581,7 @@ static ssize_t bonding_show_ad_partner_mac(struct device *d,
582 581
583 return count; 582 return count;
584} 583}
585static DEVICE_ATTR(ad_partner_mac, S_IRUGO, bonding_show_ad_partner_mac, NULL); 584static DEVICE_ATTR(ad_partner_mac, 0444, bonding_show_ad_partner_mac, NULL);
586 585
587/* Show the queue_ids of the slaves in the current bond. */ 586/* Show the queue_ids of the slaves in the current bond. */
588static ssize_t bonding_show_queue_id(struct device *d, 587static ssize_t bonding_show_queue_id(struct device *d,
@@ -615,7 +614,7 @@ static ssize_t bonding_show_queue_id(struct device *d,
615 614
616 return res; 615 return res;
617} 616}
618static DEVICE_ATTR(queue_id, S_IRUGO | S_IWUSR, bonding_show_queue_id, 617static DEVICE_ATTR(queue_id, 0644, bonding_show_queue_id,
619 bonding_sysfs_store_option); 618 bonding_sysfs_store_option);
620 619
621 620
@@ -628,7 +627,7 @@ static ssize_t bonding_show_slaves_active(struct device *d,
628 627
629 return sprintf(buf, "%d\n", bond->params.all_slaves_active); 628 return sprintf(buf, "%d\n", bond->params.all_slaves_active);
630} 629}
631static DEVICE_ATTR(all_slaves_active, S_IRUGO | S_IWUSR, 630static DEVICE_ATTR(all_slaves_active, 0644,
632 bonding_show_slaves_active, bonding_sysfs_store_option); 631 bonding_show_slaves_active, bonding_sysfs_store_option);
633 632
634/* Show the number of IGMP membership reports to send on link failure */ 633/* Show the number of IGMP membership reports to send on link failure */
@@ -640,7 +639,7 @@ static ssize_t bonding_show_resend_igmp(struct device *d,
640 639
641 return sprintf(buf, "%d\n", bond->params.resend_igmp); 640 return sprintf(buf, "%d\n", bond->params.resend_igmp);
642} 641}
643static DEVICE_ATTR(resend_igmp, S_IRUGO | S_IWUSR, 642static DEVICE_ATTR(resend_igmp, 0644,
644 bonding_show_resend_igmp, bonding_sysfs_store_option); 643 bonding_show_resend_igmp, bonding_sysfs_store_option);
645 644
646 645
@@ -652,7 +651,7 @@ static ssize_t bonding_show_lp_interval(struct device *d,
652 651
653 return sprintf(buf, "%d\n", bond->params.lp_interval); 652 return sprintf(buf, "%d\n", bond->params.lp_interval);
654} 653}
655static DEVICE_ATTR(lp_interval, S_IRUGO | S_IWUSR, 654static DEVICE_ATTR(lp_interval, 0644,
656 bonding_show_lp_interval, bonding_sysfs_store_option); 655 bonding_show_lp_interval, bonding_sysfs_store_option);
657 656
658static ssize_t bonding_show_tlb_dynamic_lb(struct device *d, 657static ssize_t bonding_show_tlb_dynamic_lb(struct device *d,
@@ -662,7 +661,7 @@ static ssize_t bonding_show_tlb_dynamic_lb(struct device *d,
662 struct bonding *bond = to_bond(d); 661 struct bonding *bond = to_bond(d);
663 return sprintf(buf, "%d\n", bond->params.tlb_dynamic_lb); 662 return sprintf(buf, "%d\n", bond->params.tlb_dynamic_lb);
664} 663}
665static DEVICE_ATTR(tlb_dynamic_lb, S_IRUGO | S_IWUSR, 664static DEVICE_ATTR(tlb_dynamic_lb, 0644,
666 bonding_show_tlb_dynamic_lb, bonding_sysfs_store_option); 665 bonding_show_tlb_dynamic_lb, bonding_sysfs_store_option);
667 666
668static ssize_t bonding_show_packets_per_slave(struct device *d, 667static ssize_t bonding_show_packets_per_slave(struct device *d,
@@ -674,7 +673,7 @@ static ssize_t bonding_show_packets_per_slave(struct device *d,
674 673
675 return sprintf(buf, "%u\n", packets_per_slave); 674 return sprintf(buf, "%u\n", packets_per_slave);
676} 675}
677static DEVICE_ATTR(packets_per_slave, S_IRUGO | S_IWUSR, 676static DEVICE_ATTR(packets_per_slave, 0644,
678 bonding_show_packets_per_slave, bonding_sysfs_store_option); 677 bonding_show_packets_per_slave, bonding_sysfs_store_option);
679 678
680static ssize_t bonding_show_ad_actor_sys_prio(struct device *d, 679static ssize_t bonding_show_ad_actor_sys_prio(struct device *d,
@@ -688,7 +687,7 @@ static ssize_t bonding_show_ad_actor_sys_prio(struct device *d,
688 687
689 return 0; 688 return 0;
690} 689}
691static DEVICE_ATTR(ad_actor_sys_prio, S_IRUGO | S_IWUSR, 690static DEVICE_ATTR(ad_actor_sys_prio, 0644,
692 bonding_show_ad_actor_sys_prio, bonding_sysfs_store_option); 691 bonding_show_ad_actor_sys_prio, bonding_sysfs_store_option);
693 692
694static ssize_t bonding_show_ad_actor_system(struct device *d, 693static ssize_t bonding_show_ad_actor_system(struct device *d,
@@ -703,7 +702,7 @@ static ssize_t bonding_show_ad_actor_system(struct device *d,
703 return 0; 702 return 0;
704} 703}
705 704
706static DEVICE_ATTR(ad_actor_system, S_IRUGO | S_IWUSR, 705static DEVICE_ATTR(ad_actor_system, 0644,
707 bonding_show_ad_actor_system, bonding_sysfs_store_option); 706 bonding_show_ad_actor_system, bonding_sysfs_store_option);
708 707
709static ssize_t bonding_show_ad_user_port_key(struct device *d, 708static ssize_t bonding_show_ad_user_port_key(struct device *d,
@@ -717,7 +716,7 @@ static ssize_t bonding_show_ad_user_port_key(struct device *d,
717 716
718 return 0; 717 return 0;
719} 718}
720static DEVICE_ATTR(ad_user_port_key, S_IRUGO | S_IWUSR, 719static DEVICE_ATTR(ad_user_port_key, 0644,
721 bonding_show_ad_user_port_key, bonding_sysfs_store_option); 720 bonding_show_ad_user_port_key, bonding_sysfs_store_option);
722 721
723static struct attribute *per_bond_attrs[] = { 722static struct attribute *per_bond_attrs[] = {
diff --git a/drivers/net/bonding/bond_sysfs_slave.c b/drivers/net/bonding/bond_sysfs_slave.c
index 7d16c51e6913..2f120b2ffef0 100644
--- a/drivers/net/bonding/bond_sysfs_slave.c
+++ b/drivers/net/bonding/bond_sysfs_slave.c
@@ -25,8 +25,8 @@ const struct slave_attribute slave_attr_##_name = { \
25 .mode = _mode }, \ 25 .mode = _mode }, \
26 .show = _show, \ 26 .show = _show, \
27}; 27};
28#define SLAVE_ATTR_RO(_name) \ 28#define SLAVE_ATTR_RO(_name) \
29 SLAVE_ATTR(_name, S_IRUGO, _name##_show) 29 SLAVE_ATTR(_name, 0444, _name##_show)
30 30
31static ssize_t state_show(struct slave *slave, char *buf) 31static ssize_t state_show(struct slave *slave, char *buf)
32{ 32{