Re: Fwd: Problem: plist_add undefined!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Monica Puig-Pey <puigpeym@xxxxxxxxx> 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)
 #include <linux/sched.h>
 #include <linux/module.h>

Hope This Helps,
	Jonathan Neuschäfer

Kernelnewbies mailing list

[Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Networking]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]

Add to Google Powered by Linux