diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-05-02 17:33:37 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-05-02 17:33:37 -0400 |
commit | eb1574270a6de8fb8d31ffc3b021e30df0afcda3 (patch) | |
tree | d154ba369f222f5108ed1a2462d815d7faadc2e5 /lib | |
parent | aac10aaa8cc65a6fef6f5bc7d0b96035b0225a61 (diff) | |
parent | 69964ea4c7b68c9399f7977aa5b9aa6539a6a98a (diff) |
Merge 3.4-rc5 into driver-core-next
This was done to resolve a merge issue with the init/main.c file.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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 bbffa2110d43..38fcc60e661b 100644 --- a/lib/kobject.c +++ b/lib/kobject.c | |||
@@ -190,14 +190,14 @@ static int kobject_add_internal(struct kobject *kobj) | |||
190 | 190 | ||
191 | /* be noisy on error issues */ | 191 | /* be noisy on error issues */ |
192 | if (error == -EEXIST) | 192 | if (error == -EEXIST) |
193 | printk(KERN_ERR "%s failed for %s with " | 193 | WARN(1, "%s failed for %s with " |
194 | "-EEXIST, don't try to register things with " | 194 | "-EEXIST, don't try to register things with " |
195 | "the same name in the same directory.\n", | 195 | "the same name in the same directory.\n", |
196 | __func__, kobject_name(kobj)); | 196 | __func__, kobject_name(kobj)); |
197 | else | 197 | else |
198 | printk(KERN_ERR "%s failed for %s (%d)\n", | 198 | WARN(1, "%s failed for %s (error: %d parent: %s)\n", |
199 | __func__, kobject_name(kobj), error); | 199 | __func__, kobject_name(kobj), error, |
200 | dump_stack(); | 200 | parent ? kobject_name(parent) : "'none'"); |
201 | } else | 201 | } else |
202 | kobj->state_in_sysfs = 1; | 202 | kobj->state_in_sysfs = 1; |
203 | 203 | ||
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++) |