Skip to contentSkip to conversation

regmap: Remove __attribute__ ((packed))

PATCH Applied Dimitris Papastamos 2 participants 5 messages Mar 14, 2013 – Mar 15, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 regmap: Remove __attribute__ ((packed))

There is no point having this. The space gains are trivial if there are any at all.

Change-Id Ib4b1320420f780dcf5b9a1e4b05f5805691c4d9f
---
 drivers/base/regmap/regcache-rbtree.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/base/regmap/regcache-rbtree.c +1 -1
index dd5ed6c..383fc00 100644
@@ -31,7 +31,7 @@ struct regcache_rbtree_node {
 	void *block;
 	/* number of registers available in the block */
 	unsigned int blklen;
-} __attribute__ ((packed));
+};
 
 struct regcache_rbtree_ctx {
 	struct rb_root root;
Signature · 1 line
1.8.1.5
Applied
#1 lore raw
Quoted 2 lines · Dimitris Papastamos

There is no point having this. The space gains are trivial if there are any at all.

Applied, but numbers would have been nice and...

Quoted 1 line

Change-Id: Ib4b1320420f780dcf5b9a1e4b05f5805691c4d9f

...this shouldn't be in upstream submissions.

#2 lore raw
Quoted 9 lines · Mark Brown
Quoted 2 lines · Dimitris Papastamos

There is no point having this. The space gains are trivial if there are any at all.

Applied, but numbers would have been nice and...

Quoted 1 line

Change-Id: Ib4b1320420f780dcf5b9a1e4b05f5805691c4d9f

...this shouldn't be in upstream submissions.

Oops, sorry for the Change-Id.

On my system there was no benefit of using it, it just happens that the struct is aligned properly and needs no padding.

Thanks,
Dimitris

#3 lore raw
Quoted 2 lines · Dimitris Papastamos

On my system there was no benefit of using it, it just happens that the struct is aligned properly and needs no padding.

OK, so which system was that and is it not possible that other systems will get something useful from this?

#4 lore raw
Quoted 7 lines · Mark Brown
Quoted 2 lines · Dimitris Papastamos

On my system there was no benefit of using it, it just happens that the struct is aligned properly and needs no padding.

OK, so which system was that and is it not possible that other systems will get something useful from this?

Well I guess it has to do with the gcc cross compiler version that I've got and the actual data layout of the linking rbtree node. The data seems to be aligned on a 4-byte boundary anyhow and that should be ok for many systems.

Thanks,
Dimitris