netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [Fwd: extra spinlocking in forcedeth 0.25]
       [not found] <407D6ABE.7010503@gmx.net>
@ 2004-04-14 21:37 ` Andrew de Quincey
  0 siblings, 0 replies; only message in thread
From: Andrew de Quincey @ 2004-04-14 21:37 UTC (permalink / raw)
  To: Carl-Daniel Hailfinger; +Cc: Jeff Garzik, Manfred Spraul, netdev

On Wednesday 14 April 2004 17:45, you wrote:
> Andrew,
>
> could you have a look at the attached mail regarding spinlocking in your
> WOL patch for forcedeth?

> In 0.23 -> 0.25 forcedeth diff I noticed this:
> 
> +       case ETHTOOL_GWOL:
> +       {
> +               struct ethtool_wolinfo wolinfo;
> +               memset(&wolinfo, 0, sizeof(wolinfo));
> +               wolinfo.supported = WAKE_MAGIC;
> +
> +               spin_lock_irq(&np->lock);
> +               if (np->wolenabled)
> +                       wolinfo.wolopts = WAKE_MAGIC;
> +               spin_unlock_irq(&np->lock);
> +
> +               if (copy_to_user(useraddr, &wolinfo, sizeof(wolinfo)))
> +                       return -EFAULT;
> +               return 0;
> +       }
> 
> IMHO this pair of lock()/unlock() is not needed
> and can be safely removed.

Yeah, he's right. Absolutely no need for it there.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-04-14 21:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <407D6ABE.7010503@gmx.net>
2004-04-14 21:37 ` [Fwd: extra spinlocking in forcedeth 0.25] Andrew de Quincey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).