login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
April
»
22
Re: [PATCH 1/2] klist: implement KLIST_INIT() and DEFINE_KLIST()
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Peter Zijlstra
Subject:
Re: [PATCH 1/2] klist: implement KLIST_INIT() and DEFINE_KLIST()
Date: Tuesday, April 22, 2008 - 5:57 am
On Tue, 2008-04-22 at 18:57 +0900, Tejun Heo wrote:
quoted text
> klist is missing static initializers and definition helper. Add them. > > Signed-off-by: Tejun Heo <htejun@gmail.com> > --- > I can't tell who's in charge of this code, so I'm including last two > people who made changes and Andrew :-) This will be used by later USB > mode switch support, so I'm cc'ing USB people too. > > Thanks. > > include/linux/klist.h | 8 ++++++++ > 1 files changed, 8 insertions(+), 0 deletions(-) > > diff --git a/include/linux/klist.h b/include/linux/klist.h > index 7407125..c6b697c 100644 > --- a/include/linux/klist.h > +++ b/include/linux/klist.h > @@ -25,6 +25,14 @@ struct klist { > void (*put)(struct klist_node *); > }; > > +#define KLIST_INIT(_name, _get, _put) \ > + { .k_lock = __SPIN_LOCK_UNLOCKED(klist.k_lock), \
May I ask you make that: __SPIN_LOCK_UNLOCKED(_name.k_lock) Otherwise we'll end up with multiple classes that have the same name.
quoted text
> + .k_list = LIST_HEAD_INIT(_name.k_list), \ > + .get = _get, \ > + .put = _put, } > + > +#define DEFINE_KLIST(_name, _get, _put) \ > + struct klist _name = KLIST_INIT(_name, _get, _put) > > extern void klist_init(struct klist * k, void (*get)(struct klist_node *), > void (*put)(struct klist_node *));
--
unsubscribe notice
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/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH 1/2] klist: implement KLIST_INIT() and DEFINE_KLIST()
, Tejun Heo
, (Tue Apr 22, 2:57 am)
[PATCH] klist: implement klist_add_{after|before}()
, Tejun Heo
, (Tue Apr 22, 2:58 am)
Re: [PATCH 1/2] klist: implement KLIST_INIT() and DEFINE_K ...
, Peter Zijlstra
, (Tue Apr 22, 5:57 am)
Re: [PATCH 1/2] klist: implement KLIST_INIT() and DEFINE_K ...
, Tejun Heo
, (Tue Apr 22, 6:03 am)
Re: [PATCH 1/2] klist: implement KLIST_INIT() and DEFINE_K ...
, Peter Zijlstra
, (Tue Apr 22, 6:06 am)
Re: [PATCH 1/2] klist: implement KLIST_INIT() and DEFINE_K ...
, Tejun Heo
, (Tue Apr 22, 6:10 am)
Re: [PATCH 1/2] klist: implement KLIST_INIT() and DEFINE_K ...
, Greg KH
, (Fri Apr 25, 9:37 am)
[PATCH 1/2 UPDATED] klist: implement KLIST_INIT() and DEFI ...
, Tejun Heo
, (Fri Apr 25, 11:16 am)
Re: [PATCH 1/2 UPDATED] klist: implement KLIST_INIT() and ...
, Greg KH
, (Fri Apr 25, 3:30 pm)
Re: [PATCH 1/2 UPDATED] klist: implement KLIST_INIT() and ...
, Tejun Heo
, (Fri Apr 25, 3:40 pm)
patch klist-implement-klist_add_-after-before.patch added ...
, gregkh
, (Mon Apr 28, 4:51 pm)
patch klist-implement-klist_init-and-define_klist.patch ad ...
, gregkh
, (Mon Apr 28, 4:51 pm)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Rusty Russell
Re: 2.6.22-rc3-mm1
Bill Fink
Re: [PATCH] net: add ability to clear stats via ethtool - e1000/pcnet32
Jeffrey V. Merkey
Re: Versioning file system
Alexey Dobriyan
Re: [2.6.22.2 review 09/84] Fix rfkill IRQ flags.
Luben Tuikov
Re: Integration of SCST in the mainstream Linux kernel
git-commits-head
:
Linux Kernel Mailing List
V4L/DVB: tm6000: add special usb request to quit i2c tuner transfer
Linux Kernel Mailing List
OMAP: DSS2: SDI driver
Linux Kernel Mailing List
PCI: introduce pci_pcie_cap()
Linux Kernel Mailing List
drivers/acpi: use kasprintf
Linux Kernel Mailing List
PCI hotplug: acpiphp: remove superfluous _HPP/_HPX evaluation
linux-netdev
:
David Miller
Re: [2.6.30-rc3] powerpc: compilation error of mace module
Rafael J. Wysocki
Re: [PATCH] igb: fix kexec with igb
Patrick McHardy
Re: [rfc 02/13] [RFC 02/13] netfilter: nf_conntrack_sip: Add callid parser
webmaster Maintenance
&#32852;&#31995;&#31995;&#32479;&#31649;&#29702;&#21592;
Krzysztof Oledzki
Re: Error: an inet prefix is expected rather than "0/0".
openbsd-misc
:
Ted Bullock
Re: Proliant DL380 G3 cannot get on network
Jack J. Woehr
Re: Real men don't attack straw men
Úlfar M. E. Johnson
installing openbsd in xen
Eric Furman
Re: Defending OpenBSD Performance
Tony Abernethy
Re: The Atheros story in much fewer words
git
:
Oliver Kullmann
Re: how to move with history?
Junio C Hamano
Re: [PATCH 2/3] git-add--interactive: remove hunk coalescing
Shawn O. Pearce
Re: Bugs in Gitosis
Alex Riesen
Re: git exclude patterns for directory
David Kastrup
Re: I'm a total push-over..
Colocation donated by:
Syndicate