linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Andi Kleen <ak@linux.intel.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>,
	linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-kbuild@vger.kernel.org
Subject: Re: linux-next: build warnings after merge of the modules tree
Date: Wed, 6 Nov 2013 10:07:41 +1100	[thread overview]
Message-ID: <20131106100741.6dd82590c3a24f6a32fce247@canb.auug.org.au> (raw)
In-Reply-To: <20131105141702.GE1962@tassilo.jf.intel.com>

[-- Attachment #1: Type: text/plain, Size: 2068 bytes --]

Hi Rusty,

On Tue, 5 Nov 2013 06:17:02 -0800 Andi Kleen <ak@linux.intel.com> wrote:
>
> > modpost creates an entry when it sees the CRC, then when it sees the
> > actual symbol, it complains that it's seen it before.  The preloaded
> > flag already exists for the equivalent case where we loaded from
> > Module.symvers, so use that.
> 
> Looks good. Thanks for fixing.

I added this as a merge fix today (thanks):

From: Rusty Russell <rusty@rustcorp.com.au>
Subject: modpost: fix bogus 'exported twice' warnings.

Andi's change in e0f244c63fc9 ("asmlinkage, module: Make ksymtab and
kcrctab symbols and __this_module __visible") make the crc appear
first in the symbol table.

modpost creates an entry when it sees the CRC, then when it sees the
actual symbol, it complains that it's seen it before.  The preloaded
flag already exists for the equivalent case where we loaded from
Module.symvers, so use that.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Tested-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 9b873ac6ed7b..5c677a3e7487 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -164,7 +164,7 @@ struct symbol {
 	unsigned int vmlinux:1;    /* 1 if symbol is defined in vmlinux */
 	unsigned int kernel:1;     /* 1 if symbol is from kernel
 				    *  (only for external modules) **/
-	unsigned int preloaded:1;  /* 1 if symbol from Module.symvers */
+	unsigned int preloaded:1;  /* 1 if symbol from Module.symvers, or crc */
 	enum export  export;       /* Type of export */
 	char name[0];
 };
@@ -332,8 +332,11 @@ static void sym_update_crc(const char *name, struct module *mod,
 {
 	struct symbol *s = find_symbol(name);
 
-	if (!s)
+	if (!s) {
 		s = new_symbol(name, mod, export);
+		/* Don't complain when we find it later. */
+		s->preloaded = 1;
+	}
 	s->crc = crc;
 	s->crc_valid = 1;
 }

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

      reply	other threads:[~2013-11-05 23:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-04  2:41 linux-next: build warnings after merge of the modules tree Stephen Rothwell
2013-11-05  2:20 ` Rusty Russell
2013-11-05 14:17   ` Andi Kleen
2013-11-05 23:07     ` Stephen Rothwell [this message]

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=20131106100741.6dd82590c3a24f6a32fce247@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=ak@linux.intel.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).