projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7b7c1df
)
mm/slab_common.c: work around clang bug #42570
author
Arnd Bergmann
<
[email protected]
>
Tue, 16 Jul 2019 23:25:57 +0000
(16:25 -0700)
committer
Linus Torvalds
<
[email protected]
>
Wed, 17 Jul 2019 02:23:21 +0000
(19:23 -0700)
Clang gets rather confused about two variables in the same special
section when one of them is not initialized, leading to an assembler
warning later:
/tmp/slab_common-18f869.s: Assembler messages:
/tmp/slab_common-18f869.s:7526: Warning: ignoring changed section attributes for .data..ro_after_init
Adding an initialization to kmalloc_caches is rather silly here
but does avoid the issue.
Link:
https://bugs.llvm.org/show_bug.cgi?id=42570
Link:
http://lkml.kernel.org/r/
[email protected]
Signed-off-by: Arnd Bergmann <
[email protected]
>
Acked-by: David Rientjes <
[email protected]
>
Reviewed-by: Andrew Morton <
[email protected]
>
Cc: Christoph Lameter <
[email protected]
>
Cc: Pekka Enberg <
[email protected]
>
Cc: Joonsoo Kim <
[email protected]
>
Cc: Stephen Rothwell <
[email protected]
>
Cc: Roman Gushchin <
[email protected]
>
Cc: Shakeel Butt <
[email protected]
>
Cc: Vladimir Davydov <
[email protected]
>
Cc: Andrey Konovalov <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
mm/slab_common.c
patch
|
blob
|
history
diff --git
a/mm/slab_common.c
b/mm/slab_common.c
index 6c49dbb3769e3cec85daf01e22fde098c5e986b2..807490fe217a97d51b4575d19db8b0e04a40e000 100644
(file)
--- a/
mm/slab_common.c
+++ b/
mm/slab_common.c
@@
-1028,7
+1028,8
@@
struct kmem_cache *__init create_kmalloc_cache(const char *name,
}
struct kmem_cache *
-kmalloc_caches[NR_KMALLOC_TYPES][KMALLOC_SHIFT_HIGH + 1] __ro_after_init;
+kmalloc_caches[NR_KMALLOC_TYPES][KMALLOC_SHIFT_HIGH + 1] __ro_after_init =
+{ /* initialization for https://bugs.llvm.org/show_bug.cgi?id=42570 */ };
EXPORT_SYMBOL(kmalloc_caches);
/*