diff options
author | James Morris <james.l.morris@oracle.com> | 2012-05-03 22:46:40 -0400 |
---|---|---|
committer | James Morris <james.l.morris@oracle.com> | 2012-05-03 22:46:40 -0400 |
commit | 898bfc1d46bd76f8ea2a0fbd239dd2073efe2aa3 (patch) | |
tree | e6e666085abe674dbf6292555961fe0a0f2e2d2f /lib | |
parent | 08162e6a23d476544adfe1164afe9ea8b34ab859 (diff) | |
parent | 69964ea4c7b68c9399f7977aa5b9aa6539a6a98a (diff) |
Merge tag 'v3.4-rc5' into next
Linux 3.4-rc5
Merge to pull in prerequisite change for Smack:
86812bb0de1a3758dc6c7aa01a763158a7c0638a
Requested by Casey.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/kobject.c | 14 | ||||
-rw-r--r-- | lib/mpi/mpi-bit.c | 5 |
2 files changed, 10 insertions, 9 deletions
diff --git a/lib/kobject.c b/lib/kobject.c index 21dee7c19afd..aeefa8bc8b1c 100644 --- a/lib/kobject.c +++ b/lib/kobject.c | |||
@@ -192,14 +192,14 @@ static int kobject_add_internal(struct kobject *kobj) | |||
192 | 192 | ||
193 | /* be noisy on error issues */ | 193 | /* be noisy on error issues */ |
194 | if (error == -EEXIST) | 194 | if (error == -EEXIST) |
195 | printk(KERN_ERR "%s failed for %s with " | 195 | WARN(1, "%s failed for %s with " |
196 | "-EEXIST, don't try to register things with " | 196 | "-EEXIST, don't try to register things with " |
197 | "the same name in the same directory.\n", | 197 | "the same name in the same directory.\n", |
198 | __func__, kobject_name(kobj)); | 198 | __func__, kobject_name(kobj)); |
199 | else | 199 | else |
200 | printk(KERN_ERR "%s failed for %s (%d)\n", | 200 | WARN(1, "%s failed for %s (error: %d parent: %s)\n", |
201 | __func__, kobject_name(kobj), error); | 201 | __func__, kobject_name(kobj), error, |
202 | dump_stack(); | 202 | parent ? kobject_name(parent) : "'none'"); |
203 | } else | 203 | } else |
204 | kobj->state_in_sysfs = 1; | 204 | kobj->state_in_sysfs = 1; |
205 | 205 | ||
diff --git a/lib/mpi/mpi-bit.c b/lib/mpi/mpi-bit.c index 2f526627e4f5..0c505361da19 100644 --- a/lib/mpi/mpi-bit.c +++ b/lib/mpi/mpi-bit.c | |||
@@ -177,8 +177,8 @@ int mpi_rshift(MPI x, MPI a, unsigned n) | |||
177 | */ | 177 | */ |
178 | int mpi_lshift_limbs(MPI a, unsigned int count) | 178 | int mpi_lshift_limbs(MPI a, unsigned int count) |
179 | { | 179 | { |
180 | mpi_ptr_t ap = a->d; | 180 | const int n = a->nlimbs; |
181 | int n = a->nlimbs; | 181 | mpi_ptr_t ap; |
182 | int i; | 182 | int i; |
183 | 183 | ||
184 | if (!count || !n) | 184 | if (!count || !n) |
@@ -187,6 +187,7 @@ int mpi_lshift_limbs(MPI a, unsigned int count) | |||
187 | if (RESIZE_IF_NEEDED(a, n + count) < 0) | 187 | if (RESIZE_IF_NEEDED(a, n + count) < 0) |
188 | return -ENOMEM; | 188 | return -ENOMEM; |
189 | 189 | ||
190 | ap = a->d; | ||
190 | for (i = n - 1; i >= 0; i--) | 191 | for (i = n - 1; i >= 0; i--) |
191 | ap[i + count] = ap[i]; | 192 | ap[i + count] = ap[i]; |
192 | for (i = 0; i < count; i++) | 193 | for (i = 0; i < count; i++) |