diff options
author | Steve French <sfrench@us.ibm.com> | 2007-08-30 18:09:15 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2007-08-30 18:09:15 -0400 |
commit | 26f57364d7cdef9d7ebe27c931fff5e4f21ffb1c (patch) | |
tree | 28f991e3ea9e87244312015398f5f25d2eee4405 /fs/cifs/transport.c | |
parent | f01d5e14e764b14b6bf5512678523d009254b209 (diff) |
[CIFS] formatting cleanup found by checkpatch
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/transport.c')
-rw-r--r-- | fs/cifs/transport.c | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c index 746bc9405db1..6684926bf3d2 100644 --- a/fs/cifs/transport.c +++ b/fs/cifs/transport.c | |||
@@ -55,7 +55,7 @@ AllocMidQEntry(const struct smb_hdr *smb_buffer, struct cifsSesInfo *ses) | |||
55 | if (temp == NULL) | 55 | if (temp == NULL) |
56 | return temp; | 56 | return temp; |
57 | else { | 57 | else { |
58 | memset(temp, 0, sizeof (struct mid_q_entry)); | 58 | memset(temp, 0, sizeof(struct mid_q_entry)); |
59 | temp->mid = smb_buffer->Mid; /* always LE */ | 59 | temp->mid = smb_buffer->Mid; /* always LE */ |
60 | temp->pid = current->pid; | 60 | temp->pid = current->pid; |
61 | temp->command = smb_buffer->Command; | 61 | temp->command = smb_buffer->Command; |
@@ -158,7 +158,7 @@ smb_send(struct socket *ssocket, struct smb_hdr *smb_buffer, | |||
158 | iov.iov_len = len; | 158 | iov.iov_len = len; |
159 | 159 | ||
160 | smb_msg.msg_name = sin; | 160 | smb_msg.msg_name = sin; |
161 | smb_msg.msg_namelen = sizeof (struct sockaddr); | 161 | smb_msg.msg_namelen = sizeof(struct sockaddr); |
162 | smb_msg.msg_control = NULL; | 162 | smb_msg.msg_control = NULL; |
163 | smb_msg.msg_controllen = 0; | 163 | smb_msg.msg_controllen = 0; |
164 | smb_msg.msg_flags = MSG_DONTWAIT + MSG_NOSIGNAL; /* BB add more flags?*/ | 164 | smb_msg.msg_flags = MSG_DONTWAIT + MSG_NOSIGNAL; /* BB add more flags?*/ |
@@ -228,7 +228,7 @@ smb_send2(struct socket *ssocket, struct kvec *iov, int n_vec, | |||
228 | return -ENOTSOCK; /* BB eventually add reconnect code here */ | 228 | return -ENOTSOCK; /* BB eventually add reconnect code here */ |
229 | 229 | ||
230 | smb_msg.msg_name = sin; | 230 | smb_msg.msg_name = sin; |
231 | smb_msg.msg_namelen = sizeof (struct sockaddr); | 231 | smb_msg.msg_namelen = sizeof(struct sockaddr); |
232 | smb_msg.msg_control = NULL; | 232 | smb_msg.msg_control = NULL; |
233 | smb_msg.msg_controllen = 0; | 233 | smb_msg.msg_controllen = 0; |
234 | smb_msg.msg_flags = MSG_DONTWAIT + MSG_NOSIGNAL; /* BB add more flags?*/ | 234 | smb_msg.msg_flags = MSG_DONTWAIT + MSG_NOSIGNAL; /* BB add more flags?*/ |
@@ -363,9 +363,8 @@ static int allocate_mid(struct cifsSesInfo *ses, struct smb_hdr *in_buf, | |||
363 | } /* else ok - we are setting up session */ | 363 | } /* else ok - we are setting up session */ |
364 | } | 364 | } |
365 | *ppmidQ = AllocMidQEntry(in_buf, ses); | 365 | *ppmidQ = AllocMidQEntry(in_buf, ses); |
366 | if (*ppmidQ == NULL) { | 366 | if (*ppmidQ == NULL) |
367 | return -ENOMEM; | 367 | return -ENOMEM; |
368 | } | ||
369 | return 0; | 368 | return 0; |
370 | } | 369 | } |
371 | 370 | ||
@@ -572,9 +571,8 @@ SendReceive2(const unsigned int xid, struct cifsSesInfo *ses, | |||
572 | rc = map_smb_to_linux_error(midQ->resp_buf); | 571 | rc = map_smb_to_linux_error(midQ->resp_buf); |
573 | 572 | ||
574 | /* convert ByteCount if necessary */ | 573 | /* convert ByteCount if necessary */ |
575 | if (receive_len >= | 574 | if (receive_len >= sizeof(struct smb_hdr) - 4 |
576 | sizeof (struct smb_hdr) - | 575 | /* do not count RFC1001 header */ + |
577 | 4 /* do not count RFC1001 header */ + | ||
578 | (2 * midQ->resp_buf->WordCount) + 2 /* bcc */ ) | 576 | (2 * midQ->resp_buf->WordCount) + 2 /* bcc */ ) |
579 | BCC(midQ->resp_buf) = | 577 | BCC(midQ->resp_buf) = |
580 | le16_to_cpu(BCC_LE(midQ->resp_buf)); | 578 | le16_to_cpu(BCC_LE(midQ->resp_buf)); |
@@ -752,9 +750,8 @@ SendReceive(const unsigned int xid, struct cifsSesInfo *ses, | |||
752 | rc = map_smb_to_linux_error(out_buf); | 750 | rc = map_smb_to_linux_error(out_buf); |
753 | 751 | ||
754 | /* convert ByteCount if necessary */ | 752 | /* convert ByteCount if necessary */ |
755 | if (receive_len >= | 753 | if (receive_len >= sizeof(struct smb_hdr) - 4 |
756 | sizeof (struct smb_hdr) - | 754 | /* do not count RFC1001 header */ + |
757 | 4 /* do not count RFC1001 header */ + | ||
758 | (2 * out_buf->WordCount) + 2 /* bcc */ ) | 755 | (2 * out_buf->WordCount) + 2 /* bcc */ ) |
759 | BCC(out_buf) = le16_to_cpu(BCC_LE(out_buf)); | 756 | BCC(out_buf) = le16_to_cpu(BCC_LE(out_buf)); |
760 | } else { | 757 | } else { |
@@ -996,9 +993,8 @@ SendReceiveBlockingLock(const unsigned int xid, struct cifsTconInfo *tcon, | |||
996 | rc = map_smb_to_linux_error(out_buf); | 993 | rc = map_smb_to_linux_error(out_buf); |
997 | 994 | ||
998 | /* convert ByteCount if necessary */ | 995 | /* convert ByteCount if necessary */ |
999 | if (receive_len >= | 996 | if (receive_len >= sizeof(struct smb_hdr) - 4 |
1000 | sizeof (struct smb_hdr) - | 997 | /* do not count RFC1001 header */ + |
1001 | 4 /* do not count RFC1001 header */ + | ||
1002 | (2 * out_buf->WordCount) + 2 /* bcc */ ) | 998 | (2 * out_buf->WordCount) + 2 /* bcc */ ) |
1003 | BCC(out_buf) = le16_to_cpu(BCC_LE(out_buf)); | 999 | BCC(out_buf) = le16_to_cpu(BCC_LE(out_buf)); |
1004 | } else { | 1000 | } else { |