aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-19 16:29:02 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-19 16:29:02 -0500
commit874ff01bd9183ad16495acfd54e93a619d12b8b5 (patch)
treee9527e94649fadfa705dae64018e027e51681b88 /arch/i386
parentebbe46f73a11a667df59cb8e58b371c0a35f29d0 (diff)
parent86aae08faa0069a559ba543ff3dab33fe95f891b (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial
* git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial: (25 commits) Documentation/kernel-docs.txt update. arch/cris: typo in KERN_INFO Storage class should be before const qualifier kernel/printk.c: comment fix update I/O sched Kconfig help texts - CFQ is now default, not AS. Remove duplicate listing of Cris arch from README kbuild: more doc. cleanups doc: make doc. for maxcpus= more visible drivers/net/eexpress.c: remove duplicate comment add a help text for BLK_DEV_GENERIC correct a dead URL in the IP_MULTICAST help text fix the BAYCOM_SER_HDX help text fix SCSI_SCAN_ASYNC help text trivial documentation patch for platform.txt Fix typos concerning hierarchy Fix comment typo "spin_lock_irqrestore". Fix misspellings of "agressive". drivers/scsi/a100u2w.c: trivial typo patch Correct trivial typo in log2.h. Remove useless FIND_FIRST_BIT() macro from cardbus.c. ...
Diffstat (limited to 'arch/i386')
-rw-r--r--arch/i386/boot/compressed/relocs.c9
-rw-r--r--arch/i386/kernel/topology.c2
-rw-r--r--arch/i386/oprofile/nmi_int.c14
3 files changed, 13 insertions, 12 deletions
diff --git a/arch/i386/boot/compressed/relocs.c b/arch/i386/boot/compressed/relocs.c
index 881951ca03e1..ce4fda261aaf 100644
--- a/arch/i386/boot/compressed/relocs.c
+++ b/arch/i386/boot/compressed/relocs.c
@@ -11,6 +11,7 @@
11#include <endian.h> 11#include <endian.h>
12 12
13#define MAX_SHDRS 100 13#define MAX_SHDRS 100
14#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
14static Elf32_Ehdr ehdr; 15static Elf32_Ehdr ehdr;
15static Elf32_Shdr shdr[MAX_SHDRS]; 16static Elf32_Shdr shdr[MAX_SHDRS];
16static Elf32_Sym *symtab[MAX_SHDRS]; 17static Elf32_Sym *symtab[MAX_SHDRS];
@@ -71,7 +72,7 @@ static const char *sym_type(unsigned type)
71#undef SYM_TYPE 72#undef SYM_TYPE
72 }; 73 };
73 const char *name = "unknown sym type name"; 74 const char *name = "unknown sym type name";
74 if (type < sizeof(type_name)/sizeof(type_name[0])) { 75 if (type < ARRAY_SIZE(type_name)) {
75 name = type_name[type]; 76 name = type_name[type];
76 } 77 }
77 return name; 78 return name;
@@ -87,7 +88,7 @@ static const char *sym_bind(unsigned bind)
87#undef SYM_BIND 88#undef SYM_BIND
88 }; 89 };
89 const char *name = "unknown sym bind name"; 90 const char *name = "unknown sym bind name";
90 if (bind < sizeof(bind_name)/sizeof(bind_name[0])) { 91 if (bind < ARRAY_SIZE(bind_name)) {
91 name = bind_name[bind]; 92 name = bind_name[bind];
92 } 93 }
93 return name; 94 return name;
@@ -104,7 +105,7 @@ static const char *sym_visibility(unsigned visibility)
104#undef SYM_VISIBILITY 105#undef SYM_VISIBILITY
105 }; 106 };
106 const char *name = "unknown sym visibility name"; 107 const char *name = "unknown sym visibility name";
107 if (visibility < sizeof(visibility_name)/sizeof(visibility_name[0])) { 108 if (visibility < ARRAY_SIZE(visibility_name)) {
108 name = visibility_name[visibility]; 109 name = visibility_name[visibility];
109 } 110 }
110 return name; 111 return name;
@@ -128,7 +129,7 @@ static const char *rel_type(unsigned type)
128#undef REL_TYPE 129#undef REL_TYPE
129 }; 130 };
130 const char *name = "unknown type rel type name"; 131 const char *name = "unknown type rel type name";
131 if (type < sizeof(type_name)/sizeof(type_name[0])) { 132 if (type < ARRAY_SIZE(type_name)) {
132 name = type_name[type]; 133 name = type_name[type];
133 } 134 }
134 return name; 135 return name;
diff --git a/arch/i386/kernel/topology.c b/arch/i386/kernel/topology.c
index 79cf608e14ca..45782356a618 100644
--- a/arch/i386/kernel/topology.c
+++ b/arch/i386/kernel/topology.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * arch/i386/kernel/topology.c - Populate driverfs with topology information 2 * arch/i386/kernel/topology.c - Populate sysfs with topology information
3 * 3 *
4 * Written by: Matthew Dobson, IBM Corporation 4 * Written by: Matthew Dobson, IBM Corporation
5 * Original Code: Paul Dorwin, IBM Corporation, Patrick Mochel, OSDL 5 * Original Code: Paul Dorwin, IBM Corporation, Patrick Mochel, OSDL
diff --git a/arch/i386/oprofile/nmi_int.c b/arch/i386/oprofile/nmi_int.c
index 3700eef78743..8fda7be9dd4d 100644
--- a/arch/i386/oprofile/nmi_int.c
+++ b/arch/i386/oprofile/nmi_int.c
@@ -63,7 +63,7 @@ static struct sys_device device_oprofile = {
63}; 63};
64 64
65 65
66static int __init init_driverfs(void) 66static int __init init_sysfs(void)
67{ 67{
68 int error; 68 int error;
69 if (!(error = sysdev_class_register(&oprofile_sysclass))) 69 if (!(error = sysdev_class_register(&oprofile_sysclass)))
@@ -72,15 +72,15 @@ static int __init init_driverfs(void)
72} 72}
73 73
74 74
75static void exit_driverfs(void) 75static void exit_sysfs(void)
76{ 76{
77 sysdev_unregister(&device_oprofile); 77 sysdev_unregister(&device_oprofile);
78 sysdev_class_unregister(&oprofile_sysclass); 78 sysdev_class_unregister(&oprofile_sysclass);
79} 79}
80 80
81#else 81#else
82#define init_driverfs() do { } while (0) 82#define init_sysfs() do { } while (0)
83#define exit_driverfs() do { } while (0) 83#define exit_sysfs() do { } while (0)
84#endif /* CONFIG_PM */ 84#endif /* CONFIG_PM */
85 85
86static int profile_exceptions_notify(struct notifier_block *self, 86static int profile_exceptions_notify(struct notifier_block *self,
@@ -385,7 +385,7 @@ static int __init ppro_init(char ** cpu_type)
385 return 1; 385 return 1;
386} 386}
387 387
388/* in order to get driverfs right */ 388/* in order to get sysfs right */
389static int using_nmi; 389static int using_nmi;
390 390
391int __init op_nmi_init(struct oprofile_operations *ops) 391int __init op_nmi_init(struct oprofile_operations *ops)
@@ -440,7 +440,7 @@ int __init op_nmi_init(struct oprofile_operations *ops)
440 return -ENODEV; 440 return -ENODEV;
441 } 441 }
442 442
443 init_driverfs(); 443 init_sysfs();
444 using_nmi = 1; 444 using_nmi = 1;
445 ops->create_files = nmi_create_files; 445 ops->create_files = nmi_create_files;
446 ops->setup = nmi_setup; 446 ops->setup = nmi_setup;
@@ -456,5 +456,5 @@ int __init op_nmi_init(struct oprofile_operations *ops)
456void op_nmi_exit(void) 456void op_nmi_exit(void)
457{ 457{
458 if (using_nmi) 458 if (using_nmi)
459 exit_driverfs(); 459 exit_sysfs();
460} 460}