From: Mathieu Malaterre Date: Thu, 24 Jan 2019 18:06:24 +0000 (+0100) Subject: regmap: Remove attribute packed from struct 'regcache_rbtree_node' X-Git-Tag: v5.1-rc1~183^2~1^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=435bba0f11f06789be59757719c161915e92f889;p=thirdparty%2Fkernel%2Flinux.git regmap: Remove attribute packed from struct 'regcache_rbtree_node' 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 Cc: David Woodhouse Signed-off-by: Mathieu Malaterre Signed-off-by: Mark Brown --- diff --git a/drivers/base/regmap/regcache-rbtree.c b/drivers/base/regmap/regcache-rbtree.c index 2e8f0144f9ab3..9cbb4b0cd01bf 100644 --- a/drivers/base/regmap/regcache-rbtree.c +++ b/drivers/base/regmap/regcache-rbtree.c @@ -33,7 +33,7 @@ struct regcache_rbtree_node { unsigned int blklen; /* the actual rbtree node holding this block */ struct rb_node node; -} __attribute__ ((packed)); +}; struct regcache_rbtree_ctx { struct rb_root root;