diff options
author | Sven Eckelmann <sven@narfation.org> | 2011-01-15 09:39:43 -0500 |
---|---|---|
committer | Sven Eckelmann <sven@narfation.org> | 2011-01-15 21:25:19 -0500 |
commit | aa0adb1a85e159cf57f0e11282bc6c9e3606a5f3 (patch) | |
tree | 19406bf80804801e85cf0182f5037ddfc656465e /net/batman-adv/packet.h | |
parent | ed7809d9c41b514115ddffaa860694393c2016b3 (diff) |
batman-adv: Use "__attribute__" shortcut macros
Linux 2.6.21 defines different macros for __attribute__ which are also
used inside batman-adv. The next version of checkpatch.pl warns about
the usage of __attribute__((packed))).
Linux 2.6.33 defines an extra macro __always_unused which is used to
assist source code analyzers and can be used to removed the last
existing __attribute__ inside the source code.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to 'net/batman-adv/packet.h')
-rw-r--r-- | net/batman-adv/packet.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/net/batman-adv/packet.h b/net/batman-adv/packet.h index b49fdf70a6d5..2284e8129cb2 100644 --- a/net/batman-adv/packet.h +++ b/net/batman-adv/packet.h | |||
@@ -63,7 +63,7 @@ struct batman_packet { | |||
63 | uint8_t num_hna; | 63 | uint8_t num_hna; |
64 | uint8_t gw_flags; /* flags related to gateway class */ | 64 | uint8_t gw_flags; /* flags related to gateway class */ |
65 | uint8_t align; | 65 | uint8_t align; |
66 | } __attribute__((packed)); | 66 | } __packed; |
67 | 67 | ||
68 | #define BAT_PACKET_LEN sizeof(struct batman_packet) | 68 | #define BAT_PACKET_LEN sizeof(struct batman_packet) |
69 | 69 | ||
@@ -76,7 +76,7 @@ struct icmp_packet { | |||
76 | uint8_t orig[6]; | 76 | uint8_t orig[6]; |
77 | uint16_t seqno; | 77 | uint16_t seqno; |
78 | uint8_t uid; | 78 | uint8_t uid; |
79 | } __attribute__((packed)); | 79 | } __packed; |
80 | 80 | ||
81 | #define BAT_RR_LEN 16 | 81 | #define BAT_RR_LEN 16 |
82 | 82 | ||
@@ -93,14 +93,14 @@ struct icmp_packet_rr { | |||
93 | uint8_t uid; | 93 | uint8_t uid; |
94 | uint8_t rr_cur; | 94 | uint8_t rr_cur; |
95 | uint8_t rr[BAT_RR_LEN][ETH_ALEN]; | 95 | uint8_t rr[BAT_RR_LEN][ETH_ALEN]; |
96 | } __attribute__((packed)); | 96 | } __packed; |
97 | 97 | ||
98 | struct unicast_packet { | 98 | struct unicast_packet { |
99 | uint8_t packet_type; | 99 | uint8_t packet_type; |
100 | uint8_t version; /* batman version field */ | 100 | uint8_t version; /* batman version field */ |
101 | uint8_t dest[6]; | 101 | uint8_t dest[6]; |
102 | uint8_t ttl; | 102 | uint8_t ttl; |
103 | } __attribute__((packed)); | 103 | } __packed; |
104 | 104 | ||
105 | struct unicast_frag_packet { | 105 | struct unicast_frag_packet { |
106 | uint8_t packet_type; | 106 | uint8_t packet_type; |
@@ -110,7 +110,7 @@ struct unicast_frag_packet { | |||
110 | uint8_t flags; | 110 | uint8_t flags; |
111 | uint8_t orig[6]; | 111 | uint8_t orig[6]; |
112 | uint16_t seqno; | 112 | uint16_t seqno; |
113 | } __attribute__((packed)); | 113 | } __packed; |
114 | 114 | ||
115 | struct bcast_packet { | 115 | struct bcast_packet { |
116 | uint8_t packet_type; | 116 | uint8_t packet_type; |
@@ -118,7 +118,7 @@ struct bcast_packet { | |||
118 | uint8_t orig[6]; | 118 | uint8_t orig[6]; |
119 | uint8_t ttl; | 119 | uint8_t ttl; |
120 | uint32_t seqno; | 120 | uint32_t seqno; |
121 | } __attribute__((packed)); | 121 | } __packed; |
122 | 122 | ||
123 | struct vis_packet { | 123 | struct vis_packet { |
124 | uint8_t packet_type; | 124 | uint8_t packet_type; |
@@ -131,6 +131,6 @@ struct vis_packet { | |||
131 | * neighbors */ | 131 | * neighbors */ |
132 | uint8_t target_orig[6]; /* who should receive this packet */ | 132 | uint8_t target_orig[6]; /* who should receive this packet */ |
133 | uint8_t sender_orig[6]; /* who sent or rebroadcasted this packet */ | 133 | uint8_t sender_orig[6]; /* who sent or rebroadcasted this packet */ |
134 | } __attribute__((packed)); | 134 | } __packed; |
135 | 135 | ||
136 | #endif /* _NET_BATMAN_ADV_PACKET_H_ */ | 136 | #endif /* _NET_BATMAN_ADV_PACKET_H_ */ |