diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-08-26 02:34:46 -0400 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2013-09-08 15:47:43 -0400 |
commit | 31f92e9a87553d9d3044fe97b5fe0247e4314773 (patch) | |
tree | bdca2ab3287d64775b7b97c65a5f3765dfddb54b /fs/cifs | |
parent | 933d4b36576c951d0371bbfed05ec0135d516a6e (diff) |
CIFS: convert to use le32_add_cpu()
Convert cpu_to_le32(le32_to_cpu(E1) + E2) to use le32_add_cpu().
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Reviewed-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com>
Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs')
-rw-r--r-- | fs/cifs/smb2pdu.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c index 5a49861633a6..7d56a5ca2abb 100644 --- a/fs/cifs/smb2pdu.c +++ b/fs/cifs/smb2pdu.c | |||
@@ -939,9 +939,7 @@ add_lease_context(struct kvec *iov, unsigned int *num_iovec, __u8 *oplock) | |||
939 | req->CreateContextsOffset = cpu_to_le32( | 939 | req->CreateContextsOffset = cpu_to_le32( |
940 | sizeof(struct smb2_create_req) - 4 + | 940 | sizeof(struct smb2_create_req) - 4 + |
941 | iov[num - 1].iov_len); | 941 | iov[num - 1].iov_len); |
942 | req->CreateContextsLength = cpu_to_le32( | 942 | le32_add_cpu(&req->CreateContextsLength, sizeof(struct create_lease)); |
943 | le32_to_cpu(req->CreateContextsLength) + | ||
944 | sizeof(struct create_lease)); | ||
945 | inc_rfc1001_len(&req->hdr, sizeof(struct create_lease)); | 943 | inc_rfc1001_len(&req->hdr, sizeof(struct create_lease)); |
946 | *num_iovec = num + 1; | 944 | *num_iovec = num + 1; |
947 | return 0; | 945 | return 0; |
@@ -967,9 +965,7 @@ add_durable_context(struct kvec *iov, unsigned int *num_iovec, | |||
967 | req->CreateContextsOffset = | 965 | req->CreateContextsOffset = |
968 | cpu_to_le32(sizeof(struct smb2_create_req) - 4 + | 966 | cpu_to_le32(sizeof(struct smb2_create_req) - 4 + |
969 | iov[1].iov_len); | 967 | iov[1].iov_len); |
970 | req->CreateContextsLength = | 968 | le32_add_cpu(&req->CreateContextsLength, sizeof(struct create_durable)); |
971 | cpu_to_le32(le32_to_cpu(req->CreateContextsLength) + | ||
972 | sizeof(struct create_durable)); | ||
973 | inc_rfc1001_len(&req->hdr, sizeof(struct create_durable)); | 969 | inc_rfc1001_len(&req->hdr, sizeof(struct create_durable)); |
974 | *num_iovec = num + 1; | 970 | *num_iovec = num + 1; |
975 | return 0; | 971 | return 0; |