Re: linux-next: build warnings after merge of the modules tree

2013-11-05 Thread Stephen Rothwell
Hi Rusty,

On Tue, 5 Nov 2013 06:17:02 -0800 Andi Kleen  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 
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 
Tested-by: Andi Kleen 
Signed-off-by: Rusty Russell 

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 Rothwells...@canb.auug.org.au


pgp0B2rbjNjkP.pgp
Description: PGP signature


Re: linux-next: build warnings after merge of the modules tree

2013-11-05 Thread Andi Kleen
> 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.

-Andi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: linux-next: build warnings after merge of the modules tree

2013-11-05 Thread Andi Kleen
 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.

-Andi
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: linux-next: build warnings after merge of the modules tree

2013-11-05 Thread Stephen Rothwell
Hi Rusty,

On Tue, 5 Nov 2013 06:17:02 -0800 Andi Kleen a...@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 ru...@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 s...@canb.auug.org.au
Tested-by: Andi Kleen a...@linux.intel.com
Signed-off-by: Rusty Russell ru...@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 Rothwells...@canb.auug.org.au


pgp0B2rbjNjkP.pgp
Description: PGP signature


Re: linux-next: build warnings after merge of the modules tree

2013-11-04 Thread Rusty Russell
Stephen Rothwell  writes:
> Hi Rusty,
>
> After merging the modules tree, today's linux-next build (x86_64
> allmodconfig) produced these warning:
>
> WARNING: vmlinux: 'pci_restore_msi_state' exported twice. Previous export was 
> in vmlinux
> WARNING: vmlinux: '__mod_zone_page_state' exported twice. Previous export was 
> in vmlinux
> WARNING: vmlinux: 'scsi_prep_return' exported twice. Previous export was in 
> vmlinux
> WARNING: vmlinux: 'hvc_poll' exported twice. Previous export was in vmlinux
> WARNING: vmlinux: 'nfs_clear_inode' exported twice. Previous export was in 
> vmlinux
>
> (just some samples ... it scrolled off my scrollback :-()
>
> Presumably caused by commit e0f244c63fc9 ("asmlinkage, module: Make
> ksymtab and kcrctab symbols and __this_module __visible").  (reverting
> that commit makes the warnings go away.)

This works for me feedback please!

Cheers,
Rusty.

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.

Signed-off-by: Rusty Russell 

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;
 }
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: linux-next: build warnings after merge of the modules tree

2013-11-04 Thread Rusty Russell
Stephen Rothwell s...@canb.auug.org.au writes:
 Hi Rusty,

 After merging the modules tree, today's linux-next build (x86_64
 allmodconfig) produced these warning:

 WARNING: vmlinux: 'pci_restore_msi_state' exported twice. Previous export was 
 in vmlinux
 WARNING: vmlinux: '__mod_zone_page_state' exported twice. Previous export was 
 in vmlinux
 WARNING: vmlinux: 'scsi_prep_return' exported twice. Previous export was in 
 vmlinux
 WARNING: vmlinux: 'hvc_poll' exported twice. Previous export was in vmlinux
 WARNING: vmlinux: 'nfs_clear_inode' exported twice. Previous export was in 
 vmlinux

 (just some samples ... it scrolled off my scrollback :-()

 Presumably caused by commit e0f244c63fc9 (asmlinkage, module: Make
 ksymtab and kcrctab symbols and __this_module __visible).  (reverting
 that commit makes the warnings go away.)

This works for me feedback please!

Cheers,
Rusty.

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.

Signed-off-by: Rusty Russell ru...@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;
 }
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


linux-next: build warnings after merge of the modules tree

2013-11-03 Thread Stephen Rothwell
Hi Rusty,

After merging the modules tree, today's linux-next build (x86_64
allmodconfig) produced these warning:

WARNING: vmlinux: 'pci_restore_msi_state' exported twice. Previous export was 
in vmlinux
WARNING: vmlinux: '__mod_zone_page_state' exported twice. Previous export was 
in vmlinux
WARNING: vmlinux: 'scsi_prep_return' exported twice. Previous export was in 
vmlinux
WARNING: vmlinux: 'hvc_poll' exported twice. Previous export was in vmlinux
WARNING: vmlinux: 'nfs_clear_inode' exported twice. Previous export was in 
vmlinux

(just some samples ... it scrolled off my scrollback :-()

Presumably caused by commit e0f244c63fc9 ("asmlinkage, module: Make
ksymtab and kcrctab symbols and __this_module __visible").  (reverting
that commit makes the warnings go away.)

I have used the modules tree from next-20131101 for today.
-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au


pgpWN25W4SEwV.pgp
Description: PGP signature


linux-next: build warnings after merge of the modules tree

2013-11-03 Thread Stephen Rothwell
Hi Rusty,

After merging the modules tree, today's linux-next build (x86_64
allmodconfig) produced these warning:

WARNING: vmlinux: 'pci_restore_msi_state' exported twice. Previous export was 
in vmlinux
WARNING: vmlinux: '__mod_zone_page_state' exported twice. Previous export was 
in vmlinux
WARNING: vmlinux: 'scsi_prep_return' exported twice. Previous export was in 
vmlinux
WARNING: vmlinux: 'hvc_poll' exported twice. Previous export was in vmlinux
WARNING: vmlinux: 'nfs_clear_inode' exported twice. Previous export was in 
vmlinux

(just some samples ... it scrolled off my scrollback :-()

Presumably caused by commit e0f244c63fc9 (asmlinkage, module: Make
ksymtab and kcrctab symbols and __this_module __visible).  (reverting
that commit makes the warnings go away.)

I have used the modules tree from next-20131101 for today.
-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au


pgpWN25W4SEwV.pgp
Description: PGP signature