lkml.org 
[lkml]   [2009]   [Jan]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH 02/11] cpumask: update local_cpus_show to use new cpumask API
    Impact: cleanup, reduce stack usage, use new cpumask API.

    Replace the local cpumask_t variable with a pointer to the
    const cpumask that needs to be printed.

    Signed-off-by: Mike Travis <travis@sgi.com>
    Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
    ---
    drivers/pci/pci-sysfs.c | 12 ++++++------
    1 file changed, 6 insertions(+), 6 deletions(-)

    --- linux-2.6-for-ingo.orig/drivers/pci/pci-sysfs.c
    +++ linux-2.6-for-ingo/drivers/pci/pci-sysfs.c
    @@ -70,11 +70,11 @@ static ssize_t broken_parity_status_stor
    static ssize_t local_cpus_show(struct device *dev,
    struct device_attribute *attr, char *buf)
    {
    - cpumask_t mask;
    + const struct cpumask *mask;
    int len;

    - mask = pcibus_to_cpumask(to_pci_dev(dev)->bus);
    - len = cpumask_scnprintf(buf, PAGE_SIZE-2, &mask);
    + mask = cpumask_of_pcibus(to_pci_dev(dev)->bus);
    + len = cpumask_scnprintf(buf, PAGE_SIZE-2, mask);
    buf[len++] = '\n';
    buf[len] = '\0';
    return len;
    @@ -84,11 +84,11 @@ static ssize_t local_cpus_show(struct de
    static ssize_t local_cpulist_show(struct device *dev,
    struct device_attribute *attr, char *buf)
    {
    - cpumask_t mask;
    + const struct cpumask *mask;
    int len;

    - mask = pcibus_to_cpumask(to_pci_dev(dev)->bus);
    - len = cpulist_scnprintf(buf, PAGE_SIZE-2, &mask);
    + mask = cpumask_of_pcibus(to_pci_dev(dev)->bus);
    + len = cpulist_scnprintf(buf, PAGE_SIZE-2, mask);
    buf[len++] = '\n';
    buf[len] = '\0';
    return len;


    \
     
     \ /
      Last update: 2009-01-04 14:23    [W:4.763 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site