From patchwork Sat Nov 30 19:15:53 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Russell King - ARM Linux X-Patchwork-Id: 295596 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 97F922C0090 for ; Sun, 1 Dec 2013 06:16:21 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750956Ab3K3TQQ (ORCPT ); Sat, 30 Nov 2013 14:16:16 -0500 Received: from caramon.arm.linux.org.uk ([78.32.30.218]:43749 "EHLO caramon.arm.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750817Ab3K3TQP (ORCPT ); Sat, 30 Nov 2013 14:16:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=arm.linux.org.uk; s=caramon; h=Sender:Content-Type:MIME-Version:Message-ID:Subject:To:From:Date; bh=RGb+vBcATFMvycQNJVnzGIZ5rB/wa2pNk/TP4FQz5As=; b=IUxZ2OiLaPUbhlG5phTGCbELlv3XK8pHwmSgQkfHd4+GU0FXPqpmutm+X6l9b7vfwuyV6RwSM/6JB0izDEPJ5Wh0v6R5YYTwmKhRhDeYU51TP2PBGqvvBLJAQztzHJa30/BLCUyQtRJYZHXfHGWiN56ULs5SVHt5fQtF6S0JLhw=; Received: from n2100.arm.linux.org.uk ([2002:4e20:1eda:1:214:fdff:fe10:4f86]:38390) by caramon.arm.linux.org.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1Vmq1D-0002zY-OO; Sat, 30 Nov 2013 19:15:56 +0000 Received: from linux by n2100.arm.linux.org.uk with local (Exim 4.76) (envelope-from ) id 1Vmq1C-0002I2-5s; Sat, 30 Nov 2013 19:15:54 +0000 Date: Sat, 30 Nov 2013 19:15:53 +0000 From: Russell King - ARM Linux To: Marek Lindner , Simon Wunderlich , Antonio Quartulli , b.a.t.m.a.n@lists.open-mesh.org, netdev@vger.kernel.org Subject: [PATCH] Fix ARM BUILD_BUG_ON() errors with batman-adv Message-ID: <20131130191553.GA16735@n2100.arm.linux.org.uk> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.19 (2009-01-05) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Russell King 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 --- net/batman-adv/packet.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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