diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Kconfig.debug | 1 | ||||
-rw-r--r-- | lib/kobject.c | 3 | ||||
-rw-r--r-- | lib/rwsem-spinlock.c | 6 | ||||
-rw-r--r-- | lib/rwsem.c | 4 | ||||
-rw-r--r-- | lib/sort.c | 2 | ||||
-rw-r--r-- | lib/string.c | 8 |
6 files changed, 16 insertions, 8 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 426a0cf7b11c..ac23847ce0e3 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
@@ -108,6 +108,7 @@ config DEBUG_HIGHMEM | |||
108 | 108 | ||
109 | config DEBUG_BUGVERBOSE | 109 | config DEBUG_BUGVERBOSE |
110 | bool "Verbose BUG() reporting (adds 70K)" if DEBUG_KERNEL && EMBEDDED | 110 | bool "Verbose BUG() reporting (adds 70K)" if DEBUG_KERNEL && EMBEDDED |
111 | depends on BUG | ||
111 | depends on ARM || ARM26 || M32R || M68K || SPARC32 || SPARC64 || (X86 && !X86_64) || FRV | 112 | depends on ARM || ARM26 || M32R || M68K || SPARC32 || SPARC64 || (X86 && !X86_64) || FRV |
112 | default !EMBEDDED | 113 | default !EMBEDDED |
113 | help | 114 | help |
diff --git a/lib/kobject.c b/lib/kobject.c index 5df8441c44e7..94048826624c 100644 --- a/lib/kobject.c +++ b/lib/kobject.c | |||
@@ -216,13 +216,12 @@ int kobject_register(struct kobject * kobj) | |||
216 | /** | 216 | /** |
217 | * kobject_set_name - Set the name of an object | 217 | * kobject_set_name - Set the name of an object |
218 | * @kobj: object. | 218 | * @kobj: object. |
219 | * @name: name. | 219 | * @fmt: format string used to build the name |
220 | * | 220 | * |
221 | * If strlen(name) >= KOBJ_NAME_LEN, then use a dynamically allocated | 221 | * If strlen(name) >= KOBJ_NAME_LEN, then use a dynamically allocated |
222 | * string that @kobj->k_name points to. Otherwise, use the static | 222 | * string that @kobj->k_name points to. Otherwise, use the static |
223 | * @kobj->name array. | 223 | * @kobj->name array. |
224 | */ | 224 | */ |
225 | |||
226 | int kobject_set_name(struct kobject * kobj, const char * fmt, ...) | 225 | int kobject_set_name(struct kobject * kobj, const char * fmt, ...) |
227 | { | 226 | { |
228 | int error = 0; | 227 | int error = 0; |
diff --git a/lib/rwsem-spinlock.c b/lib/rwsem-spinlock.c index 21f0db2c9711..40ffde940a86 100644 --- a/lib/rwsem-spinlock.c +++ b/lib/rwsem-spinlock.c | |||
@@ -76,7 +76,7 @@ __rwsem_do_wake(struct rw_semaphore *sem, int wakewrite) | |||
76 | list_del(&waiter->list); | 76 | list_del(&waiter->list); |
77 | tsk = waiter->task; | 77 | tsk = waiter->task; |
78 | /* Don't touch waiter after ->task has been NULLed */ | 78 | /* Don't touch waiter after ->task has been NULLed */ |
79 | mb(); | 79 | smp_mb(); |
80 | waiter->task = NULL; | 80 | waiter->task = NULL; |
81 | wake_up_process(tsk); | 81 | wake_up_process(tsk); |
82 | put_task_struct(tsk); | 82 | put_task_struct(tsk); |
@@ -91,7 +91,7 @@ __rwsem_do_wake(struct rw_semaphore *sem, int wakewrite) | |||
91 | 91 | ||
92 | list_del(&waiter->list); | 92 | list_del(&waiter->list); |
93 | tsk = waiter->task; | 93 | tsk = waiter->task; |
94 | mb(); | 94 | smp_mb(); |
95 | waiter->task = NULL; | 95 | waiter->task = NULL; |
96 | wake_up_process(tsk); | 96 | wake_up_process(tsk); |
97 | put_task_struct(tsk); | 97 | put_task_struct(tsk); |
@@ -123,7 +123,7 @@ __rwsem_wake_one_writer(struct rw_semaphore *sem) | |||
123 | list_del(&waiter->list); | 123 | list_del(&waiter->list); |
124 | 124 | ||
125 | tsk = waiter->task; | 125 | tsk = waiter->task; |
126 | mb(); | 126 | smp_mb(); |
127 | waiter->task = NULL; | 127 | waiter->task = NULL; |
128 | wake_up_process(tsk); | 128 | wake_up_process(tsk); |
129 | put_task_struct(tsk); | 129 | put_task_struct(tsk); |
diff --git a/lib/rwsem.c b/lib/rwsem.c index 7644089ec8fa..62fa4eba9ffe 100644 --- a/lib/rwsem.c +++ b/lib/rwsem.c | |||
@@ -74,7 +74,7 @@ __rwsem_do_wake(struct rw_semaphore *sem, int downgrading) | |||
74 | */ | 74 | */ |
75 | list_del(&waiter->list); | 75 | list_del(&waiter->list); |
76 | tsk = waiter->task; | 76 | tsk = waiter->task; |
77 | mb(); | 77 | smp_mb(); |
78 | waiter->task = NULL; | 78 | waiter->task = NULL; |
79 | wake_up_process(tsk); | 79 | wake_up_process(tsk); |
80 | put_task_struct(tsk); | 80 | put_task_struct(tsk); |
@@ -117,7 +117,7 @@ __rwsem_do_wake(struct rw_semaphore *sem, int downgrading) | |||
117 | waiter = list_entry(next, struct rwsem_waiter, list); | 117 | waiter = list_entry(next, struct rwsem_waiter, list); |
118 | next = waiter->list.next; | 118 | next = waiter->list.next; |
119 | tsk = waiter->task; | 119 | tsk = waiter->task; |
120 | mb(); | 120 | smp_mb(); |
121 | waiter->task = NULL; | 121 | waiter->task = NULL; |
122 | wake_up_process(tsk); | 122 | wake_up_process(tsk); |
123 | put_task_struct(tsk); | 123 | put_task_struct(tsk); |
diff --git a/lib/sort.c b/lib/sort.c index ea3caedeabdb..b73dbb0e7c83 100644 --- a/lib/sort.c +++ b/lib/sort.c | |||
@@ -90,7 +90,7 @@ int cmpint(const void *a, const void *b) | |||
90 | 90 | ||
91 | static int sort_test(void) | 91 | static int sort_test(void) |
92 | { | 92 | { |
93 | int *a, i, r = 0; | 93 | int *a, i, r = 1; |
94 | 94 | ||
95 | a = kmalloc(1000 * sizeof(int), GFP_KERNEL); | 95 | a = kmalloc(1000 * sizeof(int), GFP_KERNEL); |
96 | BUG_ON(!a); | 96 | BUG_ON(!a); |
diff --git a/lib/string.c b/lib/string.c index 4bb93ad23c60..d886ef157c12 100644 --- a/lib/string.c +++ b/lib/string.c | |||
@@ -65,6 +65,7 @@ EXPORT_SYMBOL(strnicmp); | |||
65 | * @dest: Where to copy the string to | 65 | * @dest: Where to copy the string to |
66 | * @src: Where to copy the string from | 66 | * @src: Where to copy the string from |
67 | */ | 67 | */ |
68 | #undef strcpy | ||
68 | char * strcpy(char * dest,const char *src) | 69 | char * strcpy(char * dest,const char *src) |
69 | { | 70 | { |
70 | char *tmp = dest; | 71 | char *tmp = dest; |
@@ -85,6 +86,10 @@ EXPORT_SYMBOL(strcpy); | |||
85 | * | 86 | * |
86 | * The result is not %NUL-terminated if the source exceeds | 87 | * The result is not %NUL-terminated if the source exceeds |
87 | * @count bytes. | 88 | * @count bytes. |
89 | * | ||
90 | * In the case where the length of @src is less than that of | ||
91 | * count, the remainder of @dest will be padded with %NUL. | ||
92 | * | ||
88 | */ | 93 | */ |
89 | char * strncpy(char * dest,const char *src,size_t count) | 94 | char * strncpy(char * dest,const char *src,size_t count) |
90 | { | 95 | { |
@@ -132,6 +137,7 @@ EXPORT_SYMBOL(strlcpy); | |||
132 | * @dest: The string to be appended to | 137 | * @dest: The string to be appended to |
133 | * @src: The string to append to it | 138 | * @src: The string to append to it |
134 | */ | 139 | */ |
140 | #undef strcat | ||
135 | char * strcat(char * dest, const char * src) | 141 | char * strcat(char * dest, const char * src) |
136 | { | 142 | { |
137 | char *tmp = dest; | 143 | char *tmp = dest; |
@@ -209,6 +215,7 @@ EXPORT_SYMBOL(strlcat); | |||
209 | * @cs: One string | 215 | * @cs: One string |
210 | * @ct: Another string | 216 | * @ct: Another string |
211 | */ | 217 | */ |
218 | #undef strcmp | ||
212 | int strcmp(const char * cs,const char * ct) | 219 | int strcmp(const char * cs,const char * ct) |
213 | { | 220 | { |
214 | register signed char __res; | 221 | register signed char __res; |
@@ -514,6 +521,7 @@ EXPORT_SYMBOL(memmove); | |||
514 | * @ct: Another area of memory | 521 | * @ct: Another area of memory |
515 | * @count: The size of the area. | 522 | * @count: The size of the area. |
516 | */ | 523 | */ |
524 | #undef memcmp | ||
517 | int memcmp(const void * cs,const void * ct,size_t count) | 525 | int memcmp(const void * cs,const void * ct,size_t count) |
518 | { | 526 | { |
519 | const unsigned char *su1, *su2; | 527 | const unsigned char *su1, *su2; |