Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: use __packed annotation

cleanup patch.

Use new __packed annotation in net/ and include/
(except netfilter)

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Eric Dumazet and committed by
David S. Miller
bc10502d ba2d3587

+133 -133
+1 -1
include/linux/if_ether.h
··· 119 119 unsigned char h_dest[ETH_ALEN]; /* destination eth addr */ 120 120 unsigned char h_source[ETH_ALEN]; /* source ether addr */ 121 121 __be16 h_proto; /* packet type ID field */ 122 - } __attribute__((packed)); 122 + } __packed; 123 123 124 124 #ifdef __KERNEL__ 125 125 #include <linux/skbuff.h>
+4 -4
include/linux/if_fddi.h
··· 67 67 __u8 dsap; /* destination service access point */ 68 68 __u8 ssap; /* source service access point */ 69 69 __u8 ctrl; /* control byte #1 */ 70 - } __attribute__ ((packed)); 70 + } __packed; 71 71 72 72 /* Define 802.2 Type 2 header */ 73 73 struct fddi_8022_2_hdr { ··· 75 75 __u8 ssap; /* source service access point */ 76 76 __u8 ctrl_1; /* control byte #1 */ 77 77 __u8 ctrl_2; /* control byte #2 */ 78 - } __attribute__ ((packed)); 78 + } __packed; 79 79 80 80 /* Define 802.2 SNAP header */ 81 81 #define FDDI_K_OUI_LEN 3 ··· 85 85 __u8 ctrl; /* always 0x03 */ 86 86 __u8 oui[FDDI_K_OUI_LEN]; /* organizational universal id */ 87 87 __be16 ethertype; /* packet type ID field */ 88 - } __attribute__ ((packed)); 88 + } __packed; 89 89 90 90 /* Define FDDI LLC frame header */ 91 91 struct fddihdr { ··· 98 98 struct fddi_8022_2_hdr llc_8022_2; 99 99 struct fddi_snap_hdr llc_snap; 100 100 } hdr; 101 - } __attribute__ ((packed)); 101 + } __packed; 102 102 103 103 #ifdef __KERNEL__ 104 104 #include <linux/netdevice.h>
+1 -1
include/linux/if_frad.h
··· 135 135 __be16 PID; 136 136 137 137 #define IP_NLPID pad 138 - } __attribute__((packed)); 138 + } __packed; 139 139 140 140 /* see RFC 1490 for the definition of the following */ 141 141 #define FRAD_I_UI 0x03
+4 -4
include/linux/if_hippi.h
··· 104 104 __be32 fixed; 105 105 #endif 106 106 __be32 d2_size; 107 - } __attribute__ ((packed)); 107 + } __packed; 108 108 109 109 struct hippi_le_hdr { 110 110 #if defined (__BIG_ENDIAN_BITFIELD) ··· 129 129 __u8 daddr[HIPPI_ALEN]; 130 130 __u16 locally_administered; 131 131 __u8 saddr[HIPPI_ALEN]; 132 - } __attribute__ ((packed)); 132 + } __packed; 133 133 134 134 #define HIPPI_OUI_LEN 3 135 135 /* ··· 142 142 __u8 ctrl; /* always 0x03 */ 143 143 __u8 oui[HIPPI_OUI_LEN]; /* organizational universal id (zero)*/ 144 144 __be16 ethertype; /* packet type ID field */ 145 - } __attribute__ ((packed)); 145 + } __packed; 146 146 147 147 struct hippi_hdr { 148 148 struct hippi_fp_hdr fp; 149 149 struct hippi_le_hdr le; 150 150 struct hippi_snap_hdr snap; 151 - } __attribute__ ((packed)); 151 + } __packed; 152 152 153 153 #endif /* _LINUX_IF_HIPPI_H */
+4 -4
include/linux/if_pppox.h
··· 59 59 union{ 60 60 struct pppoe_addr pppoe; 61 61 }sa_addr; 62 - }__attribute__ ((packed)); 62 + } __packed; 63 63 64 64 /* The use of the above union isn't viable because the size of this 65 65 * struct must stay fixed over time -- applications use sizeof(struct ··· 70 70 sa_family_t sa_family; /* address family, AF_PPPOX */ 71 71 unsigned int sa_protocol; /* protocol identifier */ 72 72 struct pppol2tp_addr pppol2tp; 73 - }__attribute__ ((packed)); 73 + } __packed; 74 74 75 75 /* The L2TPv3 protocol changes tunnel and session ids from 16 to 32 76 76 * bits. So we need a different sockaddr structure. ··· 79 79 sa_family_t sa_family; /* address family, AF_PPPOX */ 80 80 unsigned int sa_protocol; /* protocol identifier */ 81 81 struct pppol2tpv3_addr pppol2tp; 82 - } __attribute__ ((packed)); 82 + } __packed; 83 83 84 84 /********************************************************************* 85 85 * ··· 129 129 __be16 sid; 130 130 __be16 length; 131 131 struct pppoe_tag tag[0]; 132 - } __attribute__ ((packed)); 132 + } __packed; 133 133 134 134 /* Length of entire PPPoE + PPP header */ 135 135 #define PPPOE_SES_HLEN 8
+2 -2
include/linux/ipv6.h
··· 58 58 /* 59 59 * TLV encoded option data follows. 60 60 */ 61 - } __attribute__ ((packed)); /* required for some archs */ 61 + } __packed; /* required for some archs */ 62 62 63 63 #define ipv6_destopt_hdr ipv6_opt_hdr 64 64 #define ipv6_hopopt_hdr ipv6_opt_hdr ··· 99 99 __u8 type; 100 100 __u8 length; 101 101 struct in6_addr addr; 102 - } __attribute__ ((__packed__)); 102 + } __packed; 103 103 104 104 /* 105 105 * IPv6 fixed header
+1 -1
include/linux/isdnif.h
··· 317 317 __u8 r_scantime; 318 318 __u8 r_id[FAXIDLEN]; 319 319 __u8 r_code; 320 - } __attribute__((packed)) T30_s; 320 + } __packed T30_s; 321 321 322 322 #define ISDN_TTY_FAX_CONN_IN 0 323 323 #define ISDN_TTY_FAX_CONN_OUT 1
+1 -1
include/linux/mISDNif.h
··· 251 251 struct mISDNhead { 252 252 unsigned int prim; 253 253 unsigned int id; 254 - } __attribute__((packed)); 254 + } __packed; 255 255 256 256 #define MISDN_HEADER_LEN sizeof(struct mISDNhead) 257 257 #define MAX_DATA_SIZE 2048
+1 -1
include/linux/nbd.h
··· 88 88 char handle[8]; 89 89 __be64 from; 90 90 __be32 len; 91 - } __attribute__ ((packed)); 91 + } __packed; 92 92 93 93 /* 94 94 * This is the reply packet that nbd-server sends back to the client after
+5 -5
include/linux/ncp.h
··· 27 27 __u8 conn_high; 28 28 __u8 function; 29 29 __u8 data[0]; 30 - } __attribute__((packed)); 30 + } __packed; 31 31 32 32 #define NCP_REPLY (0x3333) 33 33 #define NCP_WATCHDOG (0x3E3E) ··· 42 42 __u8 completion_code; 43 43 __u8 connection_state; 44 44 __u8 data[0]; 45 - } __attribute__((packed)); 45 + } __packed; 46 46 47 47 #define NCP_VOLNAME_LEN (16) 48 48 #define NCP_NUMBER_OF_VOLUMES (256) ··· 158 158 #ifdef __KERNEL__ 159 159 struct nw_nfs_info nfs; 160 160 #endif 161 - } __attribute__((packed)); 161 + } __packed; 162 162 163 163 /* modify mask - use with MODIFY_DOS_INFO structure */ 164 164 #define DM_ATTRIBUTES (cpu_to_le32(0x02)) ··· 190 190 __u16 inheritanceGrantMask; 191 191 __u16 inheritanceRevokeMask; 192 192 __u32 maximumSpace; 193 - } __attribute__((packed)); 193 + } __packed; 194 194 195 195 struct nw_search_sequence { 196 196 __u8 volNumber; 197 197 __u32 dirBase; 198 198 __u32 sequence; 199 - } __attribute__((packed)); 199 + } __packed; 200 200 201 201 #endif /* _LINUX_NCP_H */
+7 -7
include/linux/ncp_fs_sb.h
··· 104 104 105 105 unsigned int state; /* STREAM only: receiver state */ 106 106 struct { 107 - __u32 magic __attribute__((packed)); 108 - __u32 len __attribute__((packed)); 109 - __u16 type __attribute__((packed)); 110 - __u16 p1 __attribute__((packed)); 111 - __u16 p2 __attribute__((packed)); 112 - __u16 p3 __attribute__((packed)); 113 - __u16 type2 __attribute__((packed)); 107 + __u32 magic __packed; 108 + __u32 len __packed; 109 + __u16 type __packed; 110 + __u16 p1 __packed; 111 + __u16 p2 __packed; 112 + __u16 p3 __packed; 113 + __u16 type2 __packed; 114 114 } buf; /* STREAM only: temporary buffer */ 115 115 unsigned char* ptr; /* STREAM only: pointer to data */ 116 116 size_t len; /* STREAM only: length of data to receive */
+2 -2
include/linux/phonet.h
··· 56 56 __be16 pn_length; 57 57 __u8 pn_robj; 58 58 __u8 pn_sobj; 59 - } __attribute__((packed)); 59 + } __packed; 60 60 61 61 /* Common Phonet payload header */ 62 62 struct phonetmsg { ··· 98 98 __u8 spn_dev; 99 99 __u8 spn_resource; 100 100 __u8 spn_zero[sizeof(struct sockaddr) - sizeof(sa_family_t) - 3]; 101 - } __attribute__ ((packed)); 101 + } __packed; 102 102 103 103 /* Well known address */ 104 104 #define PN_DEV_PC 0x10
+6 -6
include/linux/rds.h
··· 100 100 struct rds_info_counter { 101 101 u_int8_t name[32]; 102 102 u_int64_t value; 103 - } __attribute__((packed)); 103 + } __packed; 104 104 105 105 #define RDS_INFO_CONNECTION_FLAG_SENDING 0x01 106 106 #define RDS_INFO_CONNECTION_FLAG_CONNECTING 0x02 ··· 115 115 __be32 faddr; 116 116 u_int8_t transport[TRANSNAMSIZ]; /* null term ascii */ 117 117 u_int8_t flags; 118 - } __attribute__((packed)); 118 + } __packed; 119 119 120 120 struct rds_info_flow { 121 121 __be32 laddr; ··· 123 123 u_int32_t bytes; 124 124 __be16 lport; 125 125 __be16 fport; 126 - } __attribute__((packed)); 126 + } __packed; 127 127 128 128 #define RDS_INFO_MESSAGE_FLAG_ACK 0x01 129 129 #define RDS_INFO_MESSAGE_FLAG_FAST_ACK 0x02 ··· 136 136 __be16 lport; 137 137 __be16 fport; 138 138 u_int8_t flags; 139 - } __attribute__((packed)); 139 + } __packed; 140 140 141 141 struct rds_info_socket { 142 142 u_int32_t sndbuf; ··· 146 146 __be16 connected_port; 147 147 u_int32_t rcvbuf; 148 148 u_int64_t inum; 149 - } __attribute__((packed)); 149 + } __packed; 150 150 151 151 struct rds_info_tcp_socket { 152 152 __be32 local_addr; ··· 158 158 u_int32_t last_sent_nxt; 159 159 u_int32_t last_expected_una; 160 160 u_int32_t last_seen_una; 161 - } __attribute__((packed)); 161 + } __packed; 162 162 163 163 #define RDS_IB_GID_LEN 16 164 164 struct rds_info_rdma_connection {
+40 -40
include/linux/sctp.h
··· 61 61 __be16 dest; 62 62 __be32 vtag; 63 63 __le32 checksum; 64 - } __attribute__((packed)) sctp_sctphdr_t; 64 + } __packed sctp_sctphdr_t; 65 65 66 66 #ifdef __KERNEL__ 67 67 #include <linux/skbuff.h> ··· 77 77 __u8 type; 78 78 __u8 flags; 79 79 __be16 length; 80 - } __attribute__((packed)) sctp_chunkhdr_t; 80 + } __packed sctp_chunkhdr_t; 81 81 82 82 83 83 /* Section 3.2. Chunk Type Values. ··· 167 167 typedef struct sctp_paramhdr { 168 168 __be16 type; 169 169 __be16 length; 170 - } __attribute__((packed)) sctp_paramhdr_t; 170 + } __packed sctp_paramhdr_t; 171 171 172 172 typedef enum { 173 173 ··· 228 228 __be16 ssn; 229 229 __be32 ppid; 230 230 __u8 payload[0]; 231 - } __attribute__((packed)) sctp_datahdr_t; 231 + } __packed sctp_datahdr_t; 232 232 233 233 typedef struct sctp_data_chunk { 234 234 sctp_chunkhdr_t chunk_hdr; 235 235 sctp_datahdr_t data_hdr; 236 - } __attribute__((packed)) sctp_data_chunk_t; 236 + } __packed sctp_data_chunk_t; 237 237 238 238 /* DATA Chuck Specific Flags */ 239 239 enum { ··· 259 259 __be16 num_inbound_streams; 260 260 __be32 initial_tsn; 261 261 __u8 params[0]; 262 - } __attribute__((packed)) sctp_inithdr_t; 262 + } __packed sctp_inithdr_t; 263 263 264 264 typedef struct sctp_init_chunk { 265 265 sctp_chunkhdr_t chunk_hdr; 266 266 sctp_inithdr_t init_hdr; 267 - } __attribute__((packed)) sctp_init_chunk_t; 267 + } __packed sctp_init_chunk_t; 268 268 269 269 270 270 /* Section 3.3.2.1. IPv4 Address Parameter (5) */ 271 271 typedef struct sctp_ipv4addr_param { 272 272 sctp_paramhdr_t param_hdr; 273 273 struct in_addr addr; 274 - } __attribute__((packed)) sctp_ipv4addr_param_t; 274 + } __packed sctp_ipv4addr_param_t; 275 275 276 276 /* Section 3.3.2.1. IPv6 Address Parameter (6) */ 277 277 typedef struct sctp_ipv6addr_param { 278 278 sctp_paramhdr_t param_hdr; 279 279 struct in6_addr addr; 280 - } __attribute__((packed)) sctp_ipv6addr_param_t; 280 + } __packed sctp_ipv6addr_param_t; 281 281 282 282 /* Section 3.3.2.1 Cookie Preservative (9) */ 283 283 typedef struct sctp_cookie_preserve_param { 284 284 sctp_paramhdr_t param_hdr; 285 285 __be32 lifespan_increment; 286 - } __attribute__((packed)) sctp_cookie_preserve_param_t; 286 + } __packed sctp_cookie_preserve_param_t; 287 287 288 288 /* Section 3.3.2.1 Host Name Address (11) */ 289 289 typedef struct sctp_hostname_param { 290 290 sctp_paramhdr_t param_hdr; 291 291 uint8_t hostname[0]; 292 - } __attribute__((packed)) sctp_hostname_param_t; 292 + } __packed sctp_hostname_param_t; 293 293 294 294 /* Section 3.3.2.1 Supported Address Types (12) */ 295 295 typedef struct sctp_supported_addrs_param { 296 296 sctp_paramhdr_t param_hdr; 297 297 __be16 types[0]; 298 - } __attribute__((packed)) sctp_supported_addrs_param_t; 298 + } __packed sctp_supported_addrs_param_t; 299 299 300 300 /* Appendix A. ECN Capable (32768) */ 301 301 typedef struct sctp_ecn_capable_param { 302 302 sctp_paramhdr_t param_hdr; 303 - } __attribute__((packed)) sctp_ecn_capable_param_t; 303 + } __packed sctp_ecn_capable_param_t; 304 304 305 305 /* ADDIP Section 3.2.6 Adaptation Layer Indication */ 306 306 typedef struct sctp_adaptation_ind_param { 307 307 struct sctp_paramhdr param_hdr; 308 308 __be32 adaptation_ind; 309 - } __attribute__((packed)) sctp_adaptation_ind_param_t; 309 + } __packed sctp_adaptation_ind_param_t; 310 310 311 311 /* ADDIP Section 4.2.7 Supported Extensions Parameter */ 312 312 typedef struct sctp_supported_ext_param { 313 313 struct sctp_paramhdr param_hdr; 314 314 __u8 chunks[0]; 315 - } __attribute__((packed)) sctp_supported_ext_param_t; 315 + } __packed sctp_supported_ext_param_t; 316 316 317 317 /* AUTH Section 3.1 Random */ 318 318 typedef struct sctp_random_param { 319 319 sctp_paramhdr_t param_hdr; 320 320 __u8 random_val[0]; 321 - } __attribute__((packed)) sctp_random_param_t; 321 + } __packed sctp_random_param_t; 322 322 323 323 /* AUTH Section 3.2 Chunk List */ 324 324 typedef struct sctp_chunks_param { 325 325 sctp_paramhdr_t param_hdr; 326 326 __u8 chunks[0]; 327 - } __attribute__((packed)) sctp_chunks_param_t; 327 + } __packed sctp_chunks_param_t; 328 328 329 329 /* AUTH Section 3.3 HMAC Algorithm */ 330 330 typedef struct sctp_hmac_algo_param { 331 331 sctp_paramhdr_t param_hdr; 332 332 __be16 hmac_ids[0]; 333 - } __attribute__((packed)) sctp_hmac_algo_param_t; 333 + } __packed sctp_hmac_algo_param_t; 334 334 335 335 /* RFC 2960. Section 3.3.3 Initiation Acknowledgement (INIT ACK) (2): 336 336 * The INIT ACK chunk is used to acknowledge the initiation of an SCTP ··· 342 342 typedef struct sctp_cookie_param { 343 343 sctp_paramhdr_t p; 344 344 __u8 body[0]; 345 - } __attribute__((packed)) sctp_cookie_param_t; 345 + } __packed sctp_cookie_param_t; 346 346 347 347 /* Section 3.3.3.1 Unrecognized Parameters (8) */ 348 348 typedef struct sctp_unrecognized_param { 349 349 sctp_paramhdr_t param_hdr; 350 350 sctp_paramhdr_t unrecognized; 351 - } __attribute__((packed)) sctp_unrecognized_param_t; 351 + } __packed sctp_unrecognized_param_t; 352 352 353 353 354 354 ··· 363 363 typedef struct sctp_gap_ack_block { 364 364 __be16 start; 365 365 __be16 end; 366 - } __attribute__((packed)) sctp_gap_ack_block_t; 366 + } __packed sctp_gap_ack_block_t; 367 367 368 368 typedef __be32 sctp_dup_tsn_t; 369 369 ··· 378 378 __be16 num_gap_ack_blocks; 379 379 __be16 num_dup_tsns; 380 380 sctp_sack_variable_t variable[0]; 381 - } __attribute__((packed)) sctp_sackhdr_t; 381 + } __packed sctp_sackhdr_t; 382 382 383 383 typedef struct sctp_sack_chunk { 384 384 sctp_chunkhdr_t chunk_hdr; 385 385 sctp_sackhdr_t sack_hdr; 386 - } __attribute__((packed)) sctp_sack_chunk_t; 386 + } __packed sctp_sack_chunk_t; 387 387 388 388 389 389 /* RFC 2960. Section 3.3.5 Heartbeat Request (HEARTBEAT) (4): ··· 395 395 396 396 typedef struct sctp_heartbeathdr { 397 397 sctp_paramhdr_t info; 398 - } __attribute__((packed)) sctp_heartbeathdr_t; 398 + } __packed sctp_heartbeathdr_t; 399 399 400 400 typedef struct sctp_heartbeat_chunk { 401 401 sctp_chunkhdr_t chunk_hdr; 402 402 sctp_heartbeathdr_t hb_hdr; 403 - } __attribute__((packed)) sctp_heartbeat_chunk_t; 403 + } __packed sctp_heartbeat_chunk_t; 404 404 405 405 406 406 /* For the abort and shutdown ACK we must carry the init tag in the ··· 409 409 */ 410 410 typedef struct sctp_abort_chunk { 411 411 sctp_chunkhdr_t uh; 412 - } __attribute__((packed)) sctp_abort_chunk_t; 412 + } __packed sctp_abort_chunk_t; 413 413 414 414 415 415 /* For the graceful shutdown we must carry the tag (in common header) ··· 417 417 */ 418 418 typedef struct sctp_shutdownhdr { 419 419 __be32 cum_tsn_ack; 420 - } __attribute__((packed)) sctp_shutdownhdr_t; 420 + } __packed sctp_shutdownhdr_t; 421 421 422 422 struct sctp_shutdown_chunk_t { 423 423 sctp_chunkhdr_t chunk_hdr; 424 424 sctp_shutdownhdr_t shutdown_hdr; 425 - } __attribute__ ((packed)); 425 + } __packed; 426 426 427 427 /* RFC 2960. Section 3.3.10 Operation Error (ERROR) (9) */ 428 428 ··· 430 430 __be16 cause; 431 431 __be16 length; 432 432 __u8 variable[0]; 433 - } __attribute__((packed)) sctp_errhdr_t; 433 + } __packed sctp_errhdr_t; 434 434 435 435 typedef struct sctp_operr_chunk { 436 436 sctp_chunkhdr_t chunk_hdr; 437 437 sctp_errhdr_t err_hdr; 438 - } __attribute__((packed)) sctp_operr_chunk_t; 438 + } __packed sctp_operr_chunk_t; 439 439 440 440 /* RFC 2960 3.3.10 - Operation Error 441 441 * ··· 525 525 typedef struct sctp_ecne_chunk { 526 526 sctp_chunkhdr_t chunk_hdr; 527 527 sctp_ecnehdr_t ence_hdr; 528 - } __attribute__((packed)) sctp_ecne_chunk_t; 528 + } __packed sctp_ecne_chunk_t; 529 529 530 530 /* RFC 2960. Appendix A. Explicit Congestion Notification. 531 531 * Congestion Window Reduced (CWR) (13) ··· 537 537 typedef struct sctp_cwr_chunk { 538 538 sctp_chunkhdr_t chunk_hdr; 539 539 sctp_cwrhdr_t cwr_hdr; 540 - } __attribute__((packed)) sctp_cwr_chunk_t; 540 + } __packed sctp_cwr_chunk_t; 541 541 542 542 /* PR-SCTP 543 543 * 3.2 Forward Cumulative TSN Chunk Definition (FORWARD TSN) ··· 588 588 struct sctp_fwdtsn_skip { 589 589 __be16 stream; 590 590 __be16 ssn; 591 - } __attribute__((packed)); 591 + } __packed; 592 592 593 593 struct sctp_fwdtsn_hdr { 594 594 __be32 new_cum_tsn; 595 595 struct sctp_fwdtsn_skip skip[0]; 596 - } __attribute((packed)); 596 + } __packed; 597 597 598 598 struct sctp_fwdtsn_chunk { 599 599 struct sctp_chunkhdr chunk_hdr; 600 600 struct sctp_fwdtsn_hdr fwdtsn_hdr; 601 - } __attribute((packed)); 601 + } __packed; 602 602 603 603 604 604 /* ADDIP ··· 636 636 typedef struct sctp_addip_param { 637 637 sctp_paramhdr_t param_hdr; 638 638 __be32 crr_id; 639 - } __attribute__((packed)) sctp_addip_param_t; 639 + } __packed sctp_addip_param_t; 640 640 641 641 typedef struct sctp_addiphdr { 642 642 __be32 serial; 643 643 __u8 params[0]; 644 - } __attribute__((packed)) sctp_addiphdr_t; 644 + } __packed sctp_addiphdr_t; 645 645 646 646 typedef struct sctp_addip_chunk { 647 647 sctp_chunkhdr_t chunk_hdr; 648 648 sctp_addiphdr_t addip_hdr; 649 - } __attribute__((packed)) sctp_addip_chunk_t; 649 + } __packed sctp_addip_chunk_t; 650 650 651 651 /* AUTH 652 652 * Section 4.1 Authentication Chunk (AUTH) ··· 701 701 __be16 shkey_id; 702 702 __be16 hmac_id; 703 703 __u8 hmac[0]; 704 - } __attribute__((packed)) sctp_authhdr_t; 704 + } __packed sctp_authhdr_t; 705 705 706 706 typedef struct sctp_auth_chunk { 707 707 sctp_chunkhdr_t chunk_hdr; 708 708 sctp_authhdr_t auth_hdr; 709 - } __attribute__((packed)) sctp_auth_chunk_t; 709 + } __packed sctp_auth_chunk_t; 710 710 711 711 #endif /* __LINUX_SCTP_H__ */
+11 -11
include/linux/wlp.h
··· 300 300 __le16 cycle_param; 301 301 __le16 acw_anchor_addr; 302 302 u8 wssid_hash_list[]; 303 - } __attribute__((packed)); 303 + } __packed; 304 304 305 305 static inline int wlp_ie_hash_length(struct wlp_ie *ie) 306 306 { ··· 324 324 */ 325 325 struct wlp_nonce { 326 326 u8 data[16]; 327 - } __attribute__((packed)); 327 + } __packed; 328 328 329 329 /** 330 330 * WLP UUID ··· 336 336 */ 337 337 struct wlp_uuid { 338 338 u8 data[16]; 339 - } __attribute__((packed)); 339 + } __packed; 340 340 341 341 342 342 /** ··· 348 348 u8 OUI[3]; 349 349 u8 OUIsubdiv; 350 350 __le16 subID; 351 - } __attribute__((packed)); 351 + } __packed; 352 352 353 353 /** 354 354 * WLP frame header ··· 357 357 struct wlp_frame_hdr { 358 358 __le16 mux_hdr; /* WLP_PROTOCOL_ID */ 359 359 enum wlp_frame_type type:8; 360 - } __attribute__((packed)); 360 + } __packed; 361 361 362 362 /** 363 363 * WLP attribute field header ··· 368 368 struct wlp_attr_hdr { 369 369 __le16 type; 370 370 __le16 length; 371 - } __attribute__((packed)); 371 + } __packed; 372 372 373 373 /** 374 374 * Device information commonly used together ··· 401 401 struct wlp_attr_##name { \ 402 402 struct wlp_attr_hdr hdr; \ 403 403 type name; \ 404 - } __attribute__((packed)); 404 + } __packed; 405 405 406 406 #define wlp_attr_array(type, name) \ 407 407 struct wlp_attr_##name { \ 408 408 struct wlp_attr_hdr hdr; \ 409 409 type name[]; \ 410 - } __attribute__((packed)); 410 + } __packed; 411 411 412 412 /** 413 413 * WLP association attribute fields ··· 483 483 struct wlp_attr_accept_enrl accept; 484 484 struct wlp_attr_wss_sec_status sec_stat; 485 485 struct wlp_attr_wss_bcast bcast; 486 - } __attribute__((packed)); 486 + } __packed; 487 487 488 488 /* WLP WSS Information */ 489 489 wlp_attr_array(struct wlp_wss_info, wss_info) ··· 520 520 struct wlp_frame_std_abbrv_hdr { 521 521 struct wlp_frame_hdr hdr; 522 522 u8 tag; 523 - } __attribute__((packed)); 523 + } __packed; 524 524 525 525 /** 526 526 * WLP association frames ··· 533 533 struct wlp_attr_version version; 534 534 struct wlp_attr_msg_type msg_type; 535 535 u8 attr[]; 536 - } __attribute__((packed)); 536 + } __packed; 537 537 538 538 /* Ethernet to dev address mapping */ 539 539 struct wlp_eda {
+4 -4
include/net/dn_dev.h
··· 101 101 __le16 dstnode; 102 102 __le16 srcnode; 103 103 __u8 forward; 104 - } __attribute__((packed)); 104 + } __packed; 105 105 106 106 struct dn_long_packet { 107 107 __u8 msgflg; ··· 115 115 __u8 visit_ct; 116 116 __u8 s_class; 117 117 __u8 pt; 118 - } __attribute__((packed)); 118 + } __packed; 119 119 120 120 /*------------------------- DRP - Routing messages ---------------------*/ 121 121 ··· 132 132 __u8 mpd; 133 133 __u8 datalen; 134 134 __u8 data[2]; 135 - } __attribute__((packed)); 135 + } __packed; 136 136 137 137 struct rtnode_hello_message { 138 138 __u8 msgflg; ··· 144 144 __u8 area; 145 145 __le16 timer; 146 146 __u8 mpd; 147 - } __attribute__((packed)); 147 + } __packed; 148 148 149 149 150 150 extern void dn_dev_init(void);
+8 -8
include/net/dn_nsp.h
··· 74 74 __u8 msgflg; 75 75 __le16 dstaddr; 76 76 __le16 srcaddr; 77 - } __attribute__((packed)); 77 + } __packed; 78 78 79 79 struct nsp_data_opt_msg { 80 80 __le16 acknum; 81 81 __le16 segnum; 82 82 __le16 lsflgs; 83 - } __attribute__((packed)); 83 + } __packed; 84 84 85 85 struct nsp_data_opt_msg1 { 86 86 __le16 acknum; 87 87 __le16 segnum; 88 - } __attribute__((packed)); 88 + } __packed; 89 89 90 90 91 91 /* Acknowledgment Message (data/other data) */ ··· 94 94 __le16 dstaddr; 95 95 __le16 srcaddr; 96 96 __le16 acknum; 97 - } __attribute__((packed)); 97 + } __packed; 98 98 99 99 /* Connect Acknowledgment Message */ 100 100 struct nsp_conn_ack_msg { 101 101 __u8 msgflg; 102 102 __le16 dstaddr; 103 - } __attribute__((packed)); 103 + } __packed; 104 104 105 105 106 106 /* Connect Initiate/Retransmit Initiate/Connect Confirm */ ··· 117 117 #define NSP_FC_MASK 0x0c /* FC type mask */ 118 118 __u8 info; 119 119 __le16 segsize; 120 - } __attribute__((packed)); 120 + } __packed; 121 121 122 122 /* Disconnect Initiate/Disconnect Confirm */ 123 123 struct nsp_disconn_init_msg { ··· 125 125 __le16 dstaddr; 126 126 __le16 srcaddr; 127 127 __le16 reason; 128 - } __attribute__((packed)); 128 + } __packed; 129 129 130 130 131 131 ··· 135 135 __le16 grpcode; 136 136 __le16 usrcode; 137 137 __u8 dlen; 138 - } __attribute__((packed)); 138 + } __packed; 139 139 140 140 /* 141 141 * A collection of functions for manipulating the sequence
+1 -1
include/net/ip6_tunnel.h
··· 27 27 __u8 type; /* type-code for option */ 28 28 __u8 length; /* option length */ 29 29 __u8 encap_limit; /* tunnel encapsulation limit */ 30 - } __attribute__ ((packed)); 30 + } __packed; 31 31 32 32 #endif
+4 -4
include/net/ipx.h
··· 27 27 #define IPX_MAX_PPROP_HOPS 8 28 28 29 29 struct ipxhdr { 30 - __be16 ipx_checksum __attribute__ ((packed)); 30 + __be16 ipx_checksum __packed; 31 31 #define IPX_NO_CHECKSUM cpu_to_be16(0xFFFF) 32 - __be16 ipx_pktsize __attribute__ ((packed)); 32 + __be16 ipx_pktsize __packed; 33 33 __u8 ipx_tctrl; 34 34 __u8 ipx_type; 35 35 #define IPX_TYPE_UNKNOWN 0x00 ··· 38 38 #define IPX_TYPE_SPX 0x05 /* SPX protocol */ 39 39 #define IPX_TYPE_NCP 0x11 /* $lots for docs on this (SPIT) */ 40 40 #define IPX_TYPE_PPROP 0x14 /* complicated flood fill brdcast */ 41 - struct ipx_address ipx_dest __attribute__ ((packed)); 42 - struct ipx_address ipx_source __attribute__ ((packed)); 41 + struct ipx_address ipx_dest __packed; 42 + struct ipx_address ipx_source __packed; 43 43 }; 44 44 45 45 static __inline__ struct ipxhdr *ipx_hdr(struct sk_buff *skb)
+1 -1
include/net/mip6.h
··· 39 39 __u16 ip6mh_cksum; 40 40 /* Followed by type specific messages */ 41 41 __u8 data[0]; 42 - } __attribute__ ((__packed__)); 42 + } __packed; 43 43 44 44 #define IP6_MH_TYPE_BRR 0 /* Binding Refresh Request */ 45 45 #define IP6_MH_TYPE_HOTI 1 /* HOTI Message */
+1 -1
include/net/ndisc.h
··· 82 82 struct nd_opt_hdr { 83 83 __u8 nd_opt_type; 84 84 __u8 nd_opt_len; 85 - } __attribute__((__packed__)); 85 + } __packed; 86 86 87 87 88 88 extern int ndisc_init(void);
+2 -2
include/net/sctp/structs.h
··· 443 443 __u8 signature[SCTP_SECRET_SIZE]; 444 444 __u32 __pad; /* force sctp_cookie alignment to 64 bits */ 445 445 struct sctp_cookie c; 446 - } __attribute__((packed)); 446 + } __packed; 447 447 448 448 /* This is another convenience type to allocate memory for address 449 449 * params for the maximum size and pass such structures around ··· 488 488 union sctp_addr daddr; 489 489 unsigned long sent_at; 490 490 __u64 hb_nonce; 491 - } __attribute__((packed)) sctp_sender_hb_info_t; 491 + } __packed sctp_sender_hb_info_t; 492 492 493 493 /* 494 494 * RFC 2960 1.3.2 Sequenced Delivery within Streams
+4 -4
include/rxrpc/packet.h
··· 65 65 }; 66 66 __be16 serviceId; /* service ID */ 67 67 68 - } __attribute__((packed)); 68 + } __packed; 69 69 70 70 #define __rxrpc_header_off(X) offsetof(struct rxrpc_header,X) 71 71 ··· 120 120 #define RXRPC_ACK_TYPE_NACK 0 121 121 #define RXRPC_ACK_TYPE_ACK 1 122 122 123 - } __attribute__((packed)); 123 + } __packed; 124 124 125 125 /* 126 126 * ACK packets can have a further piece of information tagged on the end ··· 141 141 __be32 nonce; /* encrypted random number */ 142 142 __be32 min_level; /* minimum security level */ 143 143 __be32 __padding; /* padding to 8-byte boundary */ 144 - } __attribute__((packed)); 144 + } __packed; 145 145 146 146 /*****************************************************************************/ 147 147 /* ··· 164 164 165 165 __be32 kvno; /* Kerberos key version number */ 166 166 __be32 ticket_len; /* Kerberos ticket length */ 167 - } __attribute__((packed)); 167 + } __packed; 168 168 169 169 /*****************************************************************************/ 170 170 /*
+4 -4
net/bluetooth/bnep/bnep.h
··· 86 86 __u8 ctrl; 87 87 __u8 uuid_size; 88 88 __u8 service[0]; 89 - } __attribute__((packed)); 89 + } __packed; 90 90 91 91 struct bnep_set_filter_req { 92 92 __u8 type; 93 93 __u8 ctrl; 94 94 __be16 len; 95 95 __u8 list[0]; 96 - } __attribute__((packed)); 96 + } __packed; 97 97 98 98 struct bnep_control_rsp { 99 99 __u8 type; 100 100 __u8 ctrl; 101 101 __be16 resp; 102 - } __attribute__((packed)); 102 + } __packed; 103 103 104 104 struct bnep_ext_hdr { 105 105 __u8 type; 106 106 __u8 len; 107 107 __u8 data[0]; 108 - } __attribute__((packed)); 108 + } __packed; 109 109 110 110 /* BNEP ioctl defines */ 111 111 #define BNEPCONNADD _IOW('B', 200, int)
+3 -3
net/compat.c
··· 531 531 __u32 gr_interface; 532 532 struct __kernel_sockaddr_storage gr_group 533 533 __attribute__ ((aligned(4))); 534 - } __attribute__ ((packed)); 534 + } __packed; 535 535 536 536 struct compat_group_source_req { 537 537 __u32 gsr_interface; ··· 539 539 __attribute__ ((aligned(4))); 540 540 struct __kernel_sockaddr_storage gsr_source 541 541 __attribute__ ((aligned(4))); 542 - } __attribute__ ((packed)); 542 + } __packed; 543 543 544 544 struct compat_group_filter { 545 545 __u32 gf_interface; ··· 549 549 __u32 gf_numsrc; 550 550 struct __kernel_sockaddr_storage gf_slist[1] 551 551 __attribute__ ((aligned(4))); 552 - } __attribute__ ((packed)); 552 + } __packed; 553 553 554 554 #define __COMPAT_GF0_SIZE (sizeof(struct compat_group_filter) - \ 555 555 sizeof(struct __kernel_sockaddr_storage))
+7 -7
net/iucv/iucv.c
··· 1463 1463 u32 res3; 1464 1464 u8 ippollfg; 1465 1465 u8 res4[3]; 1466 - } __attribute__ ((packed)); 1466 + } __packed; 1467 1467 1468 1468 static void iucv_path_pending(struct iucv_irq_data *data) 1469 1469 { ··· 1524 1524 u32 res3; 1525 1525 u8 ippollfg; 1526 1526 u8 res4[3]; 1527 - } __attribute__ ((packed)); 1527 + } __packed; 1528 1528 1529 1529 static void iucv_path_complete(struct iucv_irq_data *data) 1530 1530 { ··· 1554 1554 u32 res4; 1555 1555 u8 ippollfg; 1556 1556 u8 res5[3]; 1557 - } __attribute__ ((packed)); 1557 + } __packed; 1558 1558 1559 1559 static void iucv_path_severed(struct iucv_irq_data *data) 1560 1560 { ··· 1590 1590 u32 res4; 1591 1591 u8 ippollfg; 1592 1592 u8 res5[3]; 1593 - } __attribute__ ((packed)); 1593 + } __packed; 1594 1594 1595 1595 static void iucv_path_quiesced(struct iucv_irq_data *data) 1596 1596 { ··· 1618 1618 u32 res4; 1619 1619 u8 ippollfg; 1620 1620 u8 res5[3]; 1621 - } __attribute__ ((packed)); 1621 + } __packed; 1622 1622 1623 1623 static void iucv_path_resumed(struct iucv_irq_data *data) 1624 1624 { ··· 1649 1649 u32 ipbfln2f; 1650 1650 u8 ippollfg; 1651 1651 u8 res2[3]; 1652 - } __attribute__ ((packed)); 1652 + } __packed; 1653 1653 1654 1654 static void iucv_message_complete(struct iucv_irq_data *data) 1655 1655 { ··· 1694 1694 u32 ipbfln2f; 1695 1695 u8 ippollfg; 1696 1696 u8 res2[3]; 1697 - } __attribute__ ((packed)); 1697 + } __packed; 1698 1698 1699 1699 static void iucv_message_pending(struct iucv_irq_data *data) 1700 1700 {
+1 -1
net/mac80211/cfg.c
··· 600 600 u8 ssap; /* 0 */ 601 601 u8 control; 602 602 u8 xid_info[3]; 603 - } __attribute__ ((packed)); 603 + } __packed; 604 604 605 605 static void ieee80211_send_layer2_update(struct sta_info *sta) 606 606 {
+1 -1
net/mac80211/ieee80211_i.h
··· 1084 1084 u8 padding_for_rate; 1085 1085 __le16 tx_flags; 1086 1086 u8 data_retries; 1087 - } __attribute__ ((packed)); 1087 + } __packed; 1088 1088 1089 1089 1090 1090 /* HT */
+1 -1
net/mac80211/rx.c
··· 2139 2139 u8 rate_or_pad; 2140 2140 __le16 chan_freq; 2141 2141 __le16 chan_flags; 2142 - } __attribute__ ((packed)) *rthdr; 2142 + } __packed *rthdr; 2143 2143 struct sk_buff *skb = rx->skb, *skb2; 2144 2144 struct net_device *prev_dev = NULL; 2145 2145 struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
+1 -1
net/sctp/sm_make_chunk.c
··· 1817 1817 struct __sctp_missing { 1818 1818 __be32 num_missing; 1819 1819 __be16 type; 1820 - } __attribute__((packed)); 1820 + } __packed; 1821 1821 1822 1822 /* 1823 1823 * Report a missing mandatory parameter.