public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] namespace: add source file location exceptions
@ 2010-10-13 22:58 Stephen Hemminger
  2010-10-27 22:31 ` Michal Marek
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Hemminger @ 2010-10-13 22:58 UTC (permalink / raw)
  To: Amerigo Wang, Andrew Morton, Michal Marek; +Cc: linux-kernel

Teach namespace checker about some special case files where the
source is in unusual location.  This fixes many of the source file
not found errors (more can be added), and also prevents false positives
for functions not being used.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
---
Applies after previous patches by Amerigo Wang

--- a/scripts/namespace.pl	2010-10-13 15:01:56.695801914 -0700
+++ b/scripts/namespace.pl	2010-10-13 15:29:15.454600976 -0700
@@ -141,6 +141,26 @@ my %nameexception = (
     'VDSO32_sigreturn'	=> 1,
 );
 
+# Files with exceptions to source file location
+my %sourceloc = (
+    'net/dccp/dccp_probe.o'	=> 'probe',
+    'net/dccp/dccp_ipv4.o'	=> 'ipv4',
+    'net/dccp/dccp_ipv6.o'	=> 'ipv6',
+    'net/dccp/dccp_diag.o'	=> 'diag',
+    'drivers/char/hw_random/rng-core.o'	=> 'core',
+    'fs/fat/msdos.o'		=> 'namei_msdos',
+    'fs/fat/vfat.o'		=> 'namei_vfat',
+    'fs/nfs_common/nfs_acl.o'	=> 'nfsacl',
+    'sound/soundcore.o'		=> 'sound_core',
+    'drivers/md/dm-mirror.o'	=> 'dm-raid1',
+    'drivers/message/i2o/i2o_bus.o' => 'bus-osm',
+    'arch/x86/kvm/kvm-amd.o'	=> 'svm',
+    'arch/x86/kvm/kvm-intel.o'	=> 'vmx',
+    'arch/x86/crypto/twofish-x86_64.o' => 'twofish-x86_64-asm_64',
+    'arch/x86/crypto/aes-x86_64.o' => 'aes-x86_64-asm_64',
+    'arch/x86/crypto/aesni-intel.o' => 'aesni-intel_asm',
+    'arch/x86/crypto/salsa20-x86_64.o' => 'salsa20-x86_64-asm_64',
+);
 
 &find(\&linux_objects, '.');	# find the objects and do_nm on them
 &list_multiply_defined();
@@ -228,11 +248,15 @@ sub do_nm
 		return;
 	}
 	($source = $basename) =~ s/\.o$//;
+
+	$source = $sourceloc{$fullname} if ($sourceloc{$fullname});
+
 	if (-e "$source.c" || -e "$source.S") {
 		$source = "$objtree$File::Find::dir/$source";
 	} else {
 		$source = "$srctree$File::Find::dir/$source";
 	}
+
 	if (! -e "$source.c" && ! -e "$source.S") {
 		# No obvious source, exclude the object if it is conglomerate
 	        open(my $objdumpdata, "$objdump $basename|")

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] namespace: add source file location exceptions
  2010-10-13 22:58 [PATCH] namespace: add source file location exceptions Stephen Hemminger
@ 2010-10-27 22:31 ` Michal Marek
  2010-10-27 22:41   ` Stephen Hemminger
  0 siblings, 1 reply; 4+ messages in thread
From: Michal Marek @ 2010-10-27 22:31 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Amerigo Wang, Andrew Morton, linux-kernel

On 14.10.2010 00:58, Stephen Hemminger wrote:
> Teach namespace checker about some special case files where the
> source is in unusual location.  This fixes many of the source file
> not found errors (more can be added), and also prevents false positives
> for functions not being used.
> 
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
> ---
> Applies after previous patches by Amerigo Wang

Applied to kbuild-2.6.git#misc, sorry for the delay.

Michal

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] namespace: add source file location exceptions
  2010-10-27 22:31 ` Michal Marek
@ 2010-10-27 22:41   ` Stephen Hemminger
  2010-10-27 23:01     ` Michal Marek
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Hemminger @ 2010-10-27 22:41 UTC (permalink / raw)
  To: Michal Marek; +Cc: Amerigo Wang, Andrew Morton, linux-kernel

On Thu, 28 Oct 2010 00:31:18 +0200
Michal Marek <mmarek@suse.cz> wrote:

> On 14.10.2010 00:58, Stephen Hemminger wrote:
> > Teach namespace checker about some special case files where the
> > source is in unusual location.  This fixes many of the source file
> > not found errors (more can be added), and also prevents false positives
> > for functions not being used.
> > 
> > Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
> > ---
> > Applies after previous patches by Amerigo Wang
> 
> Applied to kbuild-2.6.git#misc, sorry for the delay.
> 
> Michal

That patch should not be included. It causes more problems than it
solves, since then there are duplicate file locations which causes
false duplicate symbol reports.

-- 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] namespace: add source file location exceptions
  2010-10-27 22:41   ` Stephen Hemminger
@ 2010-10-27 23:01     ` Michal Marek
  0 siblings, 0 replies; 4+ messages in thread
From: Michal Marek @ 2010-10-27 23:01 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Amerigo Wang, Andrew Morton, linux-kernel

On 28.10.2010 00:41, Stephen Hemminger wrote:
> That patch should not be included. It causes more problems than it
> solves, since then there are duplicate file locations which causes
> false duplicate symbol reports.

Ah, ok, thanks for the info, I reverted the patch again.

Michal

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-10-27 23:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-13 22:58 [PATCH] namespace: add source file location exceptions Stephen Hemminger
2010-10-27 22:31 ` Michal Marek
2010-10-27 22:41   ` Stephen Hemminger
2010-10-27 23:01     ` Michal Marek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox