diff options
author | Fabian Frederick <fabf@skynet.be> | 2014-12-10 18:41:15 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-10 20:41:02 -0500 |
commit | bc09d141ebb26c0c1ab713c8597ca833be9afee4 (patch) | |
tree | fd5cec60e390bf4bddeef07a4a96b91475cad147 /fs/cifs | |
parent | 6b101e2a3ce4d2a0312087598bd1ab4a1db2ac40 (diff) |
fs/cifs: remove obsolete __constant
Replace all __constant_foo to foo() except in smb2status.h (1700 lines to
update).
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Cc: Steve French <sfrench@samba.org>
Cc: Jeff Layton <jlayton@poochiereds.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/cifs')
-rw-r--r-- | fs/cifs/cifsacl.c | 2 | ||||
-rw-r--r-- | fs/cifs/cifssmb.c | 20 | ||||
-rw-r--r-- | fs/cifs/sess.c | 2 | ||||
-rw-r--r-- | fs/cifs/smb2misc.c | 38 | ||||
-rw-r--r-- | fs/cifs/smb2ops.c | 2 | ||||
-rw-r--r-- | fs/cifs/smb2pdu.c | 2 | ||||
-rw-r--r-- | fs/cifs/smb2pdu.h | 28 |
7 files changed, 47 insertions, 47 deletions
diff --git a/fs/cifs/cifsacl.c b/fs/cifs/cifsacl.c index 6d00c419cbae..1ea780bc6376 100644 --- a/fs/cifs/cifsacl.c +++ b/fs/cifs/cifsacl.c | |||
@@ -38,7 +38,7 @@ static const struct cifs_sid sid_everyone = { | |||
38 | 1, 1, {0, 0, 0, 0, 0, 1}, {0} }; | 38 | 1, 1, {0, 0, 0, 0, 0, 1}, {0} }; |
39 | /* security id for Authenticated Users system group */ | 39 | /* security id for Authenticated Users system group */ |
40 | static const struct cifs_sid sid_authusers = { | 40 | static const struct cifs_sid sid_authusers = { |
41 | 1, 1, {0, 0, 0, 0, 0, 5}, {__constant_cpu_to_le32(11)} }; | 41 | 1, 1, {0, 0, 0, 0, 0, 5}, {cpu_to_le32(11)} }; |
42 | /* group users */ | 42 | /* group users */ |
43 | static const struct cifs_sid sid_user = {1, 2 , {0, 0, 0, 0, 0, 5}, {} }; | 43 | static const struct cifs_sid sid_user = {1, 2 , {0, 0, 0, 0, 0, 5}, {} }; |
44 | 44 | ||
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index 61d00a6e398f..fa13d5e79f64 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c | |||
@@ -2477,14 +2477,14 @@ CIFSSMBPosixLock(const unsigned int xid, struct cifs_tcon *tcon, | |||
2477 | } | 2477 | } |
2478 | parm_data = (struct cifs_posix_lock *) | 2478 | parm_data = (struct cifs_posix_lock *) |
2479 | ((char *)&pSMBr->hdr.Protocol + data_offset); | 2479 | ((char *)&pSMBr->hdr.Protocol + data_offset); |
2480 | if (parm_data->lock_type == __constant_cpu_to_le16(CIFS_UNLCK)) | 2480 | if (parm_data->lock_type == cpu_to_le16(CIFS_UNLCK)) |
2481 | pLockData->fl_type = F_UNLCK; | 2481 | pLockData->fl_type = F_UNLCK; |
2482 | else { | 2482 | else { |
2483 | if (parm_data->lock_type == | 2483 | if (parm_data->lock_type == |
2484 | __constant_cpu_to_le16(CIFS_RDLCK)) | 2484 | cpu_to_le16(CIFS_RDLCK)) |
2485 | pLockData->fl_type = F_RDLCK; | 2485 | pLockData->fl_type = F_RDLCK; |
2486 | else if (parm_data->lock_type == | 2486 | else if (parm_data->lock_type == |
2487 | __constant_cpu_to_le16(CIFS_WRLCK)) | 2487 | cpu_to_le16(CIFS_WRLCK)) |
2488 | pLockData->fl_type = F_WRLCK; | 2488 | pLockData->fl_type = F_WRLCK; |
2489 | 2489 | ||
2490 | pLockData->fl_start = le64_to_cpu(parm_data->start); | 2490 | pLockData->fl_start = le64_to_cpu(parm_data->start); |
@@ -3276,25 +3276,25 @@ CIFSSMB_set_compression(const unsigned int xid, struct cifs_tcon *tcon, | |||
3276 | pSMB->compression_state = cpu_to_le16(COMPRESSION_FORMAT_DEFAULT); | 3276 | pSMB->compression_state = cpu_to_le16(COMPRESSION_FORMAT_DEFAULT); |
3277 | 3277 | ||
3278 | pSMB->TotalParameterCount = 0; | 3278 | pSMB->TotalParameterCount = 0; |
3279 | pSMB->TotalDataCount = __constant_cpu_to_le32(2); | 3279 | pSMB->TotalDataCount = cpu_to_le32(2); |
3280 | pSMB->MaxParameterCount = 0; | 3280 | pSMB->MaxParameterCount = 0; |
3281 | pSMB->MaxDataCount = 0; | 3281 | pSMB->MaxDataCount = 0; |
3282 | pSMB->MaxSetupCount = 4; | 3282 | pSMB->MaxSetupCount = 4; |
3283 | pSMB->Reserved = 0; | 3283 | pSMB->Reserved = 0; |
3284 | pSMB->ParameterOffset = 0; | 3284 | pSMB->ParameterOffset = 0; |
3285 | pSMB->DataCount = __constant_cpu_to_le32(2); | 3285 | pSMB->DataCount = cpu_to_le32(2); |
3286 | pSMB->DataOffset = | 3286 | pSMB->DataOffset = |
3287 | cpu_to_le32(offsetof(struct smb_com_transaction_compr_ioctl_req, | 3287 | cpu_to_le32(offsetof(struct smb_com_transaction_compr_ioctl_req, |
3288 | compression_state) - 4); /* 84 */ | 3288 | compression_state) - 4); /* 84 */ |
3289 | pSMB->SetupCount = 4; | 3289 | pSMB->SetupCount = 4; |
3290 | pSMB->SubCommand = __constant_cpu_to_le16(NT_TRANSACT_IOCTL); | 3290 | pSMB->SubCommand = cpu_to_le16(NT_TRANSACT_IOCTL); |
3291 | pSMB->ParameterCount = 0; | 3291 | pSMB->ParameterCount = 0; |
3292 | pSMB->FunctionCode = __constant_cpu_to_le32(FSCTL_SET_COMPRESSION); | 3292 | pSMB->FunctionCode = cpu_to_le32(FSCTL_SET_COMPRESSION); |
3293 | pSMB->IsFsctl = 1; /* FSCTL */ | 3293 | pSMB->IsFsctl = 1; /* FSCTL */ |
3294 | pSMB->IsRootFlag = 0; | 3294 | pSMB->IsRootFlag = 0; |
3295 | pSMB->Fid = fid; /* file handle always le */ | 3295 | pSMB->Fid = fid; /* file handle always le */ |
3296 | /* 3 byte pad, followed by 2 byte compress state */ | 3296 | /* 3 byte pad, followed by 2 byte compress state */ |
3297 | pSMB->ByteCount = __constant_cpu_to_le16(5); | 3297 | pSMB->ByteCount = cpu_to_le16(5); |
3298 | inc_rfc1001_len(pSMB, 5); | 3298 | inc_rfc1001_len(pSMB, 5); |
3299 | 3299 | ||
3300 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, | 3300 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, |
@@ -3430,10 +3430,10 @@ static __u16 ACL_to_cifs_posix(char *parm_data, const char *pACL, | |||
3430 | cifs_acl->version = cpu_to_le16(1); | 3430 | cifs_acl->version = cpu_to_le16(1); |
3431 | if (acl_type == ACL_TYPE_ACCESS) { | 3431 | if (acl_type == ACL_TYPE_ACCESS) { |
3432 | cifs_acl->access_entry_count = cpu_to_le16(count); | 3432 | cifs_acl->access_entry_count = cpu_to_le16(count); |
3433 | cifs_acl->default_entry_count = __constant_cpu_to_le16(0xFFFF); | 3433 | cifs_acl->default_entry_count = cpu_to_le16(0xFFFF); |
3434 | } else if (acl_type == ACL_TYPE_DEFAULT) { | 3434 | } else if (acl_type == ACL_TYPE_DEFAULT) { |
3435 | cifs_acl->default_entry_count = cpu_to_le16(count); | 3435 | cifs_acl->default_entry_count = cpu_to_le16(count); |
3436 | cifs_acl->access_entry_count = __constant_cpu_to_le16(0xFFFF); | 3436 | cifs_acl->access_entry_count = cpu_to_le16(0xFFFF); |
3437 | } else { | 3437 | } else { |
3438 | cifs_dbg(FYI, "unknown ACL type %d\n", acl_type); | 3438 | cifs_dbg(FYI, "unknown ACL type %d\n", acl_type); |
3439 | return 0; | 3439 | return 0; |
diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c index 57db63ff88da..ab0fda6e8e58 100644 --- a/fs/cifs/sess.c +++ b/fs/cifs/sess.c | |||
@@ -46,7 +46,7 @@ static __u32 cifs_ssetup_hdr(struct cifs_ses *ses, SESSION_SETUP_ANDX *pSMB) | |||
46 | CIFSMaxBufSize + MAX_CIFS_HDR_SIZE - 4, | 46 | CIFSMaxBufSize + MAX_CIFS_HDR_SIZE - 4, |
47 | USHRT_MAX)); | 47 | USHRT_MAX)); |
48 | pSMB->req.MaxMpxCount = cpu_to_le16(ses->server->maxReq); | 48 | pSMB->req.MaxMpxCount = cpu_to_le16(ses->server->maxReq); |
49 | pSMB->req.VcNumber = __constant_cpu_to_le16(1); | 49 | pSMB->req.VcNumber = cpu_to_le16(1); |
50 | 50 | ||
51 | /* Now no need to set SMBFLG_CASELESS or obsolete CANONICAL PATH */ | 51 | /* Now no need to set SMBFLG_CASELESS or obsolete CANONICAL PATH */ |
52 | 52 | ||
diff --git a/fs/cifs/smb2misc.c b/fs/cifs/smb2misc.c index 1a08a34838fc..f1cefc9763ed 100644 --- a/fs/cifs/smb2misc.c +++ b/fs/cifs/smb2misc.c | |||
@@ -67,27 +67,27 @@ check_smb2_hdr(struct smb2_hdr *hdr, __u64 mid) | |||
67 | * indexed by command in host byte order | 67 | * indexed by command in host byte order |
68 | */ | 68 | */ |
69 | static const __le16 smb2_rsp_struct_sizes[NUMBER_OF_SMB2_COMMANDS] = { | 69 | static const __le16 smb2_rsp_struct_sizes[NUMBER_OF_SMB2_COMMANDS] = { |
70 | /* SMB2_NEGOTIATE */ __constant_cpu_to_le16(65), | 70 | /* SMB2_NEGOTIATE */ cpu_to_le16(65), |
71 | /* SMB2_SESSION_SETUP */ __constant_cpu_to_le16(9), | 71 | /* SMB2_SESSION_SETUP */ cpu_to_le16(9), |
72 | /* SMB2_LOGOFF */ __constant_cpu_to_le16(4), | 72 | /* SMB2_LOGOFF */ cpu_to_le16(4), |
73 | /* SMB2_TREE_CONNECT */ __constant_cpu_to_le16(16), | 73 | /* SMB2_TREE_CONNECT */ cpu_to_le16(16), |
74 | /* SMB2_TREE_DISCONNECT */ __constant_cpu_to_le16(4), | 74 | /* SMB2_TREE_DISCONNECT */ cpu_to_le16(4), |
75 | /* SMB2_CREATE */ __constant_cpu_to_le16(89), | 75 | /* SMB2_CREATE */ cpu_to_le16(89), |
76 | /* SMB2_CLOSE */ __constant_cpu_to_le16(60), | 76 | /* SMB2_CLOSE */ cpu_to_le16(60), |
77 | /* SMB2_FLUSH */ __constant_cpu_to_le16(4), | 77 | /* SMB2_FLUSH */ cpu_to_le16(4), |
78 | /* SMB2_READ */ __constant_cpu_to_le16(17), | 78 | /* SMB2_READ */ cpu_to_le16(17), |
79 | /* SMB2_WRITE */ __constant_cpu_to_le16(17), | 79 | /* SMB2_WRITE */ cpu_to_le16(17), |
80 | /* SMB2_LOCK */ __constant_cpu_to_le16(4), | 80 | /* SMB2_LOCK */ cpu_to_le16(4), |
81 | /* SMB2_IOCTL */ __constant_cpu_to_le16(49), | 81 | /* SMB2_IOCTL */ cpu_to_le16(49), |
82 | /* BB CHECK this ... not listed in documentation */ | 82 | /* BB CHECK this ... not listed in documentation */ |
83 | /* SMB2_CANCEL */ __constant_cpu_to_le16(0), | 83 | /* SMB2_CANCEL */ cpu_to_le16(0), |
84 | /* SMB2_ECHO */ __constant_cpu_to_le16(4), | 84 | /* SMB2_ECHO */ cpu_to_le16(4), |
85 | /* SMB2_QUERY_DIRECTORY */ __constant_cpu_to_le16(9), | 85 | /* SMB2_QUERY_DIRECTORY */ cpu_to_le16(9), |
86 | /* SMB2_CHANGE_NOTIFY */ __constant_cpu_to_le16(9), | 86 | /* SMB2_CHANGE_NOTIFY */ cpu_to_le16(9), |
87 | /* SMB2_QUERY_INFO */ __constant_cpu_to_le16(9), | 87 | /* SMB2_QUERY_INFO */ cpu_to_le16(9), |
88 | /* SMB2_SET_INFO */ __constant_cpu_to_le16(2), | 88 | /* SMB2_SET_INFO */ cpu_to_le16(2), |
89 | /* BB FIXME can also be 44 for lease break */ | 89 | /* BB FIXME can also be 44 for lease break */ |
90 | /* SMB2_OPLOCK_BREAK */ __constant_cpu_to_le16(24) | 90 | /* SMB2_OPLOCK_BREAK */ cpu_to_le16(24) |
91 | }; | 91 | }; |
92 | 92 | ||
93 | int | 93 | int |
diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c index c5f521bcdee2..7ecac610b44b 100644 --- a/fs/cifs/smb2ops.c +++ b/fs/cifs/smb2ops.c | |||
@@ -600,7 +600,7 @@ smb2_clone_range(const unsigned int xid, | |||
600 | goto cchunk_out; | 600 | goto cchunk_out; |
601 | 601 | ||
602 | /* For now array only one chunk long, will make more flexible later */ | 602 | /* For now array only one chunk long, will make more flexible later */ |
603 | pcchunk->ChunkCount = __constant_cpu_to_le32(1); | 603 | pcchunk->ChunkCount = cpu_to_le32(1); |
604 | pcchunk->Reserved = 0; | 604 | pcchunk->Reserved = 0; |
605 | pcchunk->Reserved2 = 0; | 605 | pcchunk->Reserved2 = 0; |
606 | 606 | ||
diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c index 8f1672bb82d5..08f73e168b0b 100644 --- a/fs/cifs/smb2pdu.c +++ b/fs/cifs/smb2pdu.c | |||
@@ -1359,7 +1359,7 @@ SMB2_set_compression(const unsigned int xid, struct cifs_tcon *tcon, | |||
1359 | char *ret_data = NULL; | 1359 | char *ret_data = NULL; |
1360 | 1360 | ||
1361 | fsctl_input.CompressionState = | 1361 | fsctl_input.CompressionState = |
1362 | __constant_cpu_to_le16(COMPRESSION_FORMAT_DEFAULT); | 1362 | cpu_to_le16(COMPRESSION_FORMAT_DEFAULT); |
1363 | 1363 | ||
1364 | rc = SMB2_ioctl(xid, tcon, persistent_fid, volatile_fid, | 1364 | rc = SMB2_ioctl(xid, tcon, persistent_fid, volatile_fid, |
1365 | FSCTL_SET_COMPRESSION, true /* is_fsctl */, | 1365 | FSCTL_SET_COMPRESSION, true /* is_fsctl */, |
diff --git a/fs/cifs/smb2pdu.h b/fs/cifs/smb2pdu.h index e3188abdafd0..fbd4df1e1683 100644 --- a/fs/cifs/smb2pdu.h +++ b/fs/cifs/smb2pdu.h | |||
@@ -85,7 +85,7 @@ | |||
85 | /* BB FIXME - analyze following length BB */ | 85 | /* BB FIXME - analyze following length BB */ |
86 | #define MAX_SMB2_HDR_SIZE 0x78 /* 4 len + 64 hdr + (2*24 wct) + 2 bct + 2 pad */ | 86 | #define MAX_SMB2_HDR_SIZE 0x78 /* 4 len + 64 hdr + (2*24 wct) + 2 bct + 2 pad */ |
87 | 87 | ||
88 | #define SMB2_PROTO_NUMBER __constant_cpu_to_le32(0x424d53fe) | 88 | #define SMB2_PROTO_NUMBER cpu_to_le32(0x424d53fe) |
89 | 89 | ||
90 | /* | 90 | /* |
91 | * SMB2 Header Definition | 91 | * SMB2 Header Definition |
@@ -96,7 +96,7 @@ | |||
96 | * | 96 | * |
97 | */ | 97 | */ |
98 | 98 | ||
99 | #define SMB2_HEADER_STRUCTURE_SIZE __constant_cpu_to_le16(64) | 99 | #define SMB2_HEADER_STRUCTURE_SIZE cpu_to_le16(64) |
100 | 100 | ||
101 | struct smb2_hdr { | 101 | struct smb2_hdr { |
102 | __be32 smb2_buf_length; /* big endian on wire */ | 102 | __be32 smb2_buf_length; /* big endian on wire */ |
@@ -137,16 +137,16 @@ struct smb2_transform_hdr { | |||
137 | } __packed; | 137 | } __packed; |
138 | 138 | ||
139 | /* Encryption Algorithms */ | 139 | /* Encryption Algorithms */ |
140 | #define SMB2_ENCRYPTION_AES128_CCM __constant_cpu_to_le16(0x0001) | 140 | #define SMB2_ENCRYPTION_AES128_CCM cpu_to_le16(0x0001) |
141 | 141 | ||
142 | /* | 142 | /* |
143 | * SMB2 flag definitions | 143 | * SMB2 flag definitions |
144 | */ | 144 | */ |
145 | #define SMB2_FLAGS_SERVER_TO_REDIR __constant_cpu_to_le32(0x00000001) | 145 | #define SMB2_FLAGS_SERVER_TO_REDIR cpu_to_le32(0x00000001) |
146 | #define SMB2_FLAGS_ASYNC_COMMAND __constant_cpu_to_le32(0x00000002) | 146 | #define SMB2_FLAGS_ASYNC_COMMAND cpu_to_le32(0x00000002) |
147 | #define SMB2_FLAGS_RELATED_OPERATIONS __constant_cpu_to_le32(0x00000004) | 147 | #define SMB2_FLAGS_RELATED_OPERATIONS cpu_to_le32(0x00000004) |
148 | #define SMB2_FLAGS_SIGNED __constant_cpu_to_le32(0x00000008) | 148 | #define SMB2_FLAGS_SIGNED cpu_to_le32(0x00000008) |
149 | #define SMB2_FLAGS_DFS_OPERATIONS __constant_cpu_to_le32(0x10000000) | 149 | #define SMB2_FLAGS_DFS_OPERATIONS cpu_to_le32(0x10000000) |
150 | 150 | ||
151 | /* | 151 | /* |
152 | * Definitions for SMB2 Protocol Data Units (network frames) | 152 | * Definitions for SMB2 Protocol Data Units (network frames) |
@@ -157,7 +157,7 @@ struct smb2_transform_hdr { | |||
157 | * | 157 | * |
158 | */ | 158 | */ |
159 | 159 | ||
160 | #define SMB2_ERROR_STRUCTURE_SIZE2 __constant_cpu_to_le16(9) | 160 | #define SMB2_ERROR_STRUCTURE_SIZE2 cpu_to_le16(9) |
161 | 161 | ||
162 | struct smb2_err_rsp { | 162 | struct smb2_err_rsp { |
163 | struct smb2_hdr hdr; | 163 | struct smb2_hdr hdr; |
@@ -502,12 +502,12 @@ struct create_context { | |||
502 | #define SMB2_LEASE_HANDLE_CACHING_HE 0x02 | 502 | #define SMB2_LEASE_HANDLE_CACHING_HE 0x02 |
503 | #define SMB2_LEASE_WRITE_CACHING_HE 0x04 | 503 | #define SMB2_LEASE_WRITE_CACHING_HE 0x04 |
504 | 504 | ||
505 | #define SMB2_LEASE_NONE __constant_cpu_to_le32(0x00) | 505 | #define SMB2_LEASE_NONE cpu_to_le32(0x00) |
506 | #define SMB2_LEASE_READ_CACHING __constant_cpu_to_le32(0x01) | 506 | #define SMB2_LEASE_READ_CACHING cpu_to_le32(0x01) |
507 | #define SMB2_LEASE_HANDLE_CACHING __constant_cpu_to_le32(0x02) | 507 | #define SMB2_LEASE_HANDLE_CACHING cpu_to_le32(0x02) |
508 | #define SMB2_LEASE_WRITE_CACHING __constant_cpu_to_le32(0x04) | 508 | #define SMB2_LEASE_WRITE_CACHING cpu_to_le32(0x04) |
509 | 509 | ||
510 | #define SMB2_LEASE_FLAG_BREAK_IN_PROGRESS __constant_cpu_to_le32(0x02) | 510 | #define SMB2_LEASE_FLAG_BREAK_IN_PROGRESS cpu_to_le32(0x02) |
511 | 511 | ||
512 | #define SMB2_LEASE_KEY_SIZE 16 | 512 | #define SMB2_LEASE_KEY_SIZE 16 |
513 | 513 | ||