public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] [PATCH] Fix ARM BUILD_BUG_ON() errors with batman-adv
@ 2013-11-30 19:15 Russell King - ARM Linux
  2013-11-30 20:12 ` Antonio Quartulli
  2013-11-30 21:05 ` David Miller
  0 siblings, 2 replies; 16+ messages in thread
From: Russell King - ARM Linux @ 2013-11-30 19:15 UTC (permalink / raw)
  To: Marek Lindner, Simon Wunderlich, Antonio Quartulli, b.a.t.m.a.n,
	netdev

From: Russell King <rmk+kernel@arm.linux.org.uk>

The following errors were observed on ARM during a randconfig build.
This patch addresses them by ensuring that the batadv_header structure
is appropriately packed; this structure contains three 8-bit elements
so there should be no undesired side effect from this packing.

net/batman-adv/main.c: In function 'batadv_init':
net/batman-adv/main.c:425:279: error: call to '__compiletime_assert_425' declared with attribute error: BUILD_BUG_ON failed: offsetof(struct batadv_unicast_4addr_packet, src) != 10
net/batman-adv/main.c:426:267: error: call to '__compiletime_assert_426' declared with attribute error: BUILD_BUG_ON failed: offsetof(struct batadv_unicast_packet, dest) != 4
net/batman-adv/main.c:427:275: error: call to '__compiletime_assert_427' declared with attribute error: BUILD_BUG_ON failed: offsetof(struct batadv_unicast_tvlv_packet, dst) != 4
net/batman-adv/main.c:428:261: error: call to '__compiletime_assert_428' declared with attribute error: BUILD_BUG_ON failed: offsetof(struct batadv_frag_packet, dest) != 4
net/batman-adv/main.c:429:271: error: call to '__compiletime_assert_429' declared with attribute error: BUILD_BUG_ON failed: offsetof(struct batadv_icmp_packet, icmph.dst) != 4
net/batman-adv/main.c:430:277: error: call to '__compiletime_assert_430' declared with attribute error: BUILD_BUG_ON failed: offsetof(struct batadv_icmp_packet_rr, icmph.dst) != 4

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 net/batman-adv/packet.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/batman-adv/packet.h b/net/batman-adv/packet.h
index 207459b62966..4039f25794e0 100644
--- a/net/batman-adv/packet.h
+++ b/net/batman-adv/packet.h
@@ -171,7 +171,7 @@ struct batadv_header {
 	/* the parent struct has to add a byte after the header to make
 	 * everything 4 bytes aligned again
 	 */
-};
+} __attribute__((packed));
 
 /**
  * struct batadv_ogm_packet - ogm (routing protocol) packet

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2013-12-02 18:38 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-30 19:15 [B.A.T.M.A.N.] [PATCH] Fix ARM BUILD_BUG_ON() errors with batman-adv Russell King - ARM Linux
2013-11-30 20:12 ` Antonio Quartulli
2013-11-30 23:05   ` Russell King - ARM Linux
2013-12-01  0:27     ` Antonio Quartulli
2013-12-01 14:28       ` Antonio Quartulli
2013-12-01 17:13         ` Russell King - ARM Linux
2013-12-02 10:24           ` [B.A.T.M.A.N.] [PATCH] Fix ARM BUILD_BUG_ON() errors withbatman-adv David Laight
2013-12-02 12:50             ` Antonio Quartulli
2013-12-02 13:10               ` David Laight
2013-12-02 16:20               ` David Miller
2013-12-01 19:21         ` [B.A.T.M.A.N.] [PATCH] Fix ARM BUILD_BUG_ON() errors with batman-adv David Miller
2013-12-01 20:40           ` Antonio Quartulli
2013-11-30 21:05 ` David Miller
2013-11-30 23:03   ` Russell King - ARM Linux
2013-12-02 17:58   ` Simon Wunderlich
2013-12-02 18:38     ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox