regmap: Remove attribute packed from struct 'regcache_rbtree_node' 40/220940/1
authorMathieu Malaterre <malat@debian.org>
Thu, 24 Jan 2019 18:06:24 +0000 (19:06 +0100)
committerDongkyun Son <dongkyun.s@samsung.com>
Thu, 26 Dec 2019 03:51:35 +0000 (12:51 +0900)
commit97f3e0bddd7d6e672927ecec132d248b5a8c4f16
tree6f92e0321cb5d97c1e1326e15d5d0cbcb16b0f6a
parent8a427606033cea6952bccab07ae3503e39d37bd2
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 <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]

Change-Id: I27907a2c60b6fd82a28fc7321c393ce0abb335fd
drivers/base/regmap/regcache-rbtree.c