[PATCH 1/12] X86: fix !CONFIG_SMP warning in processor.c - Kernel

This is a discussion on [PATCH 1/12] X86: fix !CONFIG_SMP warning in processor.c - Kernel ; Fix !CONFIG_SMP warning: arch/x86/kernel/acpi/processor.c: In function ‘arch_acpi_processor_init_pdc’: arch/x86/kernel/acpi/processor.c:65: warning: unused variable ‘cpu’ Signed-off-by: Jeff Garzik --- Ideally this warning should be hidden inside a wrapper or somesuch, to camouflage the unneeded argument in !SMP case. diff --git a/arch/x86/kernel/acpi/processor.c b/arch/x86/kernel/acpi/processor.c index ...

+ Reply to Thread
Page 1 of 3 1 2 3 LastLast
Results 1 to 20 of 43

Thread: [PATCH 1/12] X86: fix !CONFIG_SMP warning in processor.c

  1. [PATCH 1/12] X86: fix !CONFIG_SMP warning in processor.c

    Fix !CONFIG_SMP warning:

    arch/x86/kernel/acpi/processor.c: In function ‘arch_acpi_processor_init_pdc’:
    arch/x86/kernel/acpi/processor.c:65: warning: unused variable ‘cpu’

    Signed-off-by: Jeff Garzik
    ---
    Ideally this warning should be hidden inside a wrapper or somesuch, to
    camouflage the unneeded argument in !SMP case.

    diff --git a/arch/x86/kernel/acpi/processor.c b/arch/x86/kernel/acpi/processor.c
    index 2ed0a4c..45e262a 100644
    --- a/arch/x86/kernel/acpi/processor.c
    +++ b/arch/x86/kernel/acpi/processor.c
    @@ -62,7 +62,9 @@ static void init_intel_pdc(struct acpi_processor *pr, struct cpuinfo_x86 *c)
    /* Initialize _PDC data based on the CPU vendor */
    void arch_acpi_processor_init_pdc(struct acpi_processor *pr)
    {
    +#ifdef CONFIG_SMP
    unsigned int cpu = pr->id;
    +#endif
    struct cpuinfo_x86 *c = &cpu_data(cpu);

    pr->pdc = NULL;
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  2. [PATCH 2/12] X86: fix nvidia HPET warning

    arch/x86/kernel/early-quirks.c:40: warning: ‘nvidia_hpet_check’ defined but not used

    Signed-off-by: Jeff Garzik
    ---

    diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c
    index dc34acb..639e632 100644
    --- a/arch/x86/kernel/early-quirks.c
    +++ b/arch/x86/kernel/early-quirks.c
    @@ -35,12 +35,14 @@ static void __init via_bugs(void)
    }

    #ifdef CONFIG_ACPI
    +#ifdef CONFIG_X86_IO_APIC

    static int __init nvidia_hpet_check(struct acpi_table_header *header)
    {
    return 0;
    }
    -#endif
    +#endif /* CONFIG_X86_IO_APIC */
    +#endif /* CONFIG_ACPI */

    static void __init nvidia_bugs(void)
    {
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  3. [PATCH 3/12] ACPI sbs: fix retval warning

    drivers/acpi/sbs.c: In function ‘acpi_battery_add’:
    drivers/acpi/sbs.c:811: warning: ignoring return value of ‘device_create_file’, declared with attribute warn_unused_result

    Additional cleanups:
    * use struct acpi_battery in acpi_battery_remove() to clean up function
    calls, just like acpi_battery_add() already does.

    * un-indent unregister call, as it mistakenly gives the impression that
    it belongs inside the 'if' test

    * remove unneeded braces

    Signed-off-by: Jeff Garzik
    ---

    diff --git a/drivers/acpi/sbs.c b/drivers/acpi/sbs.c
    index 90fd09c..c5c011b 100644
    --- a/drivers/acpi/sbs.c
    +++ b/drivers/acpi/sbs.c
    @@ -113,6 +113,7 @@ struct acpi_battery {
    u16 spec;
    u8 id;
    u8 present:1;
    + u8 have_sysfs:1;
    };

    #define to_acpi_battery(x) container_of(x, struct acpi_battery, bat);
    @@ -808,7 +809,8 @@ static int acpi_battery_add(struct acpi_sbs *sbs, int id)
    }
    battery->bat.get_property = acpi_sbs_battery_get_property;
    result = power_supply_register(&sbs->device->dev, &battery->bat);
    - device_create_file(battery->bat.dev, &alarm_attr);
    + if (device_create_file(battery->bat.dev, &alarm_attr) == 0)
    + battery->have_sysfs = 1;
    printk(KERN_INFO PREFIX "%s [%s]: Battery Slot [%s] (battery %s)\n",
    ACPI_SBS_DEVICE_NAME, acpi_device_bid(sbs->device),
    battery->name, sbs->battery->present ? "present" : "absent");
    @@ -817,14 +819,16 @@ static int acpi_battery_add(struct acpi_sbs *sbs, int id)

    static void acpi_battery_remove(struct acpi_sbs *sbs, int id)
    {
    - if (sbs->battery[id].bat.dev)
    - device_remove_file(sbs->battery[id].bat.dev, &alarm_attr);
    - power_supply_unregister(&sbs->battery[id].bat);
    + struct acpi_battery *battery = &sbs->battery[id];
    +
    + if (battery->have_sysfs)
    + device_remove_file(battery->bat.dev, &alarm_attr);
    +
    + power_supply_unregister(&battery->bat);
    +
    #ifdef CONFIG_ACPI_PROCFS
    - if (sbs->battery[id].proc_entry) {
    - acpi_sbs_remove_fs(&(sbs->battery[id].proc_entry),
    - acpi_battery_dir);
    - }
    + if (sbs->battery[id].proc_entry)
    + acpi_sbs_remove_fs(&battery->proc_entry, acpi_battery_dir);
    #endif
    }

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  4. [PATCH 4/12] riscom8: fix SMP brokenness

    After analyzing the elements that save_flags/cli/sti/restore_flags were
    protecting, convert their usages to a global spinlock (the easiest and
    most obvious next-step). There were some usages of flags being
    intentionally cached, because the code already knew the state of
    interrupts. These have been taken into account.

    This allows us to remove CONFIG_BROKEN_ON_SMP. Completely untested.

    Signed-off-by: Jeff Garzik
    ---

    diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
    index 6549110..27ab43e 100644
    --- a/drivers/char/Kconfig
    +++ b/drivers/char/Kconfig
    @@ -276,7 +276,7 @@ config N_HDLC

    config RISCOM8
    tristate "SDL RISCom/8 card support"
    - depends on SERIAL_NONSTANDARD && BROKEN_ON_SMP
    + depends on SERIAL_NONSTANDARD
    help
    This is a driver for the SDL Communications RISCom/8 multiport card,
    which gives you many serial ports. You would need something like
    diff --git a/drivers/char/riscom8.c b/drivers/char/riscom8.c
    index b37e626..45d109c 100644
    --- a/drivers/char/riscom8.c
    +++ b/drivers/char/riscom8.c
    @@ -47,6 +47,7 @@
    #include
    #include
    #include
    +#include

    #include

    @@ -82,6 +83,8 @@
    static struct riscom_board * IRQ_to_board[16];
    static struct tty_driver *riscom_driver;

    +static spinlock_t riscom_lock = SPIN_LOCK_UNLOCKED;
    +
    static struct riscom_board rc_board[RC_NBOARD] = {
    {
    .base = RC_IOBASE1,
    @@ -218,13 +221,14 @@ static void __init rc_init_CD180(struct riscom_board const * bp)
    {
    unsigned long flags;

    - save_flags(flags); cli();
    + spin_lock_irqsave(&riscom_lock, flags);
    +
    rc_out(bp, RC_CTOUT, 0); /* Clear timeout */
    rc_wait_CCR(bp); /* Wait for CCR ready */
    rc_out(bp, CD180_CCR, CCR_HARDRESET); /* Reset CD180 chip */
    - sti();
    + spin_unlock_irqrestore(&riscom_lock, flags);
    msleep(50); /* Delay 0.05 sec */
    - cli();
    + spin_lock_irqsave(&riscom_lock, flags);
    rc_out(bp, CD180_GIVR, RC_ID); /* Set ID for this chip */
    rc_out(bp, CD180_GICR, 0); /* Clear all bits */
    rc_out(bp, CD180_PILR1, RC_ACK_MINT); /* Prio for modem intr */
    @@ -235,7 +239,7 @@ static void __init rc_init_CD180(struct riscom_board const * bp)
    rc_out(bp, CD180_PPRH, (RC_OSCFREQ/(1000000/RISCOM_TPS)) >> 8);
    rc_out(bp, CD180_PPRL, (RC_OSCFREQ/(1000000/RISCOM_TPS)) & 0xff);

    - restore_flags(flags);
    + spin_unlock_irqrestore(&riscom_lock, flags);
    }

    /* Main probing routine, also sets irq. */
    @@ -817,9 +821,9 @@ static int rc_setup_port(struct riscom_board *bp, struct riscom_port *port)
    }
    port->xmit_buf = (unsigned char *) tmp;
    }
    -
    - save_flags(flags); cli();
    -
    +
    + spin_lock_irqsave(&riscom_lock, flags);
    +
    if (port->tty)
    clear_bit(TTY_IO_ERROR, &port->tty->flags);

    @@ -830,7 +834,7 @@ static int rc_setup_port(struct riscom_board *bp, struct riscom_port *port)
    rc_change_speed(bp, port);
    port->flags |= ASYNC_INITIALIZED;

    - restore_flags(flags);
    + spin_unlock_irqrestore(&riscom_lock, flags);
    return 0;
    }

    @@ -906,6 +910,7 @@ static int block_til_ready(struct tty_struct *tty, struct file * filp,
    int retval;
    int do_clocal = 0;
    int CD;
    + unsigned long flags;

    /*
    * If the device is in the middle of being closed, then block
    @@ -941,19 +946,26 @@ static int block_til_ready(struct tty_struct *tty, struct file * filp,
    */
    retval = 0;
    add_wait_queue(&port->open_wait, &wait);
    - cli();
    +
    + spin_lock_irqsave(&riscom_lock, flags);
    +
    if (!tty_hung_up_p(filp))
    port->count--;
    - sti();
    +
    + spin_unlock_irqrestore(&riscom_lock, flags);
    +
    port->blocked_open++;
    while (1) {
    - cli();
    + spin_lock_irqsave(&riscom_lock, flags);
    +
    rc_out(bp, CD180_CAR, port_No(port));
    CD = rc_in(bp, CD180_MSVR) & MSVR_CD;
    rc_out(bp, CD180_MSVR, MSVR_RTS);
    bp->DTR &= ~(1u << port_No(port));
    rc_out(bp, RC_DTR, bp->DTR);
    - sti();
    +
    + spin_unlock_irqrestore(&riscom_lock, flags);
    +
    set_current_state(TASK_INTERRUPTIBLE);
    if (tty_hung_up_p(filp) ||
    !(port->flags & ASYNC_INITIALIZED)) {
    @@ -1025,8 +1037,9 @@ static void rc_close(struct tty_struct * tty, struct file * filp)

    if (!port || rc_paranoia_check(port, tty->name, "close"))
    return;
    -
    - save_flags(flags); cli();
    +
    + spin_lock_irqsave(&riscom_lock, flags);
    +
    if (tty_hung_up_p(filp))
    goto out;

    @@ -1093,7 +1106,9 @@ static void rc_close(struct tty_struct * tty, struct file * filp)
    }
    port->flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CLOSING);
    wake_up_interruptible(&port->close_wait);
    -out: restore_flags(flags);
    +
    +out:
    + spin_unlock_irqrestore(&riscom_lock, flags);
    }

    static int rc_write(struct tty_struct * tty,
    @@ -1112,34 +1127,33 @@ static int rc_write(struct tty_struct * tty,
    if (!tty || !port->xmit_buf)
    return 0;

    - save_flags(flags);
    while (1) {
    - cli();
    + spin_lock_irqsave(&riscom_lock, flags);
    +
    c = min_t(int, count, min(SERIAL_XMIT_SIZE - port->xmit_cnt - 1,
    SERIAL_XMIT_SIZE - port->xmit_head));
    - if (c <= 0) {
    - restore_flags(flags);
    - break;
    - }
    + if (c <= 0)
    + break; /* lock continues to be held */

    memcpy(port->xmit_buf + port->xmit_head, buf, c);
    port->xmit_head = (port->xmit_head + c) & (SERIAL_XMIT_SIZE-1);
    port->xmit_cnt += c;
    - restore_flags(flags);
    +
    + spin_unlock_irqrestore(&riscom_lock, flags);

    buf += c;
    count -= c;
    total += c;
    }

    - cli();
    if (port->xmit_cnt && !tty->stopped && !tty->hw_stopped &&
    !(port->IER & IER_TXRDY)) {
    port->IER |= IER_TXRDY;
    rc_out(bp, CD180_CAR, port_No(port));
    rc_out(bp, CD180_IER, port->IER);
    }
    - restore_flags(flags);
    +
    + spin_unlock_irqrestore(&riscom_lock, flags);

    return total;
    }
    @@ -1155,7 +1169,7 @@ static void rc_put_char(struct tty_struct * tty, unsigned char ch)
    if (!tty || !port->xmit_buf)
    return;

    - save_flags(flags); cli();
    + spin_lock_irqsave(&riscom_lock, flags);

    if (port->xmit_cnt >= SERIAL_XMIT_SIZE - 1)
    goto out;
    @@ -1163,7 +1177,9 @@ static void rc_put_char(struct tty_struct * tty, unsigned char ch)
    port->xmit_buf[port->xmit_head++] = ch;
    port->xmit_head &= SERIAL_XMIT_SIZE - 1;
    port->xmit_cnt++;
    -out: restore_flags(flags);
    +
    +out:
    + spin_unlock_irqrestore(&riscom_lock, flags);
    }

    static void rc_flush_chars(struct tty_struct * tty)
    @@ -1178,11 +1194,13 @@ static void rc_flush_chars(struct tty_struct * tty)
    !port->xmit_buf)
    return;

    - save_flags(flags); cli();
    + spin_lock_irqsave(&riscom_lock, flags);
    +
    port->IER |= IER_TXRDY;
    rc_out(port_Board(port), CD180_CAR, port_No(port));
    rc_out(port_Board(port), CD180_IER, port->IER);
    - restore_flags(flags);
    +
    + spin_unlock_irqrestore(&riscom_lock, flags);
    }

    static int rc_write_room(struct tty_struct * tty)
    @@ -1217,9 +1235,11 @@ static void rc_flush_buffer(struct tty_struct *tty)
    if (rc_paranoia_check(port, tty->name, "rc_flush_buffer"))
    return;

    - save_flags(flags); cli();
    + spin_lock_irqsave(&riscom_lock, flags);
    +
    port->xmit_cnt = port->xmit_head = port->xmit_tail = 0;
    - restore_flags(flags);
    +
    + spin_unlock_irqrestore(&riscom_lock, flags);

    tty_wakeup(tty);
    }
    @@ -1236,11 +1256,15 @@ static int rc_tiocmget(struct tty_struct *tty, struct file *file)
    return -ENODEV;

    bp = port_Board(port);
    - save_flags(flags); cli();
    +
    + spin_lock_irqsave(&riscom_lock, flags);
    +
    rc_out(bp, CD180_CAR, port_No(port));
    status = rc_in(bp, CD180_MSVR);
    result = rc_in(bp, RC_RI) & (1u << port_No(port)) ? 0 : TIOCM_RNG;
    - restore_flags(flags);
    +
    + spin_unlock_irqrestore(&riscom_lock, flags);
    +
    result |= ((status & MSVR_RTS) ? TIOCM_RTS : 0)
    | ((status & MSVR_DTR) ? TIOCM_DTR : 0)
    | ((status & MSVR_CD) ? TIOCM_CAR : 0)
    @@ -1261,7 +1285,8 @@ static int rc_tiocmset(struct tty_struct *tty, struct file *file,

    bp = port_Board(port);

    - save_flags(flags); cli();
    + spin_lock_irqsave(&riscom_lock, flags);
    +
    if (set & TIOCM_RTS)
    port->MSVR |= MSVR_RTS;
    if (set & TIOCM_DTR)
    @@ -1275,7 +1300,9 @@ static int rc_tiocmset(struct tty_struct *tty, struct file *file,
    rc_out(bp, CD180_CAR, port_No(port));
    rc_out(bp, CD180_MSVR, port->MSVR);
    rc_out(bp, RC_DTR, bp->DTR);
    - restore_flags(flags);
    +
    + spin_unlock_irqrestore(&riscom_lock, flags);
    +
    return 0;
    }

    @@ -1284,7 +1311,8 @@ static inline void rc_send_break(struct riscom_port * port, unsigned long length
    struct riscom_board *bp = port_Board(port);
    unsigned long flags;

    - save_flags(flags); cli();
    + spin_lock_irqsave(&riscom_lock, flags);
    +
    port->break_length = RISCOM_TPS / HZ * length;
    port->COR2 |= COR2_ETC;
    port->IER |= IER_TXRDY;
    @@ -1294,7 +1322,8 @@ static inline void rc_send_break(struct riscom_port * port, unsigned long length
    rc_wait_CCR(bp);
    rc_out(bp, CD180_CCR, CCR_CORCHG2);
    rc_wait_CCR(bp);
    - restore_flags(flags);
    +
    + spin_unlock_irqrestore(&riscom_lock, flags);
    }

    static inline int rc_set_serial_info(struct riscom_port * port,
    @@ -1303,7 +1332,6 @@ static inline int rc_set_serial_info(struct riscom_port * port,
    struct serial_struct tmp;
    struct riscom_board *bp = port_Board(port);
    int change_speed;
    - unsigned long flags;

    if (copy_from_user(&tmp, newinfo, sizeof(tmp)))
    return -EFAULT;
    @@ -1337,9 +1365,11 @@ static inline int rc_set_serial_info(struct riscom_port * port,
    port->closing_wait = tmp.closing_wait;
    }
    if (change_speed) {
    - save_flags(flags); cli();
    + unsigned long flags;
    +
    + spin_lock_irqsave(&riscom_lock, flags);
    rc_change_speed(bp, port);
    - restore_flags(flags);
    + spin_unlock_irqrestore(&riscom_lock, flags);
    }
    return 0;
    }
    @@ -1419,17 +1449,19 @@ static void rc_throttle(struct tty_struct * tty)
    return;

    bp = port_Board(port);
    -
    - save_flags(flags); cli();
    +
    + spin_lock_irqsave(&riscom_lock, flags);
    +
    port->MSVR &= ~MSVR_RTS;
    rc_out(bp, CD180_CAR, port_No(port));
    - if (I_IXOFF(tty)) {
    + if (I_IXOFF(tty)) {
    rc_wait_CCR(bp);
    rc_out(bp, CD180_CCR, CCR_SSCH2);
    rc_wait_CCR(bp);
    }
    rc_out(bp, CD180_MSVR, port->MSVR);
    - restore_flags(flags);
    +
    + spin_unlock_irqrestore(&riscom_lock, flags);
    }

    static void rc_unthrottle(struct tty_struct * tty)
    @@ -1443,7 +1475,8 @@ static void rc_unthrottle(struct tty_struct * tty)

    bp = port_Board(port);

    - save_flags(flags); cli();
    + spin_lock_irqsave(&riscom_lock, flags);
    +
    port->MSVR |= MSVR_RTS;
    rc_out(bp, CD180_CAR, port_No(port));
    if (I_IXOFF(tty)) {
    @@ -1452,7 +1485,8 @@ static void rc_unthrottle(struct tty_struct * tty)
    rc_wait_CCR(bp);
    }
    rc_out(bp, CD180_MSVR, port->MSVR);
    - restore_flags(flags);
    +
    + spin_unlock_irqrestore(&riscom_lock, flags);
    }

    static void rc_stop(struct tty_struct * tty)
    @@ -1466,11 +1500,13 @@ static void rc_stop(struct tty_struct * tty)

    bp = port_Board(port);

    - save_flags(flags); cli();
    + spin_lock_irqsave(&riscom_lock, flags);
    +
    port->IER &= ~IER_TXRDY;
    rc_out(bp, CD180_CAR, port_No(port));
    rc_out(bp, CD180_IER, port->IER);
    - restore_flags(flags);
    +
    + spin_unlock_irqrestore(&riscom_lock, flags);
    }

    static void rc_start(struct tty_struct * tty)
    @@ -1484,13 +1520,15 @@ static void rc_start(struct tty_struct * tty)

    bp = port_Board(port);

    - save_flags(flags); cli();
    + spin_lock_irqsave(&riscom_lock, flags);
    +
    if (port->xmit_cnt && port->xmit_buf && !(port->IER & IER_TXRDY)) {
    port->IER |= IER_TXRDY;
    rc_out(bp, CD180_CAR, port_No(port));
    rc_out(bp, CD180_IER, port->IER);
    }
    - restore_flags(flags);
    +
    + spin_unlock_irqrestore(&riscom_lock, flags);
    }

    /*
    @@ -1542,9 +1580,9 @@ static void rc_set_termios(struct tty_struct * tty, struct ktermios * old_termio
    tty->termios->c_iflag == old_termios->c_iflag)
    return;

    - save_flags(flags); cli();
    + spin_lock_irqsave(&riscom_lock, flags);
    rc_change_speed(port_Board(port), port);
    - restore_flags(flags);
    + spin_unlock_irqrestore(&riscom_lock, flags);

    if ((old_termios->c_cflag & CRTSCTS) &&
    !(tty->termios->c_cflag & CRTSCTS)) {
    @@ -1633,11 +1671,12 @@ static void rc_release_drivers(void)
    {
    unsigned long flags;

    - save_flags(flags);
    - cli();
    + spin_lock_irqsave(&riscom_lock, flags);
    +
    tty_unregister_driver(riscom_driver);
    put_tty_driver(riscom_driver);
    - restore_flags(flags);
    +
    + spin_unlock_irqrestore(&riscom_lock, flags);
    }

    #ifndef MODULE
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  5. [PATCH 10/12] mac80211: fix warning created by BIT()

    Now that BIT() forces unsigned long, this warning appears:

    net/mac80211/ieee80211_sta.c: In function ‘ieee80211_rx_mgmt_assoc_resp’:
    net/mac80211/ieee80211_sta.c:1187: warning: format ‘%d’ expects type ‘int’, but argument 7 has type ‘long unsigned int’

    Signed-off-by: Jeff Garzik
    ---

    diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c
    index f7ffeec..bdfd901 100644
    --- a/net/mac80211/ieee80211_sta.c
    +++ b/net/mac80211/ieee80211_sta.c
    @@ -1182,7 +1182,7 @@ static void ieee80211_rx_mgmt_assoc_resp(struct net_device *dev,
    aid = le16_to_cpu(mgmt->u.assoc_resp.aid);

    printk(KERN_DEBUG "%s: RX %sssocResp from %s (capab=0x%x "
    - "status=%d aid=%d)\n",
    + "status=%d aid=%ld)\n",
    dev->name, reassoc ? "Rea" : "A", print_mac(mac, mgmt->sa),
    capab_info, status_code, aid & ~(BIT(15) | BIT(14)));

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  6. Re: [PATCH 11/12] NET: fix subqueue bugs

    David Miller wrote:
    > From: Jeff Garzik
    > Date: Tue, 23 Oct 2007 18:36:46 -0400 (EDT)
    >
    >> net/sched/sch_prio.c: In function $,1rxprio_dequeue$,1ry:
    >> net/sched/sch_prio.c:139: warning: passing argument 2 of $,1rxnetif_subqueue_stopped$,1ry makes pointer from integer without a cast
    >> net/sched/sch_prio.c: In function $,1rxrr_dequeue$,1ry:
    >> net/sched/sch_prio.c:169: warning: passing argument 2 of $,1rxnetif_subqueue_stopped$,1ry makes pointer from integer without a cast
    >>
    >> Signed-off-by: Jeff Garzik

    >
    > I have another copy of this from Pavel earlier in my inbox
    > and I promise I will integrate his patch today :-)


    Either way, all good Just dumping my fixes from last night.

    Jeff


    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  7. [PATCH 9/12] cgroup: kill unused variable

    Signed-off-by: Jeff Garzik
    ---

    diff --git a/kernel/cgroup.c b/kernel/cgroup.c
    index 5987dcc..3fe21e1 100644
    --- a/kernel/cgroup.c
    +++ b/kernel/cgroup.c
    @@ -2402,7 +2402,6 @@ struct file_operations proc_cgroup_operations = {
    static int proc_cgroupstats_show(struct seq_file *m, void *v)
    {
    int i;
    - struct cgroupfs_root *root;

    seq_puts(m, "#subsys_name\thierarchy\tnum_cgroups\n");
    mutex_lock(&cgroup_mutex);
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  8. Re: [PATCH 6/12] KVM: work around SMP requirement

    On Tue, Oct 23, 2007 at 06:36:40PM -0400, Jeff Garzik wrote:
    > KVM is currently completely broken for the !CONFIG_SMP case.
    >
    > drivers/kvm/kvm_main.c: In function ‘kvm_flush_remote_tlbs’:
    > drivers/kvm/kvm_main.c:220: error: implicit declaration of function ‘smp_call_function_mask’
    >
    > Signed-off-by: Jeff Garzik
    > ---
    > I hope the KVM maintainer can come up with a better solution...
    >
    > diff --git a/drivers/kvm/Kconfig b/drivers/kvm/Kconfig
    > index 8749fa4..e35fbc6 100644
    > --- a/drivers/kvm/Kconfig
    > +++ b/drivers/kvm/Kconfig
    > @@ -16,7 +16,7 @@ if VIRTUALIZATION
    >
    > config KVM
    > tristate "Kernel-based Virtual Machine (KVM) support"
    > - depends on X86 && EXPERIMENTAL
    > + depends on X86 && EXPERIMENTAL && SMP
    >...


    Assuming it won't get fixed soon, the pattern would be "(SMP || BROKEN)".

    The effect is the same, but this makes it more obvious that KVM
    does not depend architecturally on SMP but just broken.

    Of course, the preferred solution is to simply get KVM fixed...

    cu
    Adrian

    --

    "Is there not promise of rain?" Ling Tan asked suddenly out
    of the darkness. There had been need of rain for many days.
    "Only a promise," Lao Er said.
    Pearl S. Buck - Dragon Seed

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  9. [PATCH 7/12] eexpress: fix !SMP unused-var warning

    Signed-off-by: Jeff Garzik
    ---

    diff --git a/drivers/net/eexpress.c b/drivers/net/eexpress.c
    index 9c85e50..70509ed 100644
    --- a/drivers/net/eexpress.c
    +++ b/drivers/net/eexpress.c
    @@ -651,9 +651,9 @@ static void eexp_timeout(struct net_device *dev)
    */
    static int eexp_xmit(struct sk_buff *buf, struct net_device *dev)
    {
    - struct net_local *lp = netdev_priv(dev);
    short length = buf->len;
    #ifdef CONFIG_SMP
    + struct net_local *lp = netdev_priv(dev);
    unsigned long flags;
    #endif

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  10. [PATCH 6/12] KVM: work around SMP requirement

    KVM is currently completely broken for the !CONFIG_SMP case.

    drivers/kvm/kvm_main.c: In function ‘kvm_flush_remote_tlbs’:
    drivers/kvm/kvm_main.c:220: error: implicit declaration of function ‘smp_call_function_mask’

    Signed-off-by: Jeff Garzik
    ---
    I hope the KVM maintainer can come up with a better solution...

    diff --git a/drivers/kvm/Kconfig b/drivers/kvm/Kconfig
    index 8749fa4..e35fbc6 100644
    --- a/drivers/kvm/Kconfig
    +++ b/drivers/kvm/Kconfig
    @@ -16,7 +16,7 @@ if VIRTUALIZATION

    config KVM
    tristate "Kernel-based Virtual Machine (KVM) support"
    - depends on X86 && EXPERIMENTAL
    + depends on X86 && EXPERIMENTAL && SMP
    select PREEMPT_NOTIFIERS
    select ANON_INODES
    ---help---
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  11. [PATCH 8/12] ni5010: kill unused variable

    Signed-off-by: Jeff Garzik
    ---

    diff --git a/drivers/net/ni5010.c b/drivers/net/ni5010.c
    index 14a768f..a20005c 100644
    --- a/drivers/net/ni5010.c
    +++ b/drivers/net/ni5010.c
    @@ -518,7 +518,6 @@ static void dump_packet(void *buf, int len)
    /* We have a good packet, get it out of the buffer. */
    static void ni5010_rx(struct net_device *dev)
    {
    - struct ni5010_local *lp = netdev_priv(dev);
    int ioaddr = dev->base_addr;
    unsigned char rcv_stat;
    struct sk_buff *skb;
    @@ -577,7 +576,6 @@ static void ni5010_rx(struct net_device *dev)

    PRINTK2((KERN_DEBUG "%s: Received packet, size=%#4.4x\n",
    dev->name, i_pkt_size));
    -
    }

    static int process_xmt_interrupt(struct net_device *dev)
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  12. [PATCH 11/12] NET: fix subqueue bugs

    net/sched/sch_prio.c: In function ‘prio_dequeue’:
    net/sched/sch_prio.c:139: warning: passing argument 2 of ‘netif_subqueue_stopped’ makes pointer from integer without a cast
    net/sched/sch_prio.c: In function ‘rr_dequeue’:
    net/sched/sch_prio.c:169: warning: passing argument 2 of ‘netif_subqueue_stopped’ makes pointer from integer without a cast

    Signed-off-by: Jeff Garzik
    ---

    diff --git a/net/sched/sch_prio.c b/net/sched/sch_prio.c
    index abd82fc..de89409 100644
    --- a/net/sched/sch_prio.c
    +++ b/net/sched/sch_prio.c
    @@ -136,7 +136,7 @@ prio_dequeue(struct Qdisc* sch)
    * pulling an skb. This way we avoid excessive requeues
    * for slower queues.
    */
    - if (!netif_subqueue_stopped(sch->dev, (q->mq ? prio : 0))) {
    + if (!__netif_subqueue_stopped(sch->dev, (q->mq ? prio : 0))) {
    qdisc = q->queues[prio];
    skb = qdisc->dequeue(qdisc);
    if (skb) {
    @@ -165,7 +165,7 @@ static struct sk_buff *rr_dequeue(struct Qdisc* sch)
    * for slower queues. If the queue is stopped, try the
    * next queue.
    */
    - if (!netif_subqueue_stopped(sch->dev,
    + if (!__netif_subqueue_stopped(sch->dev,
    (q->mq ? q->curband : 0))) {
    qdisc = q->queues[q->curband];
    skb = qdisc->dequeue(qdisc);
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  13. [PATCH 5/12] ISDN/sc: fix longstanding warning

    drivers/isdn/sc/shmem.c: In function ‘memcpy_toshmem’:
    drivers/isdn/sc/shmem.c:54: warning: passing argument 1 of ‘memcpy_toio’ makes pointer from integer without a cast

    Also, remove some unneeded braces, and add some useful whitespace.

    Signed-off-by: Jeff Garzik
    ---

    diff --git a/drivers/isdn/sc/shmem.c b/drivers/isdn/sc/shmem.c
    index 034d41a..e0331e0 100644
    --- a/drivers/isdn/sc/shmem.c
    +++ b/drivers/isdn/sc/shmem.c
    @@ -28,15 +28,15 @@ void memcpy_toshmem(int card, void *dest, const void *src, size_t n)
    {
    unsigned long flags;
    unsigned char ch;
    + unsigned long dest_rem = ((unsigned long) dest) % 0x4000;

    - if(!IS_VALID_CARD(card)) {
    + if (!IS_VALID_CARD(card)) {
    pr_debug("Invalid param: %d is not a valid card id\n", card);
    return;
    }

    - if(n > SRAM_PAGESIZE) {
    + if (n > SRAM_PAGESIZE)
    return;
    - }

    /*
    * determine the page to load from the address
    @@ -50,8 +50,7 @@ void memcpy_toshmem(int card, void *dest, const void *src, size_t n)

    outb(((sc_adapter[card]->shmem_magic + ch * SRAM_PAGESIZE) >> 14) | 0x80,
    sc_adapter[card]->ioport[sc_adapter[card]->shmem_pgport]);
    - memcpy_toio(sc_adapter[card]->rambase +
    - ((unsigned long) dest % 0x4000), src, n);
    + memcpy_toio(sc_adapter[card]->rambase + dest_rem, src, n);
    spin_unlock_irqrestore(&sc_adapter[card]->lock, flags);
    pr_debug("%s: set page to %#x\n",sc_adapter[card]->devicename,
    ((sc_adapter[card]->shmem_magic + ch * SRAM_PAGESIZE)>>14)|0x80);
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  14. Re: [PATCH 6/12] KVM: work around SMP requirement

    Adrian Bunk wrote:
    > On Tue, Oct 23, 2007 at 06:36:40PM -0400, Jeff Garzik wrote:
    >> KVM is currently completely broken for the !CONFIG_SMP case.
    >>
    >> drivers/kvm/kvm_main.c: In function ‘kvm_flush_remote_tlbs’:
    >> drivers/kvm/kvm_main.c:220: error: implicit declaration of function ‘smp_call_function_mask’
    >>
    >> Signed-off-by: Jeff Garzik
    >> ---
    >> I hope the KVM maintainer can come up with a better solution...
    >>
    >> diff --git a/drivers/kvm/Kconfig b/drivers/kvm/Kconfig
    >> index 8749fa4..e35fbc6 100644
    >> --- a/drivers/kvm/Kconfig
    >> +++ b/drivers/kvm/Kconfig
    >> @@ -16,7 +16,7 @@ if VIRTUALIZATION
    >>
    >> config KVM
    >> tristate "Kernel-based Virtual Machine (KVM) support"
    >> - depends on X86 && EXPERIMENTAL
    >> + depends on X86 && EXPERIMENTAL && SMP
    >> ...

    >
    > Assuming it won't get fixed soon, the pattern would be "(SMP || BROKEN)".
    >
    > The effect is the same, but this makes it more obvious that KVM
    > does not depend architecturally on SMP but just broken.
    >
    > Of course, the preferred solution is to simply get KVM fixed...


    In general I agree, but I specifically avoided CONFIG_BROKEN in case it
    was an intentional choice to require an SMP kernel.

    Jeff


    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  15. [PATCH 12/12] sound/isa: fix printk format

    sound/isa/ad1848/ad1848_lib.c: In function ‘snd_ad1848_mce_down’:
    sound/isa/ad1848/ad1848_lib.c:216: warning: format ‘%d’ expects type ‘int’, but argument 4 has type ‘long unsigned int’

    Signed-off-by: Jeff Garzik
    ---

    diff --git a/sound/isa/ad1848/ad1848_lib.c b/sound/isa/ad1848/ad1848_lib.c
    index a901cd1..9a64035 100644
    --- a/sound/isa/ad1848/ad1848_lib.c
    +++ b/sound/isa/ad1848/ad1848_lib.c
    @@ -213,7 +213,7 @@ static void snd_ad1848_mce_down(struct snd_ad1848 *chip)
    for (timeout = 12000; timeout > 0 && (inb(AD1848P(chip, REGSEL)) & AD1848_INIT); timeout--)
    udelay(100);

    - snd_printdd("(1) timeout = %d\n", timeout);
    + snd_printdd("(1) timeout = %ld\n", timeout);

    #ifdef CONFIG_SND_DEBUG
    if (inb(AD1848P(chip, REGSEL)) & AD1848_INIT)
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  16. Re: [PATCH 11/12] NET: fix subqueue bugs

    From: Jeff Garzik
    Date: Tue, 23 Oct 2007 18:36:46 -0400 (EDT)

    > net/sched/sch_prio.c: In function $,1rx(Bprio_dequeue$,1ry(B:
    > net/sched/sch_prio.c:139: warning: passing argument 2 of $,1rx(Bnetif_subqueue_stopped$,1ry(B makes pointer from integer without a cast
    > net/sched/sch_prio.c: In function $,1rx(Brr_dequeue$,1ry(B:
    > net/sched/sch_prio.c:169: warning: passing argument 2 of $,1rx(Bnetif_subqueue_stopped$,1ry(B makes pointer from integer without a cast
    >
    > Signed-off-by: Jeff Garzik


    I have another copy of this from Pavel earlier in my inbox
    and I promise I will integrate his patch today :-)
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  17. Re: [PATCH 10/12] mac80211: fix warning created by BIT()

    On Tue, 23 Oct 2007 18:36:45 -0400 (EDT) Jeff Garzik wrote:

    > Now that BIT() forces unsigned long, this warning appears:
    >
    > net/mac80211/ieee80211_sta.c: In function ‘ieee80211_rx_mgmt_assoc_resp’:
    > net/mac80211/ieee80211_sta.c:1187: warning: format ‘%d’ expects type ‘int’, but argument 7 has type ‘long unsigned int’


    LC_ALL=C make ...


    > Signed-off-by: Jeff Garzik
    > ---
    >
    > diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c
    > index f7ffeec..bdfd901 100644
    > --- a/net/mac80211/ieee80211_sta.c
    > +++ b/net/mac80211/ieee80211_sta.c
    > @@ -1182,7 +1182,7 @@ static void ieee80211_rx_mgmt_assoc_resp(struct net_device *dev,
    > aid = le16_to_cpu(mgmt->u.assoc_resp.aid);
    >
    > printk(KERN_DEBUG "%s: RX %sssocResp from %s (capab=0x%x "
    > - "status=%d aid=%d)\n",
    > + "status=%d aid=%ld)\n",
    > dev->name, reassoc ? "Rea" : "A", print_mac(mac, mgmt->sa),
    > capab_info, status_code, aid & ~(BIT(15) | BIT(14)));
    >
    > -


    Patch was submitted yesterday by Johannes Berg, but does need to be
    pushed by someone... (like this)


    ---
    ~Randy
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  18. Re: [PATCH 9/12] cgroup: kill unused variable

    On 10/23/07, Jeff Garzik wrote:
    > Signed-off-by: Jeff Garzik


    Acked-by: Paul Menage

    > ---
    >
    > diff --git a/kernel/cgroup.c b/kernel/cgroup.c
    > index 5987dcc..3fe21e1 100644
    > --- a/kernel/cgroup.c
    > +++ b/kernel/cgroup.c
    > @@ -2402,7 +2402,6 @@ struct file_operations proc_cgroup_operations = {
    > static int proc_cgroupstats_show(struct seq_file *m, void *v)
    > {
    > int i;
    > - struct cgroupfs_root *root;
    >
    > seq_puts(m, "#subsys_name\thierarchy\tnum_cgroups\n");
    > mutex_lock(&cgroup_mutex);
    >

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  19. Re: [PATCH 2/12] X86: fix nvidia HPET warning

    Jeff Garzik wrote:
    > arch/x86/kernel/early-quirks.c:40: warning: ‘nvidia_hpet_check’ defined but not used
    >
    > Signed-off-by: Jeff Garzik
    > ---
    >
    > diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c
    > index dc34acb..639e632 100644
    > --- a/arch/x86/kernel/early-quirks.c
    > +++ b/arch/x86/kernel/early-quirks.c
    > @@ -35,12 +35,14 @@ static void __init via_bugs(void)
    > }
    >
    > #ifdef CONFIG_ACPI
    > +#ifdef CONFIG_X86_IO_APIC
    >


    Why not #if defined(CONFIG_ACPI) && defined(CONFIG_X86_IO_APIC)? Saves
    a line and a layer of #if(def).

    >
    > static int __init nvidia_hpet_check(struct acpi_table_header *header)
    > {
    > return 0;
    > }
    > -#endif
    > +#endif /* CONFIG_X86_IO_APIC */
    > +#endif /* CONFIG_ACPI */
    >


    J
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  20. Re: [PATCH 1/12] X86: fix !CONFIG_SMP warning in processor.c

    Jeff Garzik wrote:
    > Fix !CONFIG_SMP warning:
    >
    > arch/x86/kernel/acpi/processor.c: In function ‘arch_acpi_processor_init_pdc’:
    > arch/x86/kernel/acpi/processor.c:65: warning: unused variable ‘cpu’
    >
    > Signed-off-by: Jeff Garzik
    > ---
    > Ideally this warning should be hidden inside a wrapper or somesuch, to
    > camouflage the unneeded argument in !SMP case.
    >
    > diff --git a/arch/x86/kernel/acpi/processor.c b/arch/x86/kernel/acpi/processor.c
    > index 2ed0a4c..45e262a 100644
    > --- a/arch/x86/kernel/acpi/processor.c
    > +++ b/arch/x86/kernel/acpi/processor.c
    > @@ -62,7 +62,9 @@ static void init_intel_pdc(struct acpi_processor *pr, struct cpuinfo_x86 *c)
    > /* Initialize _PDC data based on the CPU vendor */
    > void arch_acpi_processor_init_pdc(struct acpi_processor *pr)
    > {
    > +#ifdef CONFIG_SMP
    > unsigned int cpu = pr->id;
    > +#endif
    > struct cpuinfo_x86 *c = &cpu_data(cpu);
    >


    Surely just replace cpu with pr->id? That's the only use.

    J
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

+ Reply to Thread
Page 1 of 3 1 2 3 LastLast