| To: | Carl-Daniel Hailfinger <c-d.hailfinger.kernel.2004@xxxxxxx> |
|---|---|
| Subject: | Re: [Fwd: extra spinlocking in forcedeth 0.25] |
| From: | Andrew de Quincey <adq@xxxxxxxxxxxxx> |
| Date: | Wed, 14 Apr 2004 22:37:20 +0100 |
| Cc: | Jeff Garzik <jgarzik@xxxxxxxxx>, Manfred Spraul <manfred@xxxxxxxxxxxxxxxx>, netdev@xxxxxxxxxxx |
| In-reply-to: | <407D6ABE.7010503@xxxxxxx> |
| References: | <407D6ABE.7010503@xxxxxxx> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
| User-agent: | KMail/1.6.1 |
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.
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [patch] tg3 ring buffer allocation error handling, Sven Schuster |
|---|---|
| Next by Date: | Re: [patch] tg3 ring buffer allocation error handling, Matt Mackall |
| Previous by Thread: | [patch] tg3 ring buffer allocation error handling, Matt Mackall |
| Next by Thread: | [PATCH] MLDV2: Use IANA icmpv6 type for MLDv2 Report, YOSHIFUJI Hideaki / 吉藤英明 |
| Indexes: | [Date] [Thread] [Top] [All Lists] |