Skip to contentSkip to conversation

net: use __packed annotation (fwd)

PATCH Joe Perches 1 participant 1 message Jun 3, 2010 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Some comments:

[]

Quoted 13 lines
include/linux/ncp_fs_sb.h +0 -5
index 5ec9ca6..8da05bc 100644
@@ -104,13 +104,13 @@ struct ncp_server {
 
 		unsigned int state;		/* STREAM only: receiver state */
 		struct {
-			__u32 magic __attribute__((packed));
-			__u32 len __attribute__((packed));
-			__u16 type __attribute__((packed));
-			__u16 p1 __attribute__((packed));
-			__u16 p2 __attribute__((packed));

include/linux/ncp_fs_sb.h struct ncp_server { · line 114

Quoted 10 lines
include/linux/ncp_fs_sb.h +7 -2
-			__u16 p3 __attribute__((packed));
-			__u16 type2 __attribute__((packed));
+			__u32 magic __packed;
+			__u32 len __packed;
+			__u16 type __packed;
+			__u16 p1 __packed;
+			__u16 p2 __packed;
+			__u16 p3 __packed;
+			__u16 type2 __packed;
 		} buf;				/* STREAM only: temporary buffer */

This could probably just be

		struct {
			__u32 magic;
			__u32 len;
			__u16 type;
			__u16 p1;
			__u16 p2;
			__u16 p3;
			__u16 type2;

} __packed buf; /* STREAM only: temporary buffer */
[]

net/iucv/iucv.c struct iucv_path_pending { · line 1466

Quoted 10 lines
net/iucv/iucv.c +1 -1
index f28ad2c..499c045 100644
@@ -1463,7 +1463,7 @@ struct iucv_path_pending {
 	u32 res3;
 	u8  ippollfg;
 	u8  res4[3];
-} __attribute__ ((packed));
+} __packed;

iucv also has some structs that are __attribute__ ((packed,aligned(8)));

Perhaps those should become: __packed __aligned(8) instead of leaving them as is.