On one hand commit
28644c809f44 ("regmap: Add the rbtree cache support")
added 'regcache_rbtree_node' as packed structure, while on the other hand
commit
e977145aeaad ("[RBTREE] Add explicit alignment to sizeof(long)
for struct rb_node.") declared struct 'rb_node' as aligned.
Solve the ambiguity of placing aligned structure in a packed one by
removing the packed attribute from struct. This seems to be the behavior
of gcc anyway.
This removes the following warning (W=1):
drivers/base/regmap/regcache-rbtree.c:36:1: warning: alignment 1 of 'struct regcache_rbtree_node' is less than 4 [-Wpacked-not-aligned]
Cc: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Mathieu Malaterre <malat@debian.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
[dongkyun.s: cherry-pick mainline commit
435bba0f11f0 for gcc 9 build]
Signed-off-by: Dongkyun Son <dongkyun.s@samsung.com>
Change-Id: Ic59dfc79db0973ccb387e7ced3bda05a674850d9
void *block;
/* number of registers available in the block */
unsigned int blklen;
-} __attribute__ ((packed));
+};
struct regcache_rbtree_ctx {
struct rb_root root;