Am Samstag, 3. Juni 2006 21:35 schrieb Daniel Drake:
> Oliver Neukum wrote:
> > +static int read_mac_addr(struct zd_chip *chip, u8 *mac_addr)
> > +{
> > +   static const zd_addr_t addr[2] = { CR_MAC_ADDR_P1, CR_MAC_ADDR_P2 };
> > +   return _read_mac_addr(chip, mac_addr, (const zd_addr_t *)addr);
> > +}
> > 
> > Why on the stack?
> 
> Technically it's not on the stack because it is static const (it goes in 
> rodata), but I don't think that this invalidates your point. What's the 
> alternative? kmalloc and kfree every time?

In this case rodata will work. However, if you ever switch to direct DMA
it will fail. I really did overlook the const keyword.

[..]
> > +static void disconnect(struct usb_interface *intf)
> > This is racy. It allows io to disconnected devices. You must take the
> > lock and set a flag that you test after you've taken the lock elsewhere.
> 
> Will fix, thanks.

You're welcome

        Regards
                Oliver
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to