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

smb: fix some warnings reported by scripts/checkpatch.pl

Fix the following warnings:

WARNING: __always_unused or __maybe_unused is preferred over \
__attribute__((__unused__))
WARNING: Prefer __packed over __attribute__((packed))

Signed-off-by: ChenXiaoSong <chenxiaosong@kylinos.cn>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>

authored by

ChenXiaoSong and committed by
Steve French
e7e60e8b 95e8c1bf

+139 -139
+125 -125
fs/smb/client/cifspdu.h
··· 425 425 struct { 426 426 unsigned char GUID[SMB1_CLIENT_GUID_SIZE]; 427 427 unsigned char SecurityBlob[]; 428 - } __attribute__((packed)) extended_response; 429 - } __attribute__((packed)) u; 428 + } __packed extended_response; 429 + } __packed u; 430 430 } __packed SMB_NEGOTIATE_RSP; 431 431 432 432 /* SecurityMode bits */ ··· 474 474 unsigned char SecurityBlob[]; /* followed by */ 475 475 /* STRING NativeOS */ 476 476 /* STRING NativeLanMan */ 477 - } __attribute__((packed)) req; /* NTLM request format (with 477 + } __packed req; /* NTLM request format (with 478 478 extended security */ 479 479 480 480 struct { /* request format */ ··· 497 497 /* STRING PrimaryDomain */ 498 498 /* STRING NativeOS */ 499 499 /* STRING NativeLanMan */ 500 - } __attribute__((packed)) req_no_secext; /* NTLM request format (without 500 + } __packed req_no_secext; /* NTLM request format (without 501 501 extended security */ 502 502 503 503 struct { /* default (NTLM) response format */ ··· 512 512 /* unsigned char * NativeOS; */ 513 513 /* unsigned char * NativeLanMan; */ 514 514 /* unsigned char * PrimaryDomain; */ 515 - } __attribute__((packed)) resp; /* NTLM response 515 + } __packed resp; /* NTLM response 516 516 (with or without extended sec) */ 517 517 518 518 struct { /* request format */ ··· 532 532 /* STRING PrimaryDomain */ 533 533 /* STRING NativeOS */ 534 534 /* STRING NativeLanMan */ 535 - } __attribute__((packed)) old_req; /* pre-NTLM (LANMAN2.1) req format */ 535 + } __packed old_req; /* pre-NTLM (LANMAN2.1) req format */ 536 536 537 537 struct { /* default (NTLM) response format */ 538 538 struct smb_hdr hdr; /* wct = 3 */ ··· 544 544 unsigned char NativeOS[]; /* followed by */ 545 545 /* unsigned char * NativeLanMan; */ 546 546 /* unsigned char * PrimaryDomain; */ 547 - } __attribute__((packed)) old_resp; /* pre-NTLM (LANMAN2.1) response */ 548 - } __attribute__((packed)) SESSION_SETUP_ANDX; 547 + } __packed old_resp; /* pre-NTLM (LANMAN2.1) response */ 548 + } __packed SESSION_SETUP_ANDX; 549 549 550 550 /* format of NLTMv2 Response ie "case sensitive password" hash when NTLMv2 */ 551 551 ··· 559 559 __le16 type; 560 560 __le16 length; 561 561 __u8 data[]; 562 - } __attribute__((packed)); 562 + } __packed; 563 563 564 564 struct ntlmv2_resp { 565 565 union { ··· 567 567 struct { 568 568 __u8 reserved[8]; 569 569 __u8 key[CIFS_SERVER_CHALLENGE_SIZE]; 570 - } __attribute__((packed)) challenge; 571 - } __attribute__((packed)); 570 + } __packed challenge; 571 + } __packed; 572 572 __le32 blob_signature; 573 573 __u32 reserved; 574 574 __le64 time; 575 575 __u64 client_chal; /* random */ 576 576 __u32 reserved2; 577 577 /* array of name entries could follow ending in minimum 4 byte struct */ 578 - } __attribute__((packed)); 578 + } __packed; 579 579 580 580 581 581 #define CIFS_NETWORK_OPSYS "CIFS VFS Client for Linux" ··· 610 610 unsigned char Password[]; /* followed by */ 611 611 /* STRING Path *//* \\server\share name */ 612 612 /* STRING Service */ 613 - } __attribute__((packed)) TCONX_REQ; 613 + } __packed TCONX_REQ; 614 614 615 615 typedef struct smb_com_tconx_rsp { 616 616 struct smb_hdr hdr; /* wct = 3 , not extended response */ ··· 621 621 __u16 ByteCount; 622 622 unsigned char Service[]; /* always ASCII, not Unicode */ 623 623 /* STRING NativeFileSystem */ 624 - } __attribute__((packed)) TCONX_RSP; 624 + } __packed TCONX_RSP; 625 625 626 626 typedef struct smb_com_tconx_rsp_ext { 627 627 struct smb_hdr hdr; /* wct = 7, extended response */ ··· 634 634 __u16 ByteCount; 635 635 unsigned char Service[]; /* always ASCII, not Unicode */ 636 636 /* STRING NativeFileSystem */ 637 - } __attribute__((packed)) TCONX_RSP_EXT; 637 + } __packed TCONX_RSP_EXT; 638 638 639 639 640 640 /* tree connect Flags */ ··· 670 670 __le16 EchoCount; 671 671 __le16 ByteCount; 672 672 char Data[]; 673 - } __attribute__((packed)) ECHO_REQ; 673 + } __packed ECHO_REQ; 674 674 675 675 typedef struct smb_com_echo_rsp { 676 676 struct smb_hdr hdr; 677 677 __le16 SequenceNumber; 678 678 __le16 ByteCount; 679 679 char Data[]; 680 - } __attribute__((packed)) ECHO_RSP; 680 + } __packed ECHO_RSP; 681 681 682 682 typedef struct smb_com_logoff_andx_req { 683 683 struct smb_hdr hdr; /* wct = 2 */ ··· 685 685 __u8 AndXReserved; 686 686 __u16 AndXOffset; 687 687 __u16 ByteCount; 688 - } __attribute__((packed)) LOGOFF_ANDX_REQ; 688 + } __packed LOGOFF_ANDX_REQ; 689 689 690 690 typedef struct smb_com_logoff_andx_rsp { 691 691 struct smb_hdr hdr; /* wct = 2 */ ··· 693 693 __u8 AndXReserved; 694 694 __u16 AndXOffset; 695 695 __u16 ByteCount; 696 - } __attribute__((packed)) LOGOFF_ANDX_RSP; 696 + } __packed LOGOFF_ANDX_RSP; 697 697 698 698 typedef union smb_com_tree_disconnect { /* as an alternative can use flag on 699 699 tree_connect PDU to effect disconnect */ ··· 701 701 struct { 702 702 struct smb_hdr hdr; /* wct = 0 */ 703 703 __u16 ByteCount; /* bcc = 0 */ 704 - } __attribute__((packed)) req; 704 + } __packed req; 705 705 struct { 706 706 struct smb_hdr hdr; /* wct = 0 */ 707 707 __u16 ByteCount; /* bcc = 0 */ 708 - } __attribute__((packed)) resp; 709 - } __attribute__((packed)) TREE_DISCONNECT; 708 + } __packed resp; 709 + } __packed TREE_DISCONNECT; 710 710 711 711 typedef struct smb_com_close_req { 712 712 struct smb_hdr hdr; /* wct = 3 */ 713 713 __u16 FileID; 714 714 __u32 LastWriteTime; /* should be zero or -1 */ 715 715 __u16 ByteCount; /* 0 */ 716 - } __attribute__((packed)) CLOSE_REQ; 716 + } __packed CLOSE_REQ; 717 717 718 718 typedef struct smb_com_close_rsp { 719 719 struct smb_hdr hdr; /* wct = 0 */ 720 720 __u16 ByteCount; /* bct = 0 */ 721 - } __attribute__((packed)) CLOSE_RSP; 721 + } __packed CLOSE_RSP; 722 722 723 723 typedef struct smb_com_flush_req { 724 724 struct smb_hdr hdr; /* wct = 1 */ 725 725 __u16 FileID; 726 726 __u16 ByteCount; /* 0 */ 727 - } __attribute__((packed)) FLUSH_REQ; 727 + } __packed FLUSH_REQ; 728 728 729 729 typedef struct smb_com_findclose_req { 730 730 struct smb_hdr hdr; /* wct = 1 */ 731 731 __u16 FileID; 732 732 __u16 ByteCount; /* 0 */ 733 - } __attribute__((packed)) FINDCLOSE_REQ; 733 + } __packed FINDCLOSE_REQ; 734 734 735 735 /* OpenFlags */ 736 736 #define REQ_MORE_INFO 0x00000001 /* legacy (OPEN_AND_X) only */ ··· 777 777 __u8 SecurityFlags; 778 778 __le16 ByteCount; 779 779 char fileName[]; 780 - } __attribute__((packed)) OPEN_REQ; 780 + } __packed OPEN_REQ; 781 781 782 782 /* open response: oplock levels */ 783 783 #define OPLOCK_NONE 0 ··· 809 809 __le16 DeviceState; 810 810 __u8 DirectoryFlag; 811 811 __u16 ByteCount; /* bct = 0 */ 812 - } __attribute__((packed)) OPEN_RSP; 812 + } __packed OPEN_RSP; 813 813 814 814 typedef struct smb_com_open_rsp_ext { 815 815 struct smb_hdr hdr; /* wct = 42 but meaningless due to MS bug? */ ··· 834 834 __le32 MaximalAccessRights; 835 835 __le32 GuestMaximalAccessRights; 836 836 __u16 ByteCount; /* bct = 0 */ 837 - } __attribute__((packed)) OPEN_RSP_EXT; 837 + } __packed OPEN_RSP_EXT; 838 838 839 839 840 840 /* format of legacy open request */ ··· 854 854 __le32 Reserved; 855 855 __le16 ByteCount; /* file name follows */ 856 856 char fileName[]; 857 - } __attribute__((packed)) OPENX_REQ; 857 + } __packed OPENX_REQ; 858 858 859 859 typedef struct smb_com_openx_rsp { 860 860 struct smb_hdr hdr; /* wct = 15 */ ··· 872 872 __u32 FileId; 873 873 __u16 Reserved; 874 874 __u16 ByteCount; 875 - } __attribute__((packed)) OPENX_RSP; 875 + } __packed OPENX_RSP; 876 876 877 877 /* For encoding of POSIX Open Request - see trans2 function 0x209 data struct */ 878 878 ··· 894 894 __u8 Pad; /* BB check for whether padded to DWORD 895 895 boundary and optimum performance here */ 896 896 char Data[]; 897 - } __attribute__((packed)) WRITEX_REQ; 897 + } __packed WRITEX_REQ; 898 898 899 899 typedef struct smb_com_write_req { 900 900 struct smb_hdr hdr; /* wct = 14 */ ··· 914 914 __u8 Pad; /* BB check for whether padded to DWORD 915 915 boundary and optimum performance here */ 916 916 char Data[]; 917 - } __attribute__((packed)) WRITE_REQ; 917 + } __packed WRITE_REQ; 918 918 919 919 typedef struct smb_com_write_rsp { 920 920 struct smb_hdr hdr; /* wct = 6 */ ··· 926 926 __le16 CountHigh; 927 927 __u16 Reserved; 928 928 __u16 ByteCount; 929 - } __attribute__((packed)) WRITE_RSP; 929 + } __packed WRITE_RSP; 930 930 931 931 /* legacy read request for older servers */ 932 932 typedef struct smb_com_readx_req { ··· 941 941 __le32 Reserved; 942 942 __le16 Remaining; 943 943 __le16 ByteCount; 944 - } __attribute__((packed)) READX_REQ; 944 + } __packed READX_REQ; 945 945 946 946 typedef struct smb_com_read_req { 947 947 struct smb_hdr hdr; /* wct = 12 */ ··· 956 956 __le16 Remaining; 957 957 __le32 OffsetHigh; 958 958 __le16 ByteCount; 959 - } __attribute__((packed)) READ_REQ; 959 + } __packed READ_REQ; 960 960 961 961 typedef struct smb_com_read_rsp { 962 962 struct smb_hdr hdr; /* wct = 12 */ ··· 972 972 __u64 Reserved2; 973 973 __u16 ByteCount; 974 974 /* read response data immediately follows */ 975 - } __attribute__((packed)) READ_RSP; 975 + } __packed READ_RSP; 976 976 977 977 typedef struct locking_andx_range { 978 978 __le16 Pid; ··· 981 981 __le32 OffsetLow; 982 982 __le32 LengthHigh; 983 983 __le32 LengthLow; 984 - } __attribute__((packed)) LOCKING_ANDX_RANGE; 984 + } __packed LOCKING_ANDX_RANGE; 985 985 986 986 #define LOCKING_ANDX_SHARED_LOCK 0x01 987 987 #define LOCKING_ANDX_OPLOCK_RELEASE 0x02 ··· 1002 1002 __le16 NumberOfLocks; 1003 1003 __le16 ByteCount; 1004 1004 LOCKING_ANDX_RANGE Locks[]; 1005 - } __attribute__((packed)) LOCK_REQ; 1005 + } __packed LOCK_REQ; 1006 1006 1007 1007 /* lock type */ 1008 1008 #define CIFS_RDLCK 0 ··· 1015 1015 __le64 start; 1016 1016 __le64 length; 1017 1017 /* BB what about additional owner info to identify network client */ 1018 - } __attribute__((packed)) CIFS_POSIX_LOCK; 1018 + } __packed CIFS_POSIX_LOCK; 1019 1019 1020 1020 typedef struct smb_com_lock_rsp { 1021 1021 struct smb_hdr hdr; /* wct = 2 */ ··· 1023 1023 __u8 AndXReserved; 1024 1024 __le16 AndXOffset; 1025 1025 __u16 ByteCount; 1026 - } __attribute__((packed)) LOCK_RSP; 1026 + } __packed LOCK_RSP; 1027 1027 1028 1028 typedef struct smb_com_rename_req { 1029 1029 struct smb_hdr hdr; /* wct = 1 */ ··· 1033 1033 unsigned char OldFileName[]; 1034 1034 /* followed by __u8 BufferFormat2 */ 1035 1035 /* followed by NewFileName */ 1036 - } __attribute__((packed)) RENAME_REQ; 1036 + } __packed RENAME_REQ; 1037 1037 1038 1038 /* copy request flags */ 1039 1039 #define COPY_MUST_BE_FILE 0x0001 ··· 1053 1053 unsigned char OldFileName[]; 1054 1054 /* followed by __u8 BufferFormat2 */ 1055 1055 /* followed by NewFileName string */ 1056 - } __attribute__((packed)) COPY_REQ; 1056 + } __packed COPY_REQ; 1057 1057 1058 1058 typedef struct smb_com_copy_rsp { 1059 1059 struct smb_hdr hdr; /* wct = 1 */ ··· 1061 1061 __u16 ByteCount; /* may be zero */ 1062 1062 __u8 BufferFormat; /* 0x04 - only present if errored file follows */ 1063 1063 unsigned char ErrorFileName[]; /* only present if error in copy */ 1064 - } __attribute__((packed)) COPY_RSP; 1064 + } __packed COPY_RSP; 1065 1065 1066 1066 #define CREATE_HARD_LINK 0x103 1067 1067 #define MOVEFILE_COPY_ALLOWED 0x0002 ··· 1077 1077 unsigned char OldFileName[]; 1078 1078 /* followed by __u8 BufferFormat2 */ 1079 1079 /* followed by NewFileName */ 1080 - } __attribute__((packed)) NT_RENAME_REQ; 1080 + } __packed NT_RENAME_REQ; 1081 1081 1082 1082 typedef struct smb_com_rename_rsp { 1083 1083 struct smb_hdr hdr; /* wct = 0 */ 1084 1084 __u16 ByteCount; /* bct = 0 */ 1085 - } __attribute__((packed)) RENAME_RSP; 1085 + } __packed RENAME_RSP; 1086 1086 1087 1087 typedef struct smb_com_delete_file_req { 1088 1088 struct smb_hdr hdr; /* wct = 1 */ ··· 1090 1090 __le16 ByteCount; 1091 1091 __u8 BufferFormat; /* 4 = ASCII */ 1092 1092 unsigned char fileName[]; 1093 - } __attribute__((packed)) DELETE_FILE_REQ; 1093 + } __packed DELETE_FILE_REQ; 1094 1094 1095 1095 typedef struct smb_com_delete_file_rsp { 1096 1096 struct smb_hdr hdr; /* wct = 0 */ 1097 1097 __u16 ByteCount; /* bct = 0 */ 1098 - } __attribute__((packed)) DELETE_FILE_RSP; 1098 + } __packed DELETE_FILE_RSP; 1099 1099 1100 1100 typedef struct smb_com_delete_directory_req { 1101 1101 struct smb_hdr hdr; /* wct = 0 */ 1102 1102 __le16 ByteCount; 1103 1103 __u8 BufferFormat; /* 4 = ASCII */ 1104 1104 unsigned char DirName[]; 1105 - } __attribute__((packed)) DELETE_DIRECTORY_REQ; 1105 + } __packed DELETE_DIRECTORY_REQ; 1106 1106 1107 1107 typedef struct smb_com_delete_directory_rsp { 1108 1108 struct smb_hdr hdr; /* wct = 0 */ 1109 1109 __u16 ByteCount; /* bct = 0 */ 1110 - } __attribute__((packed)) DELETE_DIRECTORY_RSP; 1110 + } __packed DELETE_DIRECTORY_RSP; 1111 1111 1112 1112 typedef struct smb_com_create_directory_req { 1113 1113 struct smb_hdr hdr; /* wct = 0 */ 1114 1114 __le16 ByteCount; 1115 1115 __u8 BufferFormat; /* 4 = ASCII */ 1116 1116 unsigned char DirName[]; 1117 - } __attribute__((packed)) CREATE_DIRECTORY_REQ; 1117 + } __packed CREATE_DIRECTORY_REQ; 1118 1118 1119 1119 typedef struct smb_com_create_directory_rsp { 1120 1120 struct smb_hdr hdr; /* wct = 0 */ 1121 1121 __u16 ByteCount; /* bct = 0 */ 1122 - } __attribute__((packed)) CREATE_DIRECTORY_RSP; 1122 + } __packed CREATE_DIRECTORY_RSP; 1123 1123 1124 1124 typedef struct smb_com_query_information_req { 1125 1125 struct smb_hdr hdr; /* wct = 0 */ 1126 1126 __le16 ByteCount; /* 1 + namelen + 1 */ 1127 1127 __u8 BufferFormat; /* 4 = ASCII */ 1128 1128 unsigned char FileName[]; 1129 - } __attribute__((packed)) QUERY_INFORMATION_REQ; 1129 + } __packed QUERY_INFORMATION_REQ; 1130 1130 1131 1131 typedef struct smb_com_query_information_rsp { 1132 1132 struct smb_hdr hdr; /* wct = 10 */ ··· 1135 1135 __le32 size; 1136 1136 __u16 reserved[5]; 1137 1137 __le16 ByteCount; /* bcc = 0 */ 1138 - } __attribute__((packed)) QUERY_INFORMATION_RSP; 1138 + } __packed QUERY_INFORMATION_RSP; 1139 1139 1140 1140 typedef struct smb_com_setattr_req { 1141 1141 struct smb_hdr hdr; /* wct = 8 */ ··· 1145 1145 __le16 ByteCount; 1146 1146 __u8 BufferFormat; /* 4 = ASCII */ 1147 1147 unsigned char fileName[]; 1148 - } __attribute__((packed)) SETATTR_REQ; 1148 + } __packed SETATTR_REQ; 1149 1149 1150 1150 typedef struct smb_com_setattr_rsp { 1151 1151 struct smb_hdr hdr; /* wct = 0 */ 1152 1152 __u16 ByteCount; /* bct = 0 */ 1153 - } __attribute__((packed)) SETATTR_RSP; 1153 + } __packed SETATTR_RSP; 1154 1154 1155 1155 /* empty wct response to setattr */ 1156 1156 ··· 1178 1178 __le16 ByteCount; 1179 1179 __u8 Pad[3]; 1180 1180 __u8 Parms[]; 1181 - } __attribute__((packed)) NTRANSACT_REQ; 1181 + } __packed NTRANSACT_REQ; 1182 1182 1183 1183 typedef struct smb_com_ntransact_rsp { 1184 1184 struct smb_hdr hdr; /* wct = 18 */ ··· 1195 1195 __u16 ByteCount; 1196 1196 /* __u8 Pad[3]; */ 1197 1197 /* parms and data follow */ 1198 - } __attribute__((packed)) NTRANSACT_RSP; 1198 + } __packed NTRANSACT_RSP; 1199 1199 1200 1200 typedef struct smb_com_transaction_ioctl_req { 1201 1201 struct smb_hdr hdr; /* wct = 23 */ ··· 1219 1219 __le16 ByteCount; 1220 1220 __u8 Pad[3]; 1221 1221 __u8 Data[]; 1222 - } __attribute__((packed)) TRANSACT_IOCTL_REQ; 1222 + } __packed TRANSACT_IOCTL_REQ; 1223 1223 1224 1224 typedef struct smb_com_transaction_compr_ioctl_req { 1225 1225 struct smb_hdr hdr; /* wct = 23 */ ··· 1243 1243 __le16 ByteCount; 1244 1244 __u8 Pad[3]; 1245 1245 __le16 compression_state; /* See below for valid flags */ 1246 - } __attribute__((packed)) TRANSACT_COMPR_IOCTL_REQ; 1246 + } __packed TRANSACT_COMPR_IOCTL_REQ; 1247 1247 1248 1248 /* compression state flags */ 1249 1249 #define COMPRESSION_FORMAT_NONE 0x0000 ··· 1264 1264 __u8 SetupCount; /* 1 */ 1265 1265 __le16 ReturnedDataLen; 1266 1266 __le16 ByteCount; 1267 - } __attribute__((packed)) TRANSACT_IOCTL_RSP; 1267 + } __packed TRANSACT_IOCTL_RSP; 1268 1268 1269 1269 #define CIFS_ACL_OWNER 1 1270 1270 #define CIFS_ACL_GROUP 2 ··· 1291 1291 __u16 Fid; 1292 1292 __u16 Reserved2; 1293 1293 __le32 AclFlags; 1294 - } __attribute__((packed)) QUERY_SEC_DESC_REQ; 1294 + } __packed QUERY_SEC_DESC_REQ; 1295 1295 1296 1296 1297 1297 typedef struct smb_com_transaction_ssec_req { ··· 1314 1314 __u16 Fid; 1315 1315 __u16 Reserved2; 1316 1316 __le32 AclFlags; 1317 - } __attribute__((packed)) SET_SEC_DESC_REQ; 1317 + } __packed SET_SEC_DESC_REQ; 1318 1318 1319 1319 typedef struct smb_com_transaction_change_notify_req { 1320 1320 struct smb_hdr hdr; /* wct = 23 */ ··· 1338 1338 __le16 ByteCount; 1339 1339 /* __u8 Pad[3];*/ 1340 1340 /* __u8 Data[];*/ 1341 - } __attribute__((packed)) TRANSACT_CHANGE_NOTIFY_REQ; 1341 + } __packed TRANSACT_CHANGE_NOTIFY_REQ; 1342 1342 1343 1343 /* BB eventually change to use generic ntransact rsp struct 1344 1344 and validation routine */ ··· 1356 1356 __u8 SetupCount; /* 0 */ 1357 1357 __u16 ByteCount; 1358 1358 /* __u8 Pad[3]; */ 1359 - } __attribute__((packed)) TRANSACT_CHANGE_NOTIFY_RSP; 1359 + } __packed TRANSACT_CHANGE_NOTIFY_RSP; 1360 1360 /* Completion Filter flags for Notify */ 1361 1361 #define FILE_NOTIFY_CHANGE_FILE_NAME 0x00000001 1362 1362 #define FILE_NOTIFY_CHANGE_DIR_NAME 0x00000002 ··· 1387 1387 __le32 Action; 1388 1388 __le32 FileNameLength; 1389 1389 __u8 FileName[]; 1390 - } __attribute__((packed)); 1390 + } __packed; 1391 1391 1392 1392 struct cifs_quota_data { 1393 1393 __u32 rsrvd1; /* 0 */ ··· 1397 1397 __u64 soft_limit; 1398 1398 __u64 hard_limit; 1399 1399 char sid[]; /* variable size? */ 1400 - } __attribute__((packed)); 1400 + } __packed; 1401 1401 1402 1402 /* quota sub commands */ 1403 1403 #define QUOTA_LIST_CONTINUE 0 ··· 1423 1423 __u8 Reserved3; 1424 1424 __le16 SubCommand; /* 1st setup word - SetupCount words follow */ 1425 1425 __le16 ByteCount; 1426 - } __attribute__((packed)); 1426 + } __packed; 1427 1427 1428 1428 struct smb_t2_req { 1429 1429 struct smb_hdr hdr; 1430 1430 struct trans2_req t2_req; 1431 - } __attribute__((packed)); 1431 + } __packed; 1432 1432 1433 1433 struct trans2_resp { 1434 1434 /* struct smb_hdr hdr precedes. Note wct = 10 + setup count */ ··· 1447 1447 __u16 ByteCount; 1448 1448 __u16 Reserved2;*/ 1449 1449 /* data area follows */ 1450 - } __attribute__((packed)); 1450 + } __packed; 1451 1451 1452 1452 struct smb_t2_rsp { 1453 1453 struct smb_hdr hdr; 1454 1454 struct trans2_resp t2_rsp; 1455 - } __attribute__((packed)); 1455 + } __packed; 1456 1456 1457 1457 /* PathInfo/FileInfo infolevels */ 1458 1458 #define SMB_INFO_STANDARD 1 ··· 1549 1549 __le16 InformationLevel; 1550 1550 __u32 Reserved4; 1551 1551 char FileName[]; 1552 - } __attribute__((packed)) TRANSACTION2_QPI_REQ; 1552 + } __packed TRANSACTION2_QPI_REQ; 1553 1553 1554 1554 typedef struct smb_com_transaction2_qpi_rsp { 1555 1555 struct smb_hdr hdr; /* wct = 10 + SetupCount */ 1556 1556 struct trans2_resp t2; 1557 1557 __u16 ByteCount; 1558 1558 __u16 Reserved2; /* parameter word is present for infolevels > 100 */ 1559 - } __attribute__((packed)) TRANSACTION2_QPI_RSP; 1559 + } __packed TRANSACTION2_QPI_RSP; 1560 1560 1561 1561 typedef struct smb_com_transaction2_spi_req { 1562 1562 struct smb_hdr hdr; /* wct = 15 */ ··· 1582 1582 __le16 InformationLevel; 1583 1583 __u32 Reserved4; 1584 1584 char FileName[]; 1585 - } __attribute__((packed)) TRANSACTION2_SPI_REQ; 1585 + } __packed TRANSACTION2_SPI_REQ; 1586 1586 1587 1587 typedef struct smb_com_transaction2_spi_rsp { 1588 1588 struct smb_hdr hdr; /* wct = 10 + SetupCount */ 1589 1589 struct trans2_resp t2; 1590 1590 __u16 ByteCount; 1591 1591 __u16 Reserved2; /* parameter word is present for infolevels > 100 */ 1592 - } __attribute__((packed)) TRANSACTION2_SPI_RSP; 1592 + } __packed TRANSACTION2_SPI_RSP; 1593 1593 1594 1594 struct set_file_rename { 1595 1595 __le32 overwrite; /* 1 = overwrite dest */ 1596 1596 __u32 root_fid; /* zero */ 1597 1597 __le32 target_name_len; 1598 1598 char target_name[]; /* Must be unicode */ 1599 - } __attribute__((packed)); 1599 + } __packed; 1600 1600 1601 1601 struct smb_com_transaction2_sfi_req { 1602 1602 struct smb_hdr hdr; /* wct = 15 */ ··· 1623 1623 __le16 InformationLevel; 1624 1624 __u16 Reserved4; 1625 1625 __u8 payload[]; 1626 - } __attribute__((packed)); 1626 + } __packed; 1627 1627 1628 1628 struct smb_com_transaction2_sfi_rsp { 1629 1629 struct smb_hdr hdr; /* wct = 10 + SetupCount */ 1630 1630 struct trans2_resp t2; 1631 1631 __u16 ByteCount; 1632 1632 __u16 Reserved2; /* parameter word reserved - present for infolevels > 100 */ 1633 - } __attribute__((packed)); 1633 + } __packed; 1634 1634 1635 1635 struct smb_t2_qfi_req { 1636 1636 struct smb_hdr hdr; ··· 1638 1638 __u8 Pad; 1639 1639 __u16 Fid; 1640 1640 __le16 InformationLevel; 1641 - } __attribute__((packed)); 1641 + } __packed; 1642 1642 1643 1643 struct smb_t2_qfi_rsp { 1644 1644 struct smb_hdr hdr; /* wct = 10 + SetupCount */ 1645 1645 struct trans2_resp t2; 1646 1646 __u16 ByteCount; 1647 1647 __u16 Reserved2; /* parameter word reserved - present for infolevels > 100 */ 1648 - } __attribute__((packed)); 1648 + } __packed; 1649 1649 1650 1650 /* 1651 1651 * Flags on T2 FINDFIRST and FINDNEXT ··· 1687 1687 __le16 InformationLevel; 1688 1688 __le32 SearchStorageType; 1689 1689 char FileName[]; 1690 - } __attribute__((packed)) TRANSACTION2_FFIRST_REQ; 1690 + } __packed TRANSACTION2_FFIRST_REQ; 1691 1691 1692 1692 typedef struct smb_com_transaction2_ffirst_rsp { 1693 1693 struct smb_hdr hdr; /* wct = 10 */ 1694 1694 struct trans2_resp t2; 1695 1695 __u16 ByteCount; 1696 - } __attribute__((packed)) TRANSACTION2_FFIRST_RSP; 1696 + } __packed TRANSACTION2_FFIRST_RSP; 1697 1697 1698 1698 typedef struct smb_com_transaction2_ffirst_rsp_parms { 1699 1699 __u16 SearchHandle; ··· 1701 1701 __le16 EndofSearch; 1702 1702 __le16 EAErrorOffset; 1703 1703 __le16 LastNameOffset; 1704 - } __attribute__((packed)) T2_FFIRST_RSP_PARMS; 1704 + } __packed T2_FFIRST_RSP_PARMS; 1705 1705 1706 1706 typedef struct smb_com_transaction2_fnext_req { 1707 1707 struct smb_hdr hdr; /* wct = 15 */ ··· 1729 1729 __u32 ResumeKey; 1730 1730 __le16 SearchFlags; 1731 1731 char ResumeFileName[]; 1732 - } __attribute__((packed)) TRANSACTION2_FNEXT_REQ; 1732 + } __packed TRANSACTION2_FNEXT_REQ; 1733 1733 1734 1734 typedef struct smb_com_transaction2_fnext_rsp { 1735 1735 struct smb_hdr hdr; /* wct = 10 */ 1736 1736 struct trans2_resp t2; 1737 1737 __u16 ByteCount; 1738 - } __attribute__((packed)) TRANSACTION2_FNEXT_RSP; 1738 + } __packed TRANSACTION2_FNEXT_RSP; 1739 1739 1740 1740 typedef struct smb_com_transaction2_fnext_rsp_parms { 1741 1741 __le16 SearchCount; 1742 1742 __le16 EndofSearch; 1743 1743 __le16 EAErrorOffset; 1744 1744 __le16 LastNameOffset; 1745 - } __attribute__((packed)) T2_FNEXT_RSP_PARMS; 1745 + } __packed T2_FNEXT_RSP_PARMS; 1746 1746 1747 1747 /* QFSInfo Levels */ 1748 1748 #define SMB_INFO_ALLOCATION 1 ··· 1786 1786 __le16 ByteCount; 1787 1787 __u8 Pad; 1788 1788 __le16 InformationLevel; 1789 - } __attribute__((packed)) TRANSACTION2_QFSI_REQ; 1789 + } __packed TRANSACTION2_QFSI_REQ; 1790 1790 1791 1791 typedef struct smb_com_transaction_qfsi_rsp { 1792 1792 struct smb_hdr hdr; /* wct = 10 + SetupCount */ 1793 1793 struct trans2_resp t2; 1794 1794 __u16 ByteCount; 1795 1795 __u8 Pad; /* may be three bytes? *//* followed by data area */ 1796 - } __attribute__((packed)) TRANSACTION2_QFSI_RSP; 1796 + } __packed TRANSACTION2_QFSI_RSP; 1797 1797 1798 1798 typedef struct whoami_rsp_data { /* Query level 0x202 */ 1799 1799 __u32 flags; /* 0 = Authenticated user 1 = GUEST */ ··· 1806 1806 __u32 pad; /* reserved - MBZ */ 1807 1807 /* __u64 gid_array[0]; */ /* may be empty */ 1808 1808 /* __u8 * psid_list */ /* may be empty */ 1809 - } __attribute__((packed)) WHOAMI_RSP_DATA; 1809 + } __packed WHOAMI_RSP_DATA; 1810 1810 1811 1811 /* SETFSInfo Levels */ 1812 1812 #define SMB_SET_CIFS_UNIX_INFO 0x200 ··· 1839 1839 __le16 ClientUnixMajor; /* Data start. */ 1840 1840 __le16 ClientUnixMinor; 1841 1841 __le64 ClientUnixCap; /* Data end */ 1842 - } __attribute__((packed)) TRANSACTION2_SETFSI_REQ; 1842 + } __packed TRANSACTION2_SETFSI_REQ; 1843 1843 1844 1844 /* level 0x203 request structure follows */ 1845 1845 typedef struct smb_com_transaction2_setfs_enc_req { ··· 1865 1865 __u16 Reserved4; /* Parameters start. */ 1866 1866 __le16 InformationLevel;/* Parameters end. */ 1867 1867 /* NTLMSSP Blob, Data start. */ 1868 - } __attribute__((packed)) TRANSACTION2_SETFSI_ENC_REQ; 1868 + } __packed TRANSACTION2_SETFSI_ENC_REQ; 1869 1869 1870 1870 /* response for setfsinfo levels 0x200 and 0x203 */ 1871 1871 typedef struct smb_com_transaction2_setfsi_rsp { 1872 1872 struct smb_hdr hdr; /* wct = 10 */ 1873 1873 struct trans2_resp t2; 1874 1874 __u16 ByteCount; 1875 - } __attribute__((packed)) TRANSACTION2_SETFSI_RSP; 1875 + } __packed TRANSACTION2_SETFSI_RSP; 1876 1876 1877 1877 typedef struct smb_com_transaction2_get_dfs_refer_req { 1878 1878 struct smb_hdr hdr; /* wct = 15 */ ··· 1898 1898 seem to matter though */ 1899 1899 __le16 MaxReferralLevel; 1900 1900 char RequestFileName[]; 1901 - } __attribute__((packed)) TRANSACTION2_GET_DFS_REFER_REQ; 1901 + } __packed TRANSACTION2_GET_DFS_REFER_REQ; 1902 1902 1903 1903 #define DFS_VERSION cpu_to_le16(0x0003) 1904 1904 ··· 1920 1920 __le16 DfsAlternatePathOffset; 1921 1921 __le16 NetworkAddressOffset; /* offset of the link target */ 1922 1922 __u8 ServiceSiteGuid[16]; /* MBZ, ignored */ 1923 - } __attribute__((packed)) REFERRAL3; 1923 + } __packed REFERRAL3; 1924 1924 1925 1925 struct get_dfs_referral_rsp { 1926 1926 __le16 PathConsumed; ··· 1960 1960 unsigned char versionMinor; 1961 1961 unsigned long type; 1962 1962 unsigned int commentOffset; 1963 - } __attribute__((packed)); 1963 + } __packed; 1964 1964 1965 1965 /* 1966 1966 * The following structure is the format of the data returned on a NetShareEnum ··· 1972 1972 char pad; 1973 1973 unsigned short type; 1974 1974 unsigned int commentOffset; 1975 - } __attribute__((packed)); 1975 + } __packed; 1976 1976 1977 1977 struct aliasInfo { 1978 1978 char aliasName[9]; 1979 1979 char pad; 1980 1980 unsigned int commentOffset; 1981 1981 unsigned char type[2]; 1982 - } __attribute__((packed)); 1982 + } __packed; 1983 1983 1984 1984 struct aliasInfo92 { 1985 1985 int aliasNameOffset; 1986 1986 int serverNameOffset; 1987 1987 int shareNameOffset; 1988 - } __attribute__((packed)); 1988 + } __packed; 1989 1989 1990 1990 typedef struct { 1991 1991 __le32 fsid; ··· 1993 1993 __le32 TotalAllocationUnits; 1994 1994 __le32 FreeAllocationUnits; 1995 1995 __le16 BytesPerSector; 1996 - } __attribute__((packed)) FILE_SYSTEM_ALLOC_INFO; 1996 + } __packed FILE_SYSTEM_ALLOC_INFO; 1997 1997 1998 1998 typedef struct { 1999 1999 __le16 MajorVersionNumber; 2000 2000 __le16 MinorVersionNumber; 2001 2001 __le64 Capability; 2002 - } __attribute__((packed)) FILE_SYSTEM_UNIX_INFO; /* Unix extension level 0x200*/ 2002 + } __packed FILE_SYSTEM_UNIX_INFO; /* Unix extension level 0x200*/ 2003 2003 2004 2004 /* Version numbers for CIFS UNIX major and minor. */ 2005 2005 #define CIFS_UNIX_MAJOR_VERSION 1 ··· 2102 2102 char __pad; 2103 2103 DECLARE_FLEX_ARRAY(char, FileName); 2104 2104 }; 2105 - } __attribute__((packed)) FILE_ALL_INFO; /* level 0x107 QPathInfo */ 2105 + } __packed FILE_ALL_INFO; /* level 0x107 QPathInfo */ 2106 2106 2107 2107 typedef struct { 2108 2108 __le64 AllocationSize; ··· 2111 2111 __u8 DeletePending; 2112 2112 __u8 Directory; 2113 2113 __u16 Pad; 2114 - } __attribute__((packed)) FILE_STANDARD_INFO; /* level 0x102 QPathInfo */ 2114 + } __packed FILE_STANDARD_INFO; /* level 0x102 QPathInfo */ 2115 2115 2116 2116 2117 2117 /* defines for enumerating possible values of the Unix type field below */ ··· 2136 2136 __le64 UniqueId; 2137 2137 __le64 Permissions; 2138 2138 __le64 Nlinks; 2139 - } __attribute__((packed)) FILE_UNIX_BASIC_INFO; /* level 0x200 QPathInfo */ 2139 + } __packed FILE_UNIX_BASIC_INFO; /* level 0x200 QPathInfo */ 2140 2140 2141 2141 typedef struct { 2142 2142 DECLARE_FLEX_ARRAY(char, LinkDest); 2143 - } __attribute__((packed)) FILE_UNIX_LINK_INFO; /* level 0x201 QPathInfo */ 2143 + } __packed FILE_UNIX_LINK_INFO; /* level 0x201 QPathInfo */ 2144 2144 2145 2145 /* The following three structures are needed only for 2146 2146 setting time to NT4 and some older servers via ··· 2149 2149 __u16 Day:5; 2150 2150 __u16 Month:4; 2151 2151 __u16 Year:7; 2152 - } __attribute__((packed)) SMB_DATE; 2152 + } __packed SMB_DATE; 2153 2153 2154 2154 typedef struct { 2155 2155 __u16 TwoSeconds:5; 2156 2156 __u16 Minutes:6; 2157 2157 __u16 Hours:5; 2158 - } __attribute__((packed)) SMB_TIME; 2158 + } __packed SMB_TIME; 2159 2159 2160 2160 typedef struct { 2161 2161 __le16 CreationDate; /* SMB Date see above */ ··· 2168 2168 __le32 AllocationSize; 2169 2169 __le16 Attributes; /* verify not u32 */ 2170 2170 __le32 EASize; 2171 - } __attribute__((packed)) FILE_INFO_STANDARD; /* level 1 SetPath/FileInfo */ 2171 + } __packed FILE_INFO_STANDARD; /* level 1 SetPath/FileInfo */ 2172 2172 2173 2173 typedef struct { 2174 2174 __le64 CreationTime; ··· 2177 2177 __le64 ChangeTime; 2178 2178 __le32 Attributes; 2179 2179 __u32 Pad; 2180 - } __attribute__((packed)) FILE_BASIC_INFO; /* size info, level 0x101 */ 2180 + } __packed FILE_BASIC_INFO; /* size info, level 0x101 */ 2181 2181 2182 2182 struct file_allocation_info { 2183 2183 __le64 AllocationSize; /* Note old Samba srvr rounds this up too much */ ··· 2185 2185 2186 2186 struct file_end_of_file_info { 2187 2187 __le64 FileSize; /* offset to end of file */ 2188 - } __attribute__((packed)); /* size info, level 0x104 for set, 0x106 for query */ 2188 + } __packed; /* size info, level 0x104 for set, 0x106 for query */ 2189 2189 2190 2190 struct file_alt_name_info { 2191 2191 DECLARE_FLEX_ARRAY(__u8, alt_name); 2192 - } __attribute__((packed)); /* level 0x0108 */ 2192 + } __packed; /* level 0x0108 */ 2193 2193 2194 2194 struct file_stream_info { 2195 2195 __le32 number_of_streams; /* BB check sizes and verify location */ ··· 2206 2206 __u8 ch_shift; 2207 2207 __u8 cl_shift; 2208 2208 __u8 pad[3]; 2209 - } __attribute__((packed)); /* level 0x10b */ 2209 + } __packed; /* level 0x10b */ 2210 2210 2211 2211 /* POSIX ACL set/query path info structures */ 2212 2212 #define CIFS_ACL_VERSION 1 ··· 2214 2214 __u8 cifs_e_tag; 2215 2215 __u8 cifs_e_perm; 2216 2216 __le64 cifs_uid; /* or gid */ 2217 - } __attribute__((packed)); 2217 + } __packed; 2218 2218 2219 2219 struct cifs_posix_acl { /* access control list (ACL) */ 2220 2220 __le16 version; ··· 2222 2222 __le16 default_entry_count; /* default ACL - count of entries */ 2223 2223 struct cifs_posix_ace ace_array[]; 2224 2224 /* followed by struct cifs_posix_ace default_ace_array[] */ 2225 - } __attribute__((packed)); /* level 0x204 */ 2225 + } __packed; /* level 0x204 */ 2226 2226 2227 2227 /* types of access control entries already defined in posix_acl.h */ 2228 2228 /* #define CIFS_POSIX_ACL_USER_OBJ 0x01 ··· 2257 2257 __le32 PosixOpenFlags; 2258 2258 __le64 Permissions; 2259 2259 __le16 Level; /* reply level requested (see QPathInfo levels) */ 2260 - } __attribute__((packed)) OPEN_PSX_REQ; /* level 0x209 SetPathInfo data */ 2260 + } __packed OPEN_PSX_REQ; /* level 0x209 SetPathInfo data */ 2261 2261 2262 2262 typedef struct { 2263 2263 __le16 OplockFlags; ··· 2266 2266 __le16 ReturnedLevel; 2267 2267 __le16 Pad; 2268 2268 /* struct following varies based on requested level */ 2269 - } __attribute__((packed)) OPEN_PSX_RSP; /* level 0x209 SetPathInfo data */ 2269 + } __packed OPEN_PSX_RSP; /* level 0x209 SetPathInfo data */ 2270 2270 2271 2271 #define SMB_POSIX_UNLINK_FILE_TARGET 0 2272 2272 #define SMB_POSIX_UNLINK_DIRECTORY_TARGET 1 2273 2273 2274 2274 struct unlink_psx_rq { /* level 0x20a SetPathInfo */ 2275 2275 __le16 type; 2276 - } __attribute__((packed)); 2276 + } __packed; 2277 2277 2278 2278 struct file_internal_info { 2279 2279 __le64 UniqueId; /* inode number */ 2280 - } __attribute__((packed)); /* level 0x3ee */ 2280 + } __packed; /* level 0x3ee */ 2281 2281 2282 2282 struct file_mode_info { 2283 2283 __le32 Mode; 2284 - } __attribute__((packed)); /* level 0x3f8 */ 2284 + } __packed; /* level 0x3f8 */ 2285 2285 2286 2286 struct file_attrib_tag { 2287 2287 __le32 Attribute; 2288 2288 __le32 ReparseTag; 2289 - } __attribute__((packed)); /* level 0x40b */ 2289 + } __packed; /* level 0x40b */ 2290 2290 2291 2291 2292 2292 /********************************************************/ ··· 2301 2301 char __pad; 2302 2302 DECLARE_FLEX_ARRAY(char, FileName); 2303 2303 }; 2304 - } __attribute__((packed)) FILE_UNIX_INFO; /* level 0x202 */ 2304 + } __packed FILE_UNIX_INFO; /* level 0x202 */ 2305 2305 2306 2306 typedef struct { 2307 2307 __u32 ResumeKey; ··· 2316 2316 __le16 Attributes; /* verify not u32 */ 2317 2317 __u8 FileNameLength; 2318 2318 char FileName[]; 2319 - } __attribute__((packed)) FIND_FILE_STANDARD_INFO; /* level 0x1 FF resp data */ 2319 + } __packed FIND_FILE_STANDARD_INFO; /* level 0x1 FF resp data */ 2320 2320 2321 2321 2322 2322 struct fea { ··· 2325 2325 __le16 value_len; 2326 2326 char name[]; 2327 2327 /* optionally followed by value */ 2328 - } __attribute__((packed)); 2328 + } __packed; 2329 2329 /* flags for _FEA.fEA */ 2330 2330 #define FEA_NEEDEA 0x80 /* need EA bit */ 2331 2331 2332 2332 struct fealist { 2333 2333 __le32 list_len; 2334 2334 struct fea list; 2335 - } __attribute__((packed)); 2335 + } __packed; 2336 2336 2337 2337 /* used to hold an arbitrary blob of data */ 2338 2338 struct data_blob { 2339 2339 __u8 *data; 2340 2340 size_t length; 2341 2341 void (*free) (struct data_blob *data_blob); 2342 - } __attribute__((packed)); 2342 + } __packed; 2343 2343 2344 2344 2345 2345 #ifdef CONFIG_CIFS_POSIX ··· 2442 2442 char cr2; /* \n */ 2443 2443 /* if room left, then end with \n then 0x20s by convention but not required */ 2444 2444 char path[1024]; 2445 - } __attribute__((packed)); 2445 + } __packed; 2446 2446 2447 2447 typedef struct file_xattr_info { 2448 2448 /* BB do we need another field for flags? BB */
+2 -2
fs/smb/client/connect.c
··· 2312 2312 } 2313 2313 #else /* ! CONFIG_KEYS */ 2314 2314 static inline int 2315 - cifs_set_cifscreds(struct smb3_fs_context *ctx __attribute__((unused)), 2316 - struct cifs_ses *ses __attribute__((unused))) 2315 + cifs_set_cifscreds(struct smb3_fs_context *ctx __maybe_unused, 2316 + struct cifs_ses *ses __maybe_unused) 2317 2317 { 2318 2318 return -ENOSYS; 2319 2319 }
+4 -4
fs/smb/client/ntlmssp.h
··· 73 73 __le16 Length; 74 74 __le16 MaximumLength; 75 75 __le32 BufferOffset; /* offset to buffer */ 76 - } __attribute__((packed)) SECURITY_BUFFER; 76 + } __packed SECURITY_BUFFER; 77 77 78 78 typedef struct _NEGOTIATE_MESSAGE { 79 79 __u8 Signature[sizeof(NTLMSSP_SIGNATURE)]; ··· 85 85 do not set the version is present flag */ 86 86 char DomainString[]; 87 87 /* followed by WorkstationString */ 88 - } __attribute__((packed)) NEGOTIATE_MESSAGE, *PNEGOTIATE_MESSAGE; 88 + } __packed NEGOTIATE_MESSAGE, *PNEGOTIATE_MESSAGE; 89 89 90 90 #define NTLMSSP_REVISION_W2K3 0x0F 91 91 ··· 121 121 SECURITY_BUFFER TargetInfoArray; 122 122 /* SECURITY_BUFFER for version info not present since we 123 123 do not set the version is present flag */ 124 - } __attribute__((packed)) CHALLENGE_MESSAGE, *PCHALLENGE_MESSAGE; 124 + } __packed CHALLENGE_MESSAGE, *PCHALLENGE_MESSAGE; 125 125 126 126 typedef struct _AUTHENTICATE_MESSAGE { 127 127 __u8 Signature[sizeof(NTLMSSP_SIGNATURE)]; ··· 136 136 struct ntlmssp_version Version; 137 137 /* SECURITY_BUFFER */ 138 138 char UserString[]; 139 - } __attribute__((packed)) AUTHENTICATE_MESSAGE, *PAUTHENTICATE_MESSAGE; 139 + } __packed AUTHENTICATE_MESSAGE, *PAUTHENTICATE_MESSAGE; 140 140 141 141 /* 142 142 * Size of the session key (crypto key encrypted with the password
+4 -4
fs/smb/client/rfc1002pdu.h
··· 33 33 __u8 calling_len; 34 34 __u8 calling_name[32]; 35 35 __u8 scope2; /* null */ 36 - } __attribute__((packed)) session_req; 36 + } __packed session_req; 37 37 struct { 38 38 __be32 retarget_ip_addr; 39 39 __be16 port; 40 - } __attribute__((packed)) retarget_resp; 40 + } __packed retarget_resp; 41 41 __u8 neg_ses_resp_error_code; 42 42 /* POSITIVE_SESSION_RESPONSE packet does not include trailer. 43 43 SESSION_KEEP_ALIVE packet also does not include a trailer. 44 44 Trailer for the SESSION_MESSAGE packet is SMB/CIFS header */ 45 - } __attribute__((packed)) trailer; 46 - } __attribute__((packed)); 45 + } __packed trailer; 46 + } __packed; 47 47 48 48 /* Negative Session Response error codes */ 49 49 #define RFC1002_NOT_LISTENING_CALLED 0x80 /* not listening on called name */
+4 -4
fs/smb/common/smbacl.h
··· 92 92 __le32 gsidoffset; 93 93 __le32 sacloffset; 94 94 __le32 dacloffset; 95 - } __attribute__((packed)); 95 + } __packed; 96 96 97 97 struct smb_sid { 98 98 __u8 revision; /* revision level */ 99 99 __u8 num_subauth; 100 100 __u8 authority[NUM_AUTHS]; 101 101 __le32 sub_auth[SID_MAX_SUB_AUTHORITIES]; /* sub_auth[num_subauth] */ 102 - } __attribute__((packed)); 102 + } __packed; 103 103 104 104 /* size of a struct smb_sid, sans sub_auth array */ 105 105 #define CIFS_SID_BASE_SIZE (1 + 1 + NUM_AUTHS) ··· 109 109 __le16 size; 110 110 __le16 num_aces; 111 111 __le16 reserved; 112 - } __attribute__((packed)); 112 + } __packed; 113 113 114 114 struct smb_ace { 115 115 __u8 type; /* see above and MS-DTYP 2.4.4.1 */ ··· 117 117 __le16 size; 118 118 __le32 access_req; 119 119 struct smb_sid sid; /* ie UUID of user or group who gets these perms */ 120 - } __attribute__((packed)); 120 + } __packed; 121 121 122 122 #endif /* _COMMON_SMBACL_H */