diff options
| author | Rob Herring <robh@kernel.org> | 2018-03-08 10:21:07 -0500 |
|---|---|---|
| committer | Rob Herring <robh@kernel.org> | 2018-03-08 10:21:07 -0500 |
| commit | c679fa6e3aaa5c58fc514b5b88cfa82774b8d390 (patch) | |
| tree | 0c10b339368bd1795152a66a4e245e6f654fb3ec /lib | |
| parent | bdb7013df910681f84eff27b07791d4c160cb76f (diff) | |
| parent | 4fd98e374fd377ae0458a9dc44aa779cf9631ddd (diff) | |
Merge branch 'dtc-update' into dt/next
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/Kconfig.debug | 1 | ||||
| -rw-r--r-- | lib/dma-direct.c | 5 | ||||
| -rw-r--r-- | lib/idr.c | 2 | ||||
| -rw-r--r-- | lib/radix-tree.c | 2 | ||||
| -rw-r--r-- | lib/vsprintf.c | 2 |
5 files changed, 8 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 | ||
diff --git a/lib/dma-direct.c b/lib/dma-direct.c index 40b1f92f2214..c9e8e21cb334 100644 --- a/lib/dma-direct.c +++ b/lib/dma-direct.c | |||
| @@ -84,6 +84,10 @@ again: | |||
| 84 | return page_address(page); | 84 | return page_address(page); |
| 85 | } | 85 | } |
| 86 | 86 | ||
| 87 | /* | ||
| 88 | * NOTE: this function must never look at the dma_addr argument, because we want | ||
| 89 | * to be able to use it as a helper for iommu implementations as well. | ||
| 90 | */ | ||
| 87 | void dma_direct_free(struct device *dev, size_t size, void *cpu_addr, | 91 | void dma_direct_free(struct device *dev, size_t size, void *cpu_addr, |
| 88 | dma_addr_t dma_addr, unsigned long attrs) | 92 | dma_addr_t dma_addr, unsigned long attrs) |
| 89 | { | 93 | { |
| @@ -152,5 +156,6 @@ const struct dma_map_ops dma_direct_ops = { | |||
| 152 | .map_sg = dma_direct_map_sg, | 156 | .map_sg = dma_direct_map_sg, |
| 153 | .dma_supported = dma_direct_supported, | 157 | .dma_supported = dma_direct_supported, |
| 154 | .mapping_error = dma_direct_mapping_error, | 158 | .mapping_error = dma_direct_mapping_error, |
| 159 | .is_phys = 1, | ||
| 155 | }; | 160 | }; |
| 156 | EXPORT_SYMBOL(dma_direct_ops); | 161 | EXPORT_SYMBOL(dma_direct_ops); |
| @@ -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. |
