All of lore.kernel.org
 help / color / mirror / Atom feed
From: j.neuschaefer@gmx.net (Jonathan Neuschäfer)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Fwd: Problem: plist_add undefined!
Date: Wed, 21 Dec 2011 23:34:11 +0100	[thread overview]
Message-ID: <20111221223411.GB1513@debian.debian> (raw)
In-Reply-To: <CAAVPGONhKHfKaHXABHXsWhbJTty0vLVWGStv0wBAndbAeDfkaw@mail.gmail.com>

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

Hope This Helps,
	Jonathan Neusch?fer

  reply	other threads:[~2011-12-21 22:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-20  9:24 Problem: plist_add undefined! Monica Puig-Pey
2011-12-20  9:24 ` Monica Puig-Pey
2011-12-21 21:46 ` Fwd: " Julie Sullivan
2011-12-21 22:34   ` Jonathan Neuschäfer [this message]
2011-12-22  3:51 ` Steven Rostedt
2011-12-22  3:51   ` Steven Rostedt

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=20111221223411.GB1513@debian.debian \
    --to=j.neuschaefer@gmx.net \
    --cc=kernelnewbies@lists.kernelnewbies.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.