summaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorJan Blunck <jblunck@suse.de>2006-01-08 01:05:07 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-08 20:14:07 -0800
commit6a878184c202395ea17212f111ab9ec4b5f6d6ee (patch)
tree7a4143652fcb41693af44963b7e94b334dd94f54 /include/net
parentd8a33496671e4533aed090793436d58debea6f3a (diff)
downloadop-kernel-dev-6a878184c202395ea17212f111ab9ec4b5f6d6ee.zip
op-kernel-dev-6a878184c202395ea17212f111ab9ec4b5f6d6ee.tar.gz
[PATCH] Eliminate __attribute__ ((packed)) warnings for gcc-4.1
Since version 4.1 the gcc is warning about ignored attributes. This patch is using the equivalent attribute on the struct instead of on each of the structure or union members. GCC Manual: "Specifying Attributes of Types packed This attribute, attached to struct or union type definition, specifies that each member of the structure or union is placed to minimize the memory required. When attached to an enum definition, it indicates that the smallest integral type should be used. Specifying this attribute for struct and union types is equivalent to specifying the packed attribute on each of the structure or union members." Signed-off-by: Jan Blunck <jblunck@suse.de> Cc: Dave Jones <davej@codemonkey.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/dn_dev.h84
-rw-r--r--include/net/dn_nsp.h74
2 files changed, 79 insertions, 79 deletions
diff --git a/include/net/dn_dev.h b/include/net/dn_dev.h
index 86e8e86..5a86e78 100644
--- a/include/net/dn_dev.h
+++ b/include/net/dn_dev.h
@@ -88,8 +88,8 @@ struct dn_dev {
struct net_device *dev;
struct dn_dev_parms parms;
char use_long;
- struct timer_list timer;
- unsigned long t3;
+ struct timer_list timer;
+ unsigned long t3;
struct neigh_parms *neigh_parms;
unsigned char addr[ETH_ALEN];
struct neighbour *router; /* Default router on circuit */
@@ -99,57 +99,57 @@ struct dn_dev {
struct dn_short_packet
{
- unsigned char msgflg __attribute__((packed));
- unsigned short dstnode __attribute__((packed));
- unsigned short srcnode __attribute__((packed));
- unsigned char forward __attribute__((packed));
-};
+ unsigned char msgflg;
+ unsigned short dstnode;
+ unsigned short srcnode;
+ unsigned char forward;
+} __attribute__((packed));
struct dn_long_packet
{
- unsigned char msgflg __attribute__((packed));
- unsigned char d_area __attribute__((packed));
- unsigned char d_subarea __attribute__((packed));
- unsigned char d_id[6] __attribute__((packed));
- unsigned char s_area __attribute__((packed));
- unsigned char s_subarea __attribute__((packed));
- unsigned char s_id[6] __attribute__((packed));
- unsigned char nl2 __attribute__((packed));
- unsigned char visit_ct __attribute__((packed));
- unsigned char s_class __attribute__((packed));
- unsigned char pt __attribute__((packed));
-};
+ unsigned char msgflg;
+ unsigned char d_area;
+ unsigned char d_subarea;
+ unsigned char d_id[6];
+ unsigned char s_area;
+ unsigned char s_subarea;
+ unsigned char s_id[6];
+ unsigned char nl2;
+ unsigned char visit_ct;
+ unsigned char s_class;
+ unsigned char pt;
+} __attribute__((packed));
/*------------------------- DRP - Routing messages ---------------------*/
struct endnode_hello_message
{
- unsigned char msgflg __attribute__((packed));
- unsigned char tiver[3] __attribute__((packed));
- unsigned char id[6] __attribute__((packed));
- unsigned char iinfo __attribute__((packed));
- unsigned short blksize __attribute__((packed));
- unsigned char area __attribute__((packed));
- unsigned char seed[8] __attribute__((packed));
- unsigned char neighbor[6] __attribute__((packed));
- unsigned short timer __attribute__((packed));
- unsigned char mpd __attribute__((packed));
- unsigned char datalen __attribute__((packed));
- unsigned char data[2] __attribute__((packed));
-};
+ unsigned char msgflg;
+ unsigned char tiver[3];
+ unsigned char id[6];
+ unsigned char iinfo;
+ unsigned short blksize;
+ unsigned char area;
+ unsigned char seed[8];
+ unsigned char neighbor[6];
+ unsigned short timer;
+ unsigned char mpd;
+ unsigned char datalen;
+ unsigned char data[2];
+} __attribute__((packed));
struct rtnode_hello_message
{
- unsigned char msgflg __attribute__((packed));
- unsigned char tiver[3] __attribute__((packed));
- unsigned char id[6] __attribute__((packed));
- unsigned char iinfo __attribute__((packed));
- unsigned short blksize __attribute__((packed));
- unsigned char priority __attribute__((packed));
- unsigned char area __attribute__((packed));
- unsigned short timer __attribute__((packed));
- unsigned char mpd __attribute__((packed));
-};
+ unsigned char msgflg;
+ unsigned char tiver[3];
+ unsigned char id[6];
+ unsigned char iinfo;
+ unsigned short blksize;
+ unsigned char priority;
+ unsigned char area;
+ unsigned short timer;
+ unsigned char mpd;
+} __attribute__((packed));
extern void dn_dev_init(void);
diff --git a/include/net/dn_nsp.h b/include/net/dn_nsp.h
index 1ba03be..e6182b8 100644
--- a/include/net/dn_nsp.h
+++ b/include/net/dn_nsp.h
@@ -72,78 +72,78 @@ extern struct sk_buff *dn_alloc_send_skb(struct sock *sk, size_t *size, int nobl
struct nsp_data_seg_msg
{
- unsigned char msgflg __attribute__((packed));
- unsigned short dstaddr __attribute__((packed));
- unsigned short srcaddr __attribute__((packed));
-};
+ unsigned char msgflg;
+ unsigned short dstaddr;
+ unsigned short srcaddr;
+} __attribute__((packed));
struct nsp_data_opt_msg
{
- unsigned short acknum __attribute__((packed));
- unsigned short segnum __attribute__((packed));
- unsigned short lsflgs __attribute__((packed));
-};
+ unsigned short acknum;
+ unsigned short segnum;
+ unsigned short lsflgs;
+} __attribute__((packed));
struct nsp_data_opt_msg1
{
- unsigned short acknum __attribute__((packed));
- unsigned short segnum __attribute__((packed));
-};
+ unsigned short acknum;
+ unsigned short segnum;
+} __attribute__((packed));
/* Acknowledgment Message (data/other data) */
struct nsp_data_ack_msg
{
- unsigned char msgflg __attribute__((packed));
- unsigned short dstaddr __attribute__((packed));
- unsigned short srcaddr __attribute__((packed));
- unsigned short acknum __attribute__((packed));
-};
+ unsigned char msgflg;
+ unsigned short dstaddr;
+ unsigned short srcaddr;
+ unsigned short acknum;
+} __attribute__((packed));
/* Connect Acknowledgment Message */
struct nsp_conn_ack_msg
{
- unsigned char msgflg __attribute__((packed));
- unsigned short dstaddr __attribute__((packed));
-};
+ unsigned char msgflg;
+ unsigned short dstaddr;
+} __attribute__((packed));
/* Connect Initiate/Retransmit Initiate/Connect Confirm */
struct nsp_conn_init_msg
{
- unsigned char msgflg __attribute__((packed));
+ unsigned char msgflg;
#define NSP_CI 0x18 /* Connect Initiate */
#define NSP_RCI 0x68 /* Retrans. Conn Init */
- unsigned short dstaddr __attribute__((packed));
- unsigned short srcaddr __attribute__((packed));
- unsigned char services __attribute__((packed));
+ unsigned short dstaddr;
+ unsigned short srcaddr;
+ unsigned char services;
#define NSP_FC_NONE 0x00 /* Flow Control None */
#define NSP_FC_SRC 0x04 /* Seg Req. Count */
#define NSP_FC_SCMC 0x08 /* Sess. Control Mess */
#define NSP_FC_MASK 0x0c /* FC type mask */
- unsigned char info __attribute__((packed));
- unsigned short segsize __attribute__((packed));
-};
+ unsigned char info;
+ unsigned short segsize;
+} __attribute__((packed));
/* Disconnect Initiate/Disconnect Confirm */
struct nsp_disconn_init_msg
{
- unsigned char msgflg __attribute__((packed));
- unsigned short dstaddr __attribute__((packed));
- unsigned short srcaddr __attribute__((packed));
- unsigned short reason __attribute__((packed));
-};
+ unsigned char msgflg;
+ unsigned short dstaddr;
+ unsigned short srcaddr;
+ unsigned short reason;
+} __attribute__((packed));
struct srcobj_fmt
{
- char format __attribute__((packed));
- unsigned char task __attribute__((packed));
- unsigned short grpcode __attribute__((packed));
- unsigned short usrcode __attribute__((packed));
- char dlen __attribute__((packed));
-};
+ char format;
+ unsigned char task;
+ unsigned short grpcode;
+ unsigned short usrcode;
+ char dlen;
+} __attribute__((packed));
/*
* A collection of functions for manipulating the sequence
OpenPOWER on IntegriCloud