diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/Kconfig.debug | 1 | ||||
| -rw-r--r-- | lib/idr.c | 2 | ||||
| -rw-r--r-- | lib/radix-tree.c | 2 | ||||
| -rw-r--r-- | lib/vsprintf.c | 2 |
4 files changed, 3 insertions, 4 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 6088408ef26c..64155e310a9f 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
| @@ -1642,6 +1642,7 @@ config DMA_API_DEBUG | |||
| 1642 | 1642 | ||
| 1643 | menuconfig RUNTIME_TESTING_MENU | 1643 | menuconfig RUNTIME_TESTING_MENU |
| 1644 | bool "Runtime Testing" | 1644 | bool "Runtime Testing" |
| 1645 | def_bool y | ||
| 1645 | 1646 | ||
| 1646 | if RUNTIME_TESTING_MENU | 1647 | if RUNTIME_TESTING_MENU |
| 1647 | 1648 | ||
| @@ -431,7 +431,6 @@ int ida_get_new_above(struct ida *ida, int start, int *id) | |||
| 431 | bitmap = this_cpu_xchg(ida_bitmap, NULL); | 431 | bitmap = this_cpu_xchg(ida_bitmap, NULL); |
| 432 | if (!bitmap) | 432 | if (!bitmap) |
| 433 | return -EAGAIN; | 433 | return -EAGAIN; |
| 434 | memset(bitmap, 0, sizeof(*bitmap)); | ||
| 435 | bitmap->bitmap[0] = tmp >> RADIX_TREE_EXCEPTIONAL_SHIFT; | 434 | bitmap->bitmap[0] = tmp >> RADIX_TREE_EXCEPTIONAL_SHIFT; |
| 436 | rcu_assign_pointer(*slot, bitmap); | 435 | rcu_assign_pointer(*slot, bitmap); |
| 437 | } | 436 | } |
| @@ -464,7 +463,6 @@ int ida_get_new_above(struct ida *ida, int start, int *id) | |||
| 464 | bitmap = this_cpu_xchg(ida_bitmap, NULL); | 463 | bitmap = this_cpu_xchg(ida_bitmap, NULL); |
| 465 | if (!bitmap) | 464 | if (!bitmap) |
| 466 | return -EAGAIN; | 465 | return -EAGAIN; |
| 467 | memset(bitmap, 0, sizeof(*bitmap)); | ||
| 468 | __set_bit(bit, bitmap->bitmap); | 466 | __set_bit(bit, bitmap->bitmap); |
| 469 | radix_tree_iter_replace(root, &iter, slot, bitmap); | 467 | radix_tree_iter_replace(root, &iter, slot, bitmap); |
| 470 | } | 468 | } |
diff --git a/lib/radix-tree.c b/lib/radix-tree.c index 0a7ae3288a24..8e00138d593f 100644 --- a/lib/radix-tree.c +++ b/lib/radix-tree.c | |||
| @@ -2125,7 +2125,7 @@ int ida_pre_get(struct ida *ida, gfp_t gfp) | |||
| 2125 | preempt_enable(); | 2125 | preempt_enable(); |
| 2126 | 2126 | ||
| 2127 | if (!this_cpu_read(ida_bitmap)) { | 2127 | if (!this_cpu_read(ida_bitmap)) { |
| 2128 | struct ida_bitmap *bitmap = kmalloc(sizeof(*bitmap), gfp); | 2128 | struct ida_bitmap *bitmap = kzalloc(sizeof(*bitmap), gfp); |
| 2129 | if (!bitmap) | 2129 | if (!bitmap) |
| 2130 | return 0; | 2130 | return 0; |
| 2131 | if (this_cpu_cmpxchg(ida_bitmap, NULL, bitmap)) | 2131 | if (this_cpu_cmpxchg(ida_bitmap, NULL, bitmap)) |
diff --git a/lib/vsprintf.c b/lib/vsprintf.c index 77ee6ced11b1..d7a708f82559 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c | |||
| @@ -1849,7 +1849,7 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr, | |||
| 1849 | { | 1849 | { |
| 1850 | const int default_width = 2 * sizeof(void *); | 1850 | const int default_width = 2 * sizeof(void *); |
| 1851 | 1851 | ||
| 1852 | if (!ptr && *fmt != 'K') { | 1852 | if (!ptr && *fmt != 'K' && *fmt != 'x') { |
| 1853 | /* | 1853 | /* |
| 1854 | * Print (null) with the same width as a pointer so it makes | 1854 | * Print (null) with the same width as a pointer so it makes |
| 1855 | * tabular output look nice. | 1855 | * tabular output look nice. |
