diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2008-12-13 05:50:25 -0500 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2008-12-13 05:50:25 -0500 |
commit | 29c0177e6a4ac094302bed54a1d4bbb6b740a9ef (patch) | |
tree | d8ee57c5b40baa3f53d607b719344dd20f8c85a0 /drivers | |
parent | 98a79d6a50181ca1ecf7400eda01d5dc1bc0dbf0 (diff) |
cpumask: change cpumask_scnprintf, cpumask_parse_user, cpulist_parse, and cpulist_scnprintf to take pointers.
Impact: change calling convention of existing cpumask APIs
Most cpumask functions started with cpus_: these have been replaced by
cpumask_ ones which take struct cpumask pointers as expected.
These four functions don't have good replacement names; fortunately
they're rarely used, so we just change them over.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Mike Travis <travis@sgi.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: paulus@samba.org
Cc: mingo@redhat.com
Cc: tony.luck@intel.com
Cc: ralf@linux-mips.org
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: cl@linux-foundation.org
Cc: srostedt@redhat.com
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/base/cpu.c | 2 | ||||
-rw-r--r-- | drivers/base/node.c | 4 | ||||
-rw-r--r-- | drivers/base/topology.c | 4 | ||||
-rw-r--r-- | drivers/pci/pci-sysfs.c | 4 | ||||
-rw-r--r-- | drivers/pci/probe.c | 4 |
5 files changed, 9 insertions, 9 deletions
diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c index 64f5d54f7edc..4259072f5bd0 100644 --- a/drivers/base/cpu.c +++ b/drivers/base/cpu.c | |||
@@ -109,7 +109,7 @@ static SYSDEV_ATTR(crash_notes, 0400, show_crash_notes, NULL); | |||
109 | */ | 109 | */ |
110 | static ssize_t print_cpus_map(char *buf, cpumask_t *map) | 110 | static ssize_t print_cpus_map(char *buf, cpumask_t *map) |
111 | { | 111 | { |
112 | int n = cpulist_scnprintf(buf, PAGE_SIZE-2, *map); | 112 | int n = cpulist_scnprintf(buf, PAGE_SIZE-2, map); |
113 | 113 | ||
114 | buf[n++] = '\n'; | 114 | buf[n++] = '\n'; |
115 | buf[n] = '\0'; | 115 | buf[n] = '\0'; |
diff --git a/drivers/base/node.c b/drivers/base/node.c index f5207090885a..91636cd8b6c9 100644 --- a/drivers/base/node.c +++ b/drivers/base/node.c | |||
@@ -30,8 +30,8 @@ static ssize_t node_read_cpumap(struct sys_device *dev, int type, char *buf) | |||
30 | BUILD_BUG_ON((NR_CPUS/32 * 9) > (PAGE_SIZE-1)); | 30 | BUILD_BUG_ON((NR_CPUS/32 * 9) > (PAGE_SIZE-1)); |
31 | 31 | ||
32 | len = type? | 32 | len = type? |
33 | cpulist_scnprintf(buf, PAGE_SIZE-2, *mask): | 33 | cpulist_scnprintf(buf, PAGE_SIZE-2, mask) : |
34 | cpumask_scnprintf(buf, PAGE_SIZE-2, *mask); | 34 | cpumask_scnprintf(buf, PAGE_SIZE-2, mask); |
35 | buf[len++] = '\n'; | 35 | buf[len++] = '\n'; |
36 | buf[len] = '\0'; | 36 | buf[len] = '\0'; |
37 | return len; | 37 | return len; |
diff --git a/drivers/base/topology.c b/drivers/base/topology.c index 199cd97e32e6..a8bc1cbcfa7c 100644 --- a/drivers/base/topology.c +++ b/drivers/base/topology.c | |||
@@ -49,8 +49,8 @@ static ssize_t show_cpumap(int type, cpumask_t *mask, char *buf) | |||
49 | 49 | ||
50 | if (len > 1) { | 50 | if (len > 1) { |
51 | n = type? | 51 | n = type? |
52 | cpulist_scnprintf(buf, len-2, *mask): | 52 | cpulist_scnprintf(buf, len-2, mask) : |
53 | cpumask_scnprintf(buf, len-2, *mask); | 53 | cpumask_scnprintf(buf, len-2, mask); |
54 | buf[n++] = '\n'; | 54 | buf[n++] = '\n'; |
55 | buf[n] = '\0'; | 55 | buf[n] = '\0'; |
56 | } | 56 | } |
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index 5d72866897a8..c88485860a0a 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c | |||
@@ -74,7 +74,7 @@ static ssize_t local_cpus_show(struct device *dev, | |||
74 | int len; | 74 | int len; |
75 | 75 | ||
76 | mask = pcibus_to_cpumask(to_pci_dev(dev)->bus); | 76 | mask = pcibus_to_cpumask(to_pci_dev(dev)->bus); |
77 | len = cpumask_scnprintf(buf, PAGE_SIZE-2, mask); | 77 | len = cpumask_scnprintf(buf, PAGE_SIZE-2, &mask); |
78 | buf[len++] = '\n'; | 78 | buf[len++] = '\n'; |
79 | buf[len] = '\0'; | 79 | buf[len] = '\0'; |
80 | return len; | 80 | return len; |
@@ -88,7 +88,7 @@ static ssize_t local_cpulist_show(struct device *dev, | |||
88 | int len; | 88 | int len; |
89 | 89 | ||
90 | mask = pcibus_to_cpumask(to_pci_dev(dev)->bus); | 90 | mask = pcibus_to_cpumask(to_pci_dev(dev)->bus); |
91 | len = cpulist_scnprintf(buf, PAGE_SIZE-2, mask); | 91 | len = cpulist_scnprintf(buf, PAGE_SIZE-2, &mask); |
92 | buf[len++] = '\n'; | 92 | buf[len++] = '\n'; |
93 | buf[len] = '\0'; | 93 | buf[len] = '\0'; |
94 | return len; | 94 | return len; |
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 003a9b3c293f..5b3f5937ecf5 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c | |||
@@ -55,8 +55,8 @@ static ssize_t pci_bus_show_cpuaffinity(struct device *dev, | |||
55 | 55 | ||
56 | cpumask = pcibus_to_cpumask(to_pci_bus(dev)); | 56 | cpumask = pcibus_to_cpumask(to_pci_bus(dev)); |
57 | ret = type? | 57 | ret = type? |
58 | cpulist_scnprintf(buf, PAGE_SIZE-2, cpumask): | 58 | cpulist_scnprintf(buf, PAGE_SIZE-2, &cpumask) : |
59 | cpumask_scnprintf(buf, PAGE_SIZE-2, cpumask); | 59 | cpumask_scnprintf(buf, PAGE_SIZE-2, &cpumask); |
60 | buf[ret++] = '\n'; | 60 | buf[ret++] = '\n'; |
61 | buf[ret] = '\0'; | 61 | buf[ret] = '\0'; |
62 | return ret; | 62 | return ret; |