From mboxrd@z Thu Jan 1 00:00:00 1970 From: j.neuschaefer@gmx.net (Jonathan =?utf-8?Q?Neusch=C3=A4fer?=) Date: Wed, 21 Dec 2011 23:34:11 +0100 Subject: Fwd: Problem: plist_add undefined! In-Reply-To: References: <4EF05465.7050507@unican.es> Message-ID: <20111221223411.GB1513@debian.debian> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org Monica Puig-Pey wrote: > ?An error is produced when using the MACROs: > ? ?- PLIST_HEAD_INIT(head, _lock) In the version i'm looking at (v3.2-rc5) PLIST_NODE_INIT takes only one argument. > ? ?- PLIST_NODE_INIT(node, __prio) > > ?it says : > > > /home/monica/Escritorio/plists/priolist.c: In function 'init_module': > /home/monica/Escritorio/plists/priolist.c:67: error: expected > expression before '.' token You need to use it like this: struct plist_head head = PLIST_HEAD_INIT(head); (it can only be used for static initializations) > ?WARNING: "plist_add" [/home/monica/Escritorio/plists/priolist.ko] undefined! ? > > ?I made the module GPL, I don't know what am I doing wrong. > > Does anybody have an idea what is happening? Hmm. plist_add and plist_del seem to be lacking EXPORT_SYMBOL alltogether; could you try compiling with this patch as a workaround? ---------------------------------------- diff --git a/lib/plist.c b/lib/plist.c index a0a4da4..e9cca99 100644 --- a/lib/plist.c +++ b/lib/plist.c @@ -133,6 +133,9 @@ void plist_del(struct plist_node *node, struct plist_head *head) plist_check_head(head); } +EXPORT_SYMBOL(plist_add); +EXPORT_SYMBOL(plist_del); + #ifdef CONFIG_DEBUG_PI_LIST #include #include ---------------------------------------- Hope This Helps, Jonathan Neusch?fer