From: Mike Frysinger <vapier@gentoo.org>
To: Fengguang Wu <fengguang.wu@intel.com>
Cc: David Howells <dhowells@redhat.com>,
Rusty Russell <rusty@rustcorp.com.au>,
Arnd Bergmann <arnd@arndb.de>,
linux-arch@vger.kernel.org, Ralf Baechle <ralf@linux-mips.org>,
Sam Ravnborg <sam@ravnborg.org>,
uclinux-dist-devel@blackfin.uclinux.org
Subject: Re: [PATCH] Make most arch asm/module.h files use asm-generic/module.h [ver #2]
Date: Thu, 19 Jul 2012 09:30:13 -0400 [thread overview]
Message-ID: <201207190930.16560.vapier@gentoo.org> (raw)
In-Reply-To: <20120719130703.GA17751@localhost>
[-- Attachment #1: Type: Text/Plain, Size: 1574 bytes --]
On Thursday 19 July 2012 09:07:03 Fengguang Wu wrote:
> On Thu, Jul 19, 2012 at 12:40:46PM +0100, David Howells wrote:
> > David Howells <dhowells@redhat.com> wrote:
> > > +static inline int apply_relocate(Elf_Shdr *sechdrs,
> > > + const char *strtab,
> > > + unsigned int symindex,
> > > + unsigned int relsec,
> > > + struct module *me)
> > > +{
> > > + pr_err("module %s: REL relocation unsupported\n", me->name);
> > > + return -ENOEXEC;
> > > +}
> >
> > Turns out you cannot use pr_err() and friends in a header file, lest it
> > get included in a file that defines pr_fmt() to be something
> > inconvenient.
> >
> > Thanks to Fengguang and his GIT tree cruncher for finding this in
> > Blackfin with the BF526-EZBRD_defconfig.
>
> For completeness, here are the error messages and David's comments:
> >> In file included from arch/blackfin/kernel/module.c:9:0:
> >> include/linux/moduleloader.h: In function 'apply_relocate':
> >> include/linux/moduleloader.h:48:2: error: 'mod' undeclared (first use in
> >> this function) include/linux/moduleloader.h:48:2: note: each undeclared
> >> identifier is reported only once for each function it appears in
> >
> >pr_err() is the problem. If you're in a file that defines pr_fmt then it
> >will
> >
> >use that. At the top of arch/blackfin/kernel/module.c:
> > #define pr_fmt(fmt) "module %s: " fmt, mod->name
> >
> >I guess you can't use pr_err() in header files.
if it were "mod" instead of "me" in the variable list, i imagine it'd compile
OK ;)
-mike
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2012-07-19 13:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-18 14:50 [PATCH] Make most arch asm/module.h files use asm-generic/module.h [ver #2] David Howells
2012-07-19 11:40 ` David Howells
2012-07-19 13:07 ` Fengguang Wu
2012-07-19 13:30 ` Mike Frysinger [this message]
2012-07-20 8:13 ` Sam Ravnborg
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=201207190930.16560.vapier@gentoo.org \
--to=vapier@gentoo.org \
--cc=arnd@arndb.de \
--cc=dhowells@redhat.com \
--cc=fengguang.wu@intel.com \
--cc=linux-arch@vger.kernel.org \
--cc=ralf@linux-mips.org \
--cc=rusty@rustcorp.com.au \
--cc=sam@ravnborg.org \
--cc=uclinux-dist-devel@blackfin.uclinux.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.