diff options
-rw-r--r-- | arch/mips/txx9/generic/7segled.c | 5 | ||||
-rw-r--r-- | arch/s390/kernel/smp.c | 8 | ||||
-rw-r--r-- | arch/s390/kernel/time.c | 49 | ||||
-rw-r--r-- | drivers/base/cpu.c | 9 | ||||
-rw-r--r-- | drivers/base/node.c | 17 | ||||
-rw-r--r-- | drivers/base/sys.c | 4 | ||||
-rw-r--r-- | drivers/cpuidle/sysfs.c | 4 | ||||
-rw-r--r-- | include/linux/sysdev.h | 6 | ||||
-rw-r--r-- | kernel/perf_event.c | 13 | ||||
-rw-r--r-- | kernel/sched.c | 4 |
10 files changed, 89 insertions, 30 deletions
diff --git a/arch/mips/txx9/generic/7segled.c b/arch/mips/txx9/generic/7segled.c index 727ab21b6618..7f8416f86222 100644 --- a/arch/mips/txx9/generic/7segled.c +++ b/arch/mips/txx9/generic/7segled.c | |||
@@ -58,13 +58,16 @@ static ssize_t raw_store(struct sys_device *dev, | |||
58 | static SYSDEV_ATTR(ascii, 0200, NULL, ascii_store); | 58 | static SYSDEV_ATTR(ascii, 0200, NULL, ascii_store); |
59 | static SYSDEV_ATTR(raw, 0200, NULL, raw_store); | 59 | static SYSDEV_ATTR(raw, 0200, NULL, raw_store); |
60 | 60 | ||
61 | static ssize_t map_seg7_show(struct sysdev_class *class, char *buf) | 61 | static ssize_t map_seg7_show(struct sysdev_class *class, |
62 | struct sysdev_class_attribute *attr, | ||
63 | char *buf) | ||
62 | { | 64 | { |
63 | memcpy(buf, &txx9_seg7map, sizeof(txx9_seg7map)); | 65 | memcpy(buf, &txx9_seg7map, sizeof(txx9_seg7map)); |
64 | return sizeof(txx9_seg7map); | 66 | return sizeof(txx9_seg7map); |
65 | } | 67 | } |
66 | 68 | ||
67 | static ssize_t map_seg7_store(struct sysdev_class *class, | 69 | static ssize_t map_seg7_store(struct sysdev_class *class, |
70 | struct sysdev_class_attribute *attr, | ||
68 | const char *buf, size_t size) | 71 | const char *buf, size_t size) |
69 | { | 72 | { |
70 | if (size != sizeof(txx9_seg7map)) | 73 | if (size != sizeof(txx9_seg7map)) |
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index 8b10127c00ad..e2121099f03b 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c | |||
@@ -1020,7 +1020,9 @@ out: | |||
1020 | return rc; | 1020 | return rc; |
1021 | } | 1021 | } |
1022 | 1022 | ||
1023 | static ssize_t __ref rescan_store(struct sysdev_class *class, const char *buf, | 1023 | static ssize_t __ref rescan_store(struct sysdev_class *class, |
1024 | struct sysdev_class_attribute *attr, | ||
1025 | const char *buf, | ||
1024 | size_t count) | 1026 | size_t count) |
1025 | { | 1027 | { |
1026 | int rc; | 1028 | int rc; |
@@ -1041,7 +1043,9 @@ static ssize_t dispatching_show(struct sysdev_class *class, char *buf) | |||
1041 | return count; | 1043 | return count; |
1042 | } | 1044 | } |
1043 | 1045 | ||
1044 | static ssize_t dispatching_store(struct sysdev_class *dev, const char *buf, | 1046 | static ssize_t dispatching_store(struct sysdev_class *dev, |
1047 | struct sysdev_class_attribute *attr, | ||
1048 | const char *buf, | ||
1045 | size_t count) | 1049 | size_t count) |
1046 | { | 1050 | { |
1047 | int val, rc; | 1051 | int val, rc; |
diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c index a8f93f1705ad..75894c281710 100644 --- a/arch/s390/kernel/time.c +++ b/arch/s390/kernel/time.c | |||
@@ -1116,14 +1116,18 @@ static struct sys_device etr_port1_dev = { | |||
1116 | /* | 1116 | /* |
1117 | * ETR class attributes | 1117 | * ETR class attributes |
1118 | */ | 1118 | */ |
1119 | static ssize_t etr_stepping_port_show(struct sysdev_class *class, char *buf) | 1119 | static ssize_t etr_stepping_port_show(struct sysdev_class *class, |
1120 | struct sysdev_class_attribute *attr, | ||
1121 | char *buf) | ||
1120 | { | 1122 | { |
1121 | return sprintf(buf, "%i\n", etr_port0.esw.p); | 1123 | return sprintf(buf, "%i\n", etr_port0.esw.p); |
1122 | } | 1124 | } |
1123 | 1125 | ||
1124 | static SYSDEV_CLASS_ATTR(stepping_port, 0400, etr_stepping_port_show, NULL); | 1126 | static SYSDEV_CLASS_ATTR(stepping_port, 0400, etr_stepping_port_show, NULL); |
1125 | 1127 | ||
1126 | static ssize_t etr_stepping_mode_show(struct sysdev_class *class, char *buf) | 1128 | static ssize_t etr_stepping_mode_show(struct sysdev_class *class, |
1129 | struct sysdev_class_attribute *attr, | ||
1130 | char *buf) | ||
1127 | { | 1131 | { |
1128 | char *mode_str; | 1132 | char *mode_str; |
1129 | 1133 | ||
@@ -1584,7 +1588,9 @@ static struct sysdev_class stp_sysclass = { | |||
1584 | .name = "stp", | 1588 | .name = "stp", |
1585 | }; | 1589 | }; |
1586 | 1590 | ||
1587 | static ssize_t stp_ctn_id_show(struct sysdev_class *class, char *buf) | 1591 | static ssize_t stp_ctn_id_show(struct sysdev_class *class, |
1592 | struct sysdev_class_attribute *attr, | ||
1593 | char *buf) | ||
1588 | { | 1594 | { |
1589 | if (!stp_online) | 1595 | if (!stp_online) |
1590 | return -ENODATA; | 1596 | return -ENODATA; |
@@ -1594,7 +1600,9 @@ static ssize_t stp_ctn_id_show(struct sysdev_class *class, char *buf) | |||
1594 | 1600 | ||
1595 | static SYSDEV_CLASS_ATTR(ctn_id, 0400, stp_ctn_id_show, NULL); | 1601 | static SYSDEV_CLASS_ATTR(ctn_id, 0400, stp_ctn_id_show, NULL); |
1596 | 1602 | ||
1597 | static ssize_t stp_ctn_type_show(struct sysdev_class *class, char *buf) | 1603 | static ssize_t stp_ctn_type_show(struct sysdev_class *class, |
1604 | struct sysdev_class_attribute *attr, | ||
1605 | char *buf) | ||
1598 | { | 1606 | { |
1599 | if (!stp_online) | 1607 | if (!stp_online) |
1600 | return -ENODATA; | 1608 | return -ENODATA; |
@@ -1603,7 +1611,9 @@ static ssize_t stp_ctn_type_show(struct sysdev_class *class, char *buf) | |||
1603 | 1611 | ||
1604 | static SYSDEV_CLASS_ATTR(ctn_type, 0400, stp_ctn_type_show, NULL); | 1612 | static SYSDEV_CLASS_ATTR(ctn_type, 0400, stp_ctn_type_show, NULL); |
1605 | 1613 | ||
1606 | static ssize_t stp_dst_offset_show(struct sysdev_class *class, char *buf) | 1614 | static ssize_t stp_dst_offset_show(struct sysdev_class *class, |
1615 | struct sysdev_class_attribute *attr, | ||
1616 | char *buf) | ||
1607 | { | 1617 | { |
1608 | if (!stp_online || !(stp_info.vbits & 0x2000)) | 1618 | if (!stp_online || !(stp_info.vbits & 0x2000)) |
1609 | return -ENODATA; | 1619 | return -ENODATA; |
@@ -1612,7 +1622,9 @@ static ssize_t stp_dst_offset_show(struct sysdev_class *class, char *buf) | |||
1612 | 1622 | ||
1613 | static SYSDEV_CLASS_ATTR(dst_offset, 0400, stp_dst_offset_show, NULL); | 1623 | static SYSDEV_CLASS_ATTR(dst_offset, 0400, stp_dst_offset_show, NULL); |
1614 | 1624 | ||
1615 | static ssize_t stp_leap_seconds_show(struct sysdev_class *class, char *buf) | 1625 | static ssize_t stp_leap_seconds_show(struct sysdev_class *class, |
1626 | struct sysdev_class_attribute *attr, | ||
1627 | char *buf) | ||
1616 | { | 1628 | { |
1617 | if (!stp_online || !(stp_info.vbits & 0x8000)) | 1629 | if (!stp_online || !(stp_info.vbits & 0x8000)) |
1618 | return -ENODATA; | 1630 | return -ENODATA; |
@@ -1621,7 +1633,9 @@ static ssize_t stp_leap_seconds_show(struct sysdev_class *class, char *buf) | |||
1621 | 1633 | ||
1622 | static SYSDEV_CLASS_ATTR(leap_seconds, 0400, stp_leap_seconds_show, NULL); | 1634 | static SYSDEV_CLASS_ATTR(leap_seconds, 0400, stp_leap_seconds_show, NULL); |
1623 | 1635 | ||
1624 | static ssize_t stp_stratum_show(struct sysdev_class *class, char *buf) | 1636 | static ssize_t stp_stratum_show(struct sysdev_class *class, |
1637 | struct sysdev_class_attribute *attr, | ||
1638 | char *buf) | ||
1625 | { | 1639 | { |
1626 | if (!stp_online) | 1640 | if (!stp_online) |
1627 | return -ENODATA; | 1641 | return -ENODATA; |
@@ -1630,7 +1644,9 @@ static ssize_t stp_stratum_show(struct sysdev_class *class, char *buf) | |||
1630 | 1644 | ||
1631 | static SYSDEV_CLASS_ATTR(stratum, 0400, stp_stratum_show, NULL); | 1645 | static SYSDEV_CLASS_ATTR(stratum, 0400, stp_stratum_show, NULL); |
1632 | 1646 | ||
1633 | static ssize_t stp_time_offset_show(struct sysdev_class *class, char *buf) | 1647 | static ssize_t stp_time_offset_show(struct sysdev_class *class, |
1648 | struct sysdev_class_attribute *attr, | ||
1649 | char *buf) | ||
1634 | { | 1650 | { |
1635 | if (!stp_online || !(stp_info.vbits & 0x0800)) | 1651 | if (!stp_online || !(stp_info.vbits & 0x0800)) |
1636 | return -ENODATA; | 1652 | return -ENODATA; |
@@ -1639,7 +1655,9 @@ static ssize_t stp_time_offset_show(struct sysdev_class *class, char *buf) | |||
1639 | 1655 | ||
1640 | static SYSDEV_CLASS_ATTR(time_offset, 0400, stp_time_offset_show, NULL); | 1656 | static SYSDEV_CLASS_ATTR(time_offset, 0400, stp_time_offset_show, NULL); |
1641 | 1657 | ||
1642 | static ssize_t stp_time_zone_offset_show(struct sysdev_class *class, char *buf) | 1658 | static ssize_t stp_time_zone_offset_show(struct sysdev_class *class, |
1659 | struct sysdev_class_attribute *attr, | ||
1660 | char *buf) | ||
1643 | { | 1661 | { |
1644 | if (!stp_online || !(stp_info.vbits & 0x4000)) | 1662 | if (!stp_online || !(stp_info.vbits & 0x4000)) |
1645 | return -ENODATA; | 1663 | return -ENODATA; |
@@ -1649,7 +1667,9 @@ static ssize_t stp_time_zone_offset_show(struct sysdev_class *class, char *buf) | |||
1649 | static SYSDEV_CLASS_ATTR(time_zone_offset, 0400, | 1667 | static SYSDEV_CLASS_ATTR(time_zone_offset, 0400, |
1650 | stp_time_zone_offset_show, NULL); | 1668 | stp_time_zone_offset_show, NULL); |
1651 | 1669 | ||
1652 | static ssize_t stp_timing_mode_show(struct sysdev_class *class, char *buf) | 1670 | static ssize_t stp_timing_mode_show(struct sysdev_class *class, |
1671 | struct sysdev_class_attribute *attr, | ||
1672 | char *buf) | ||
1653 | { | 1673 | { |
1654 | if (!stp_online) | 1674 | if (!stp_online) |
1655 | return -ENODATA; | 1675 | return -ENODATA; |
@@ -1658,7 +1678,9 @@ static ssize_t stp_timing_mode_show(struct sysdev_class *class, char *buf) | |||
1658 | 1678 | ||
1659 | static SYSDEV_CLASS_ATTR(timing_mode, 0400, stp_timing_mode_show, NULL); | 1679 | static SYSDEV_CLASS_ATTR(timing_mode, 0400, stp_timing_mode_show, NULL); |
1660 | 1680 | ||
1661 | static ssize_t stp_timing_state_show(struct sysdev_class *class, char *buf) | 1681 | static ssize_t stp_timing_state_show(struct sysdev_class *class, |
1682 | struct sysdev_class_attribute *attr, | ||
1683 | char *buf) | ||
1662 | { | 1684 | { |
1663 | if (!stp_online) | 1685 | if (!stp_online) |
1664 | return -ENODATA; | 1686 | return -ENODATA; |
@@ -1667,12 +1689,15 @@ static ssize_t stp_timing_state_show(struct sysdev_class *class, char *buf) | |||
1667 | 1689 | ||
1668 | static SYSDEV_CLASS_ATTR(timing_state, 0400, stp_timing_state_show, NULL); | 1690 | static SYSDEV_CLASS_ATTR(timing_state, 0400, stp_timing_state_show, NULL); |
1669 | 1691 | ||
1670 | static ssize_t stp_online_show(struct sysdev_class *class, char *buf) | 1692 | static ssize_t stp_online_show(struct sysdev_class *class, |
1693 | struct sysdev_class_attribute *attr, | ||
1694 | char *buf) | ||
1671 | { | 1695 | { |
1672 | return sprintf(buf, "%i\n", stp_online); | 1696 | return sprintf(buf, "%i\n", stp_online); |
1673 | } | 1697 | } |
1674 | 1698 | ||
1675 | static ssize_t stp_online_store(struct sysdev_class *class, | 1699 | static ssize_t stp_online_store(struct sysdev_class *class, |
1700 | struct sysdev_class_attribute *attr, | ||
1676 | const char *buf, size_t count) | 1701 | const char *buf, size_t count) |
1677 | { | 1702 | { |
1678 | unsigned int value; | 1703 | unsigned int value; |
diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c index 958bd1540c30..fd1b2f9b7b8f 100644 --- a/drivers/base/cpu.c +++ b/drivers/base/cpu.c | |||
@@ -151,7 +151,8 @@ static ssize_t print_cpus_map(char *buf, const struct cpumask *map) | |||
151 | } | 151 | } |
152 | 152 | ||
153 | #define print_cpus_func(type) \ | 153 | #define print_cpus_func(type) \ |
154 | static ssize_t print_cpus_##type(struct sysdev_class *class, char *buf) \ | 154 | static ssize_t print_cpus_##type(struct sysdev_class *class, \ |
155 | struct sysdev_class_attribute *attr, char *buf) \ | ||
155 | { \ | 156 | { \ |
156 | return print_cpus_map(buf, cpu_##type##_mask); \ | 157 | return print_cpus_map(buf, cpu_##type##_mask); \ |
157 | } \ | 158 | } \ |
@@ -165,7 +166,8 @@ print_cpus_func(present); | |||
165 | /* | 166 | /* |
166 | * Print values for NR_CPUS and offlined cpus | 167 | * Print values for NR_CPUS and offlined cpus |
167 | */ | 168 | */ |
168 | static ssize_t print_cpus_kernel_max(struct sysdev_class *class, char *buf) | 169 | static ssize_t print_cpus_kernel_max(struct sysdev_class *class, |
170 | struct sysdev_class_attribute *attr, char *buf) | ||
169 | { | 171 | { |
170 | int n = snprintf(buf, PAGE_SIZE-2, "%d\n", NR_CPUS - 1); | 172 | int n = snprintf(buf, PAGE_SIZE-2, "%d\n", NR_CPUS - 1); |
171 | return n; | 173 | return n; |
@@ -175,7 +177,8 @@ static SYSDEV_CLASS_ATTR(kernel_max, 0444, print_cpus_kernel_max, NULL); | |||
175 | /* arch-optional setting to enable display of offline cpus >= nr_cpu_ids */ | 177 | /* arch-optional setting to enable display of offline cpus >= nr_cpu_ids */ |
176 | unsigned int total_cpus; | 178 | unsigned int total_cpus; |
177 | 179 | ||
178 | static ssize_t print_cpus_offline(struct sysdev_class *class, char *buf) | 180 | static ssize_t print_cpus_offline(struct sysdev_class *class, |
181 | struct sysdev_class_attribute *attr, char *buf) | ||
179 | { | 182 | { |
180 | int n = 0, len = PAGE_SIZE-2; | 183 | int n = 0, len = PAGE_SIZE-2; |
181 | cpumask_var_t offline; | 184 | cpumask_var_t offline; |
diff --git a/drivers/base/node.c b/drivers/base/node.c index 70122791683d..85c9d30d7004 100644 --- a/drivers/base/node.c +++ b/drivers/base/node.c | |||
@@ -544,23 +544,29 @@ static ssize_t print_nodes_state(enum node_states state, char *buf) | |||
544 | return n; | 544 | return n; |
545 | } | 545 | } |
546 | 546 | ||
547 | static ssize_t print_nodes_possible(struct sysdev_class *class, char *buf) | 547 | static ssize_t print_nodes_possible(struct sysdev_class *class, |
548 | struct sysdev_class_attribute *attr, char *buf) | ||
548 | { | 549 | { |
549 | return print_nodes_state(N_POSSIBLE, buf); | 550 | return print_nodes_state(N_POSSIBLE, buf); |
550 | } | 551 | } |
551 | 552 | ||
552 | static ssize_t print_nodes_online(struct sysdev_class *class, char *buf) | 553 | static ssize_t print_nodes_online(struct sysdev_class *class, |
554 | struct sysdev_class_attribute *attr, | ||
555 | char *buf) | ||
553 | { | 556 | { |
554 | return print_nodes_state(N_ONLINE, buf); | 557 | return print_nodes_state(N_ONLINE, buf); |
555 | } | 558 | } |
556 | 559 | ||
557 | static ssize_t print_nodes_has_normal_memory(struct sysdev_class *class, | 560 | static ssize_t print_nodes_has_normal_memory(struct sysdev_class *class, |
558 | char *buf) | 561 | struct sysdev_class_attribute *attr, |
562 | char *buf) | ||
559 | { | 563 | { |
560 | return print_nodes_state(N_NORMAL_MEMORY, buf); | 564 | return print_nodes_state(N_NORMAL_MEMORY, buf); |
561 | } | 565 | } |
562 | 566 | ||
563 | static ssize_t print_nodes_has_cpu(struct sysdev_class *class, char *buf) | 567 | static ssize_t print_nodes_has_cpu(struct sysdev_class *class, |
568 | struct sysdev_class_attribute *attr, | ||
569 | char *buf) | ||
564 | { | 570 | { |
565 | return print_nodes_state(N_CPU, buf); | 571 | return print_nodes_state(N_CPU, buf); |
566 | } | 572 | } |
@@ -573,7 +579,8 @@ static SYSDEV_CLASS_ATTR(has_cpu, 0444, print_nodes_has_cpu, NULL); | |||
573 | 579 | ||
574 | #ifdef CONFIG_HIGHMEM | 580 | #ifdef CONFIG_HIGHMEM |
575 | static ssize_t print_nodes_has_high_memory(struct sysdev_class *class, | 581 | static ssize_t print_nodes_has_high_memory(struct sysdev_class *class, |
576 | char *buf) | 582 | struct sysdev_class_attribute *attr, |
583 | char *buf) | ||
577 | { | 584 | { |
578 | return print_nodes_state(N_HIGH_MEMORY, buf); | 585 | return print_nodes_state(N_HIGH_MEMORY, buf); |
579 | } | 586 | } |
diff --git a/drivers/base/sys.c b/drivers/base/sys.c index 0d903909af7e..a38445c0f8c5 100644 --- a/drivers/base/sys.c +++ b/drivers/base/sys.c | |||
@@ -89,7 +89,7 @@ static ssize_t sysdev_class_show(struct kobject *kobj, struct attribute *attr, | |||
89 | struct sysdev_class_attribute *class_attr = to_sysdev_class_attr(attr); | 89 | struct sysdev_class_attribute *class_attr = to_sysdev_class_attr(attr); |
90 | 90 | ||
91 | if (class_attr->show) | 91 | if (class_attr->show) |
92 | return class_attr->show(class, buffer); | 92 | return class_attr->show(class, class_attr, buffer); |
93 | return -EIO; | 93 | return -EIO; |
94 | } | 94 | } |
95 | 95 | ||
@@ -100,7 +100,7 @@ static ssize_t sysdev_class_store(struct kobject *kobj, struct attribute *attr, | |||
100 | struct sysdev_class_attribute *class_attr = to_sysdev_class_attr(attr); | 100 | struct sysdev_class_attribute *class_attr = to_sysdev_class_attr(attr); |
101 | 101 | ||
102 | if (class_attr->store) | 102 | if (class_attr->store) |
103 | return class_attr->store(class, buffer, count); | 103 | return class_attr->store(class, class_attr, buffer, count); |
104 | return -EIO; | 104 | return -EIO; |
105 | } | 105 | } |
106 | 106 | ||
diff --git a/drivers/cpuidle/sysfs.c b/drivers/cpuidle/sysfs.c index 97b003839fb6..c9cefacabf37 100644 --- a/drivers/cpuidle/sysfs.c +++ b/drivers/cpuidle/sysfs.c | |||
@@ -22,6 +22,7 @@ static int __init cpuidle_sysfs_setup(char *unused) | |||
22 | __setup("cpuidle_sysfs_switch", cpuidle_sysfs_setup); | 22 | __setup("cpuidle_sysfs_switch", cpuidle_sysfs_setup); |
23 | 23 | ||
24 | static ssize_t show_available_governors(struct sysdev_class *class, | 24 | static ssize_t show_available_governors(struct sysdev_class *class, |
25 | struct sysdev_class_attribute *attr, | ||
25 | char *buf) | 26 | char *buf) |
26 | { | 27 | { |
27 | ssize_t i = 0; | 28 | ssize_t i = 0; |
@@ -41,6 +42,7 @@ out: | |||
41 | } | 42 | } |
42 | 43 | ||
43 | static ssize_t show_current_driver(struct sysdev_class *class, | 44 | static ssize_t show_current_driver(struct sysdev_class *class, |
45 | struct sysdev_class_attribute *attr, | ||
44 | char *buf) | 46 | char *buf) |
45 | { | 47 | { |
46 | ssize_t ret; | 48 | ssize_t ret; |
@@ -56,6 +58,7 @@ static ssize_t show_current_driver(struct sysdev_class *class, | |||
56 | } | 58 | } |
57 | 59 | ||
58 | static ssize_t show_current_governor(struct sysdev_class *class, | 60 | static ssize_t show_current_governor(struct sysdev_class *class, |
61 | struct sysdev_class_attribute *attr, | ||
59 | char *buf) | 62 | char *buf) |
60 | { | 63 | { |
61 | ssize_t ret; | 64 | ssize_t ret; |
@@ -71,6 +74,7 @@ static ssize_t show_current_governor(struct sysdev_class *class, | |||
71 | } | 74 | } |
72 | 75 | ||
73 | static ssize_t store_current_governor(struct sysdev_class *class, | 76 | static ssize_t store_current_governor(struct sysdev_class *class, |
77 | struct sysdev_class_attribute *attr, | ||
74 | const char *buf, size_t count) | 78 | const char *buf, size_t count) |
75 | { | 79 | { |
76 | char gov_name[CPUIDLE_NAME_LEN]; | 80 | char gov_name[CPUIDLE_NAME_LEN]; |
diff --git a/include/linux/sysdev.h b/include/linux/sysdev.h index f395bb3fa2f2..c2458fa8376c 100644 --- a/include/linux/sysdev.h +++ b/include/linux/sysdev.h | |||
@@ -41,8 +41,10 @@ struct sysdev_class { | |||
41 | 41 | ||
42 | struct sysdev_class_attribute { | 42 | struct sysdev_class_attribute { |
43 | struct attribute attr; | 43 | struct attribute attr; |
44 | ssize_t (*show)(struct sysdev_class *, char *); | 44 | ssize_t (*show)(struct sysdev_class *, struct sysdev_class_attribute *, |
45 | ssize_t (*store)(struct sysdev_class *, const char *, size_t); | 45 | char *); |
46 | ssize_t (*store)(struct sysdev_class *, struct sysdev_class_attribute *, | ||
47 | const char *, size_t); | ||
46 | }; | 48 | }; |
47 | 49 | ||
48 | #define _SYSDEV_CLASS_ATTR(_name,_mode,_show,_store) \ | 50 | #define _SYSDEV_CLASS_ATTR(_name,_mode,_show,_store) \ |
diff --git a/kernel/perf_event.c b/kernel/perf_event.c index 8e352c756ba7..f40560b86544 100644 --- a/kernel/perf_event.c +++ b/kernel/perf_event.c | |||
@@ -5481,13 +5481,16 @@ void __init perf_event_init(void) | |||
5481 | register_cpu_notifier(&perf_cpu_nb); | 5481 | register_cpu_notifier(&perf_cpu_nb); |
5482 | } | 5482 | } |
5483 | 5483 | ||
5484 | static ssize_t perf_show_reserve_percpu(struct sysdev_class *class, char *buf) | 5484 | static ssize_t perf_show_reserve_percpu(struct sysdev_class *class, |
5485 | struct sysdev_class_attribute *attr, | ||
5486 | char *buf) | ||
5485 | { | 5487 | { |
5486 | return sprintf(buf, "%d\n", perf_reserved_percpu); | 5488 | return sprintf(buf, "%d\n", perf_reserved_percpu); |
5487 | } | 5489 | } |
5488 | 5490 | ||
5489 | static ssize_t | 5491 | static ssize_t |
5490 | perf_set_reserve_percpu(struct sysdev_class *class, | 5492 | perf_set_reserve_percpu(struct sysdev_class *class, |
5493 | struct sysdev_class_attribute *attr, | ||
5491 | const char *buf, | 5494 | const char *buf, |
5492 | size_t count) | 5495 | size_t count) |
5493 | { | 5496 | { |
@@ -5516,13 +5519,17 @@ perf_set_reserve_percpu(struct sysdev_class *class, | |||
5516 | return count; | 5519 | return count; |
5517 | } | 5520 | } |
5518 | 5521 | ||
5519 | static ssize_t perf_show_overcommit(struct sysdev_class *class, char *buf) | 5522 | static ssize_t perf_show_overcommit(struct sysdev_class *class, |
5523 | struct sysdev_class_attribute *attr, | ||
5524 | char *buf) | ||
5520 | { | 5525 | { |
5521 | return sprintf(buf, "%d\n", perf_overcommit); | 5526 | return sprintf(buf, "%d\n", perf_overcommit); |
5522 | } | 5527 | } |
5523 | 5528 | ||
5524 | static ssize_t | 5529 | static ssize_t |
5525 | perf_set_overcommit(struct sysdev_class *class, const char *buf, size_t count) | 5530 | perf_set_overcommit(struct sysdev_class *class, |
5531 | struct sysdev_class_attribute *attr, | ||
5532 | const char *buf, size_t count) | ||
5526 | { | 5533 | { |
5527 | unsigned long val; | 5534 | unsigned long val; |
5528 | int err; | 5535 | int err; |
diff --git a/kernel/sched.c b/kernel/sched.c index b47ceeec1a91..150b6988de49 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -7406,11 +7406,13 @@ static ssize_t sched_power_savings_store(const char *buf, size_t count, int smt) | |||
7406 | 7406 | ||
7407 | #ifdef CONFIG_SCHED_MC | 7407 | #ifdef CONFIG_SCHED_MC |
7408 | static ssize_t sched_mc_power_savings_show(struct sysdev_class *class, | 7408 | static ssize_t sched_mc_power_savings_show(struct sysdev_class *class, |
7409 | struct sysdev_class_attribute *attr, | ||
7409 | char *page) | 7410 | char *page) |
7410 | { | 7411 | { |
7411 | return sprintf(page, "%u\n", sched_mc_power_savings); | 7412 | return sprintf(page, "%u\n", sched_mc_power_savings); |
7412 | } | 7413 | } |
7413 | static ssize_t sched_mc_power_savings_store(struct sysdev_class *class, | 7414 | static ssize_t sched_mc_power_savings_store(struct sysdev_class *class, |
7415 | struct sysdev_class_attribute *attr, | ||
7414 | const char *buf, size_t count) | 7416 | const char *buf, size_t count) |
7415 | { | 7417 | { |
7416 | return sched_power_savings_store(buf, count, 0); | 7418 | return sched_power_savings_store(buf, count, 0); |
@@ -7422,11 +7424,13 @@ static SYSDEV_CLASS_ATTR(sched_mc_power_savings, 0644, | |||
7422 | 7424 | ||
7423 | #ifdef CONFIG_SCHED_SMT | 7425 | #ifdef CONFIG_SCHED_SMT |
7424 | static ssize_t sched_smt_power_savings_show(struct sysdev_class *dev, | 7426 | static ssize_t sched_smt_power_savings_show(struct sysdev_class *dev, |
7427 | struct sysdev_class_attribute *attr, | ||
7425 | char *page) | 7428 | char *page) |
7426 | { | 7429 | { |
7427 | return sprintf(page, "%u\n", sched_smt_power_savings); | 7430 | return sprintf(page, "%u\n", sched_smt_power_savings); |
7428 | } | 7431 | } |
7429 | static ssize_t sched_smt_power_savings_store(struct sysdev_class *dev, | 7432 | static ssize_t sched_smt_power_savings_store(struct sysdev_class *dev, |
7433 | struct sysdev_class_attribute *attr, | ||
7430 | const char *buf, size_t count) | 7434 | const char *buf, size_t count) |
7431 | { | 7435 | { |
7432 | return sched_power_savings_store(buf, count, 1); | 7436 | return sched_power_savings_store(buf, count, 1); |