[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070302230214.GC22555@uranus.ravnborg.org>
Date: Sat, 3 Mar 2007 00:02:14 +0100
From: Sam Ravnborg <sam@...nborg.org>
To: Greg KH <greg@...ah.com>
Cc: LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH,RFC] pci: do not mark exported functions as __devinit
>
> Yes, we allow them to be exported globally, as other init code might
> need to call them, like these functions.
>
> So yes, I think we need to find a way to fix the warning tools, as the
> code is correct here.
This was the patch that I made to ignore these.
It is on top of other pending changes to modpost so it will not
apply.
I had to check for _ksymtab* because we have various
section names for ksymtab. (_gpl, _future etc.)
Sam
---
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 9042039..9e80dc5 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -625,6 +625,13 @@ static int strrcmp(const char *s, const char *sub)
* tosec = .init.data
* fromsec = .text*
* refsymname = logo_
+ *
+ * Pattern 8:
+ * Symbols exported may be marked __init because we need to
+ * export functions that are only used by init function.
+ * The pattern is:
+ * tosec = .init.text
+ * fromsec = __ksymtab*
**/
static int secref_whitelist(const char *modname, const char *tosec,
const char *fromsec, const char *atsym,
@@ -702,6 +709,10 @@ static int secref_whitelist(const char *modname, const char *tosec,
(strncmp(fromsec, ".text", strlen(".text")) == 0) &&
(strncmp(refsymname, "logo_", strlen("logo_")) == 0))
return 1;
+ /* Check for pattern 8 */
+ if ((strcmp(tosec, ".init.text") == 0) &&
+ (strncmp(fromsec, "__ksymtab", strlen("__ksymtab")) == 0))
+ return 1;
return 0;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists