From: Jeff Garzik <jgarzik@pobox.com>
To: Christoph Hellwig <hch@infradead.org>,
chas williams <chas@locutus.cmf.nrl.navy.mil>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH][ATM] cli() for net/atm/lec.c
Date: Thu, 20 Feb 2003 14:29:17 -0500 [thread overview]
Message-ID: <20030220192917.GO9800@gtf.org> (raw)
In-Reply-To: <20030220190613.A8663@infradead.org>
On Thu, Feb 20, 2003 at 07:06:13PM +0000, Christoph Hellwig wrote:
> > extern void (*br_fdb_put_hook)(struct net_bridge_fdb_entry *ent);
> > +static spinlock_t lec_arp_spinlock = SPIN_LOCK_UNLOCKED;
> > +static unsigned long lec_arp_flags;
> >
> > +#define LEC_ARP_LOCK() spin_lock_irqsave(&lec_arp_spinlock, lec_arp_flags);
> > +#define LEC_ARP_UNLOCK() spin_unlock_irqrestore(&lec_arp_spinlock, lec_arp_flags);
>
> I don't think this is a good idea - use the spin_lock calls directly and
> always use flags on the stack.
Good spotting, though I would be more direct :)
Simon sez, "Don't do that"
1) use 'unsigned long flags' on the stack
2) do _not_ pass this variable between functions
Jeff
next prev parent reply other threads:[~2003-02-20 19:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-20 17:51 [PATCH][ATM] cli() for net/atm/lec.c chas williams
2003-02-20 19:06 ` Christoph Hellwig
2003-02-20 19:29 ` Jeff Garzik [this message]
2003-02-20 22:11 ` romieu
2003-02-21 17:40 ` chas williams
2003-02-21 17:57 ` Christoph Hellwig
2003-02-22 7:22 ` David S. Miller
2003-02-24 1:13 ` chas williams
2003-02-24 6:16 ` David S. Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030220192917.GO9800@gtf.org \
--to=jgarzik@pobox.com \
--cc=chas@locutus.cmf.nrl.navy.mil \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox