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

staging: unisys: convert pack pragma to __packed

It was noticed that iochannel.h was still using pragmas to
pack the datastructures, should be using __packed instead.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

David Kershner and committed by
Greg Kroah-Hartman
5e54654c c20a99f8

+18 -27
+18 -27
drivers/staging/unisys/include/iochannel.h
··· 147 147 VDISK_MGMT_RELEASE, 148 148 }; 149 149 150 - /* structs with pragma pack */ 151 - 152 150 struct phys_info { 153 151 u64 pi_pfn; 154 152 u16 pi_off; 155 153 u16 pi_len; 156 154 } __packed; 157 155 158 - /* ///////////// BEGIN PRAGMA PACK PUSH 1 ///////////////////////// */ 159 - /* ///////////// ONLY STRUCT TYPE SHOULD BE BELOW */ 160 - 161 - #pragma pack(push, 1) 162 - 163 156 struct guest_phys_info { 164 157 u64 address; 165 158 u64 length; 166 - }; 159 + } __packed; 167 160 168 161 #define GPI_ENTRIES_PER_PAGE (PAGE_SIZE / sizeof(struct guest_phys_info)) 169 162 ··· 164 171 u32 channel; /* channel == bus number */ 165 172 u32 id; /* id == target number */ 166 173 u32 lun; /* lun == logical unit number */ 167 - }; 174 + } __packed; 168 175 169 176 struct vhba_wwnn { 170 177 u32 wwnn1; 171 178 u32 wwnn2; 172 - }; 179 + } __packed; 173 180 174 181 /* WARNING: Values stired in this structure must contain maximum counts (not 175 182 * maximum values). */ ··· 186 193 * bus */ 187 194 /* max io size is often determined by the resource of the hba. e.g */ 188 195 /* max scatter gather list length * page size / sector size */ 189 - }; 196 + } __packed; 190 197 191 198 struct uiscmdrsp_scsi { 192 199 void *scsicmd; /* the handle to the cmd that was received - ··· 225 232 * scsi.linuxstat is SAM_STAT_GOOD 226 233 * That is, there is NO error. 227 234 */ 228 - }; 235 + } __packed; 229 236 230 237 /* Defines to support sending correct inquiry result when no disk is 231 238 * configured. ··· 339 346 u8 additional_sense_code_qualifier; 340 347 u8 fru_code; 341 348 u8 sense_key_specific[3]; 342 - }; 349 + } __packed; 343 350 344 351 struct net_pkt_xmt { 345 352 int len; /* full length of data in the packet */ ··· 367 374 * guest memory to get to the header. uisnic needs ethhdr to 368 375 * determine how to route the packet. 369 376 */ 370 - }; 377 + } __packed; 371 378 372 379 struct net_pkt_xmtdone { 373 380 u32 xmt_done_result; /* result of NET_XMIT */ 374 - }; 381 + } __packed; 375 382 376 383 /* RCVPOST_BUF_SIZe must be at most page_size(4096) - cache_line_size (64) The 377 384 * reason is because dev_skb_alloc which is used to generate RCV_POST skbs in ··· 393 400 u64 unique_num; /* This is used to make sure that 394 401 * receive posts are returned to */ 395 402 /* the Adapter which we sent them originally. */ 396 - }; 403 + } __packed; 397 404 398 405 struct net_pkt_rcv { 399 406 /* the number of receive buffers that can be chained */ ··· 407 414 /* NOTE: first rcvbuf in the chain will also be provided in net.buf. */ 408 415 u64 unique_num; 409 416 u32 rcvs_dropped_delta; 410 - }; 417 + } __packed; 411 418 412 419 struct net_pkt_enbdis { 413 420 void *context; 414 421 u16 enable; /* 1 = enable, 0 = disable */ 415 - }; 422 + } __packed; 416 423 417 424 struct net_pkt_macaddr { 418 425 void *context; 419 426 u8 macaddr[MAX_MACADDR_LEN]; /* 6 bytes */ 420 - }; 427 + } __packed; 421 428 422 429 /* cmd rsp packet used for VNIC network traffic */ 423 430 struct uiscmdrsp_net { ··· 434 441 /* and NET_CONNECT_STATUS */ 435 442 struct net_pkt_macaddr macaddr; 436 443 }; 437 - }; 444 + } __packed; 438 445 439 446 struct uiscmdrsp_scsitaskmgmt { 440 447 enum task_mgmt_types tasktype; ··· 471 478 472 479 /* result of taskmgmt command - set by IOPart - values are: */ 473 480 #define TASK_MGMT_FAILED 0 474 - }; 481 + } __packed; 475 482 476 483 /* The following is used by uissd to send disk add/remove notifications to 477 484 * Guest */ ··· 481 488 void *v_hba; /* Pointer to vhba_info for channel info to 482 489 * route msg */ 483 490 u32 channel, id, lun; /* SCSI Path of Disk to added or removed */ 484 - }; 491 + } __packed; 485 492 486 493 /* The following is used by virthba/vSCSI to send the Acquire/Release commands 487 494 * to the IOVM. */ ··· 520 527 521 528 /* result of taskmgmt command - set by IOPart - values are: */ 522 529 #define VDISK_MGMT_FAILED 0 523 - }; 530 + } __packed; 524 531 525 532 /* keeping cmd & rsp info in one structure for now cmd rsp packet for scsi */ 526 533 struct uiscmdrsp { ··· 544 551 struct uiscmdrsp *next; /* General Purpose Queue Link */ 545 552 struct uiscmdrsp *activeQ_next; /* Used to track active commands */ 546 553 struct uiscmdrsp *activeQ_prev; /* Used to track active commands */ 547 - }; 554 + } __packed; 548 555 549 556 /* This is just the header of the IO channel. It is assumed that directly after 550 557 * this header there is a large region of memory which contains the command and ··· 570 577 #define MAX_CLIENTSTRING_LEN 1024 571 578 u8 client_string[MAX_CLIENTSTRING_LEN];/* NULL terminated - so holds 572 579 * max - 1 bytes */ 573 - }; 580 + } __packed; 574 581 575 - #pragma pack(pop) 576 - /* ///////////// END PRAGMA PACK PUSH 1 /////////////////////////// */ 577 582 578 583 /* 579 584 * INLINE functions for initializing and accessing I/O data channels