Commit 164f9e55 authored by Steve French's avatar Steve French

Correct compiler warnings for 64 bit platforms and minor formatting cleanup...

Correct compiler warnings for 64 bit platforms and minor formatting cleanup and remove debug function that was causing a conflict with a function of the same name in SCSI
parent 3a615de9
This diff is collapsed.
...@@ -925,7 +925,7 @@ CIFSSessSetup(unsigned int xid, struct cifsSesInfo *ses, char *user, ...@@ -925,7 +925,7 @@ CIFSSessSetup(unsigned int xid, struct cifsSesInfo *ses, char *user,
bcc_ptr += CIFS_SESSION_KEY_SIZE; bcc_ptr += CIFS_SESSION_KEY_SIZE;
if (ses->capabilities & CAP_UNICODE) { if (ses->capabilities & CAP_UNICODE) {
if ((int) bcc_ptr % 2) { /* must be word aligned for Unicode */ if ((long) bcc_ptr % 2) { /* must be word aligned for Unicode */
*bcc_ptr = 0; *bcc_ptr = 0;
bcc_ptr++; bcc_ptr++;
} }
...@@ -983,7 +983,7 @@ CIFSSessSetup(unsigned int xid, struct cifsSesInfo *ses, char *user, ...@@ -983,7 +983,7 @@ CIFSSessSetup(unsigned int xid, struct cifsSesInfo *ses, char *user,
strcpy(bcc_ptr, CIFS_NETWORK_OPSYS); strcpy(bcc_ptr, CIFS_NETWORK_OPSYS);
bcc_ptr += strlen(CIFS_NETWORK_OPSYS) + 1; bcc_ptr += strlen(CIFS_NETWORK_OPSYS) + 1;
} }
BCC(smb_buffer) = (int) bcc_ptr - (int) pByteArea(smb_buffer); BCC(smb_buffer) = (long) bcc_ptr - (long) pByteArea(smb_buffer);
smb_buffer->smb_buf_length += BCC(smb_buffer); smb_buffer->smb_buf_length += BCC(smb_buffer);
BCC(smb_buffer) = cpu_to_le16(BCC(smb_buffer)); BCC(smb_buffer) = cpu_to_le16(BCC(smb_buffer));
...@@ -1011,7 +1011,7 @@ CIFSSessSetup(unsigned int xid, struct cifsSesInfo *ses, char *user, ...@@ -1011,7 +1011,7 @@ CIFSSessSetup(unsigned int xid, struct cifsSesInfo *ses, char *user,
pSMBr->resp.SecurityBlobLength; pSMBr->resp.SecurityBlobLength;
if (smb_buffer->Flags2 &= SMBFLG2_UNICODE) { if (smb_buffer->Flags2 &= SMBFLG2_UNICODE) {
if ((int) (bcc_ptr) % 2) { if ((long) (bcc_ptr) % 2) {
remaining_words = remaining_words =
(BCC(smb_buffer_response) (BCC(smb_buffer_response)
- 1) / 2; - 1) / 2;
...@@ -1069,7 +1069,7 @@ CIFSSessSetup(unsigned int xid, struct cifsSesInfo *ses, char *user, ...@@ -1069,7 +1069,7 @@ CIFSSessSetup(unsigned int xid, struct cifsSesInfo *ses, char *user,
} else { /* ASCII */ } else { /* ASCII */
len = strnlen(bcc_ptr, 1024); len = strnlen(bcc_ptr, 1024);
if (((int) bcc_ptr + len) - (int) if (((long) bcc_ptr + len) - (long)
pByteArea(smb_buffer_response) pByteArea(smb_buffer_response)
<= BCC(smb_buffer_response)) { <= BCC(smb_buffer_response)) {
ses->serverOS = kcalloc(len + 1,GFP_KERNEL); ses->serverOS = kcalloc(len + 1,GFP_KERNEL);
...@@ -1176,7 +1176,7 @@ CIFSSpnegoSessSetup(unsigned int xid, struct cifsSesInfo *ses, ...@@ -1176,7 +1176,7 @@ CIFSSpnegoSessSetup(unsigned int xid, struct cifsSesInfo *ses,
bcc_ptr += SecurityBlobLength; bcc_ptr += SecurityBlobLength;
if (ses->capabilities & CAP_UNICODE) { if (ses->capabilities & CAP_UNICODE) {
if ((int) bcc_ptr % 2) { /* must be word aligned for Unicode strings */ if ((long) bcc_ptr % 2) { /* must be word aligned for Unicode strings */
*bcc_ptr = 0; *bcc_ptr = 0;
bcc_ptr++; bcc_ptr++;
} }
...@@ -1229,7 +1229,7 @@ CIFSSpnegoSessSetup(unsigned int xid, struct cifsSesInfo *ses, ...@@ -1229,7 +1229,7 @@ CIFSSpnegoSessSetup(unsigned int xid, struct cifsSesInfo *ses,
strcpy(bcc_ptr, CIFS_NETWORK_OPSYS); strcpy(bcc_ptr, CIFS_NETWORK_OPSYS);
bcc_ptr += strlen(CIFS_NETWORK_OPSYS) + 1; bcc_ptr += strlen(CIFS_NETWORK_OPSYS) + 1;
} }
BCC(smb_buffer) = (int) bcc_ptr - (int) pByteArea(smb_buffer); BCC(smb_buffer) = (long) bcc_ptr - (long) pByteArea(smb_buffer);
smb_buffer->smb_buf_length += BCC(smb_buffer); smb_buffer->smb_buf_length += BCC(smb_buffer);
BCC(smb_buffer) = cpu_to_le16(BCC(smb_buffer)); BCC(smb_buffer) = cpu_to_le16(BCC(smb_buffer));
...@@ -1265,7 +1265,7 @@ CIFSSpnegoSessSetup(unsigned int xid, struct cifsSesInfo *ses, ...@@ -1265,7 +1265,7 @@ CIFSSpnegoSessSetup(unsigned int xid, struct cifsSesInfo *ses,
} }
if (smb_buffer->Flags2 &= SMBFLG2_UNICODE) { if (smb_buffer->Flags2 &= SMBFLG2_UNICODE) {
if ((int) (bcc_ptr) % 2) { if ((long) (bcc_ptr) % 2) {
remaining_words = remaining_words =
(BCC(smb_buffer_response) (BCC(smb_buffer_response)
- 1) / 2; - 1) / 2;
...@@ -1328,7 +1328,7 @@ CIFSSpnegoSessSetup(unsigned int xid, struct cifsSesInfo *ses, ...@@ -1328,7 +1328,7 @@ CIFSSpnegoSessSetup(unsigned int xid, struct cifsSesInfo *ses,
} else { /* ASCII */ } else { /* ASCII */
len = strnlen(bcc_ptr, 1024); len = strnlen(bcc_ptr, 1024);
if (((int) bcc_ptr + len) - (int) if (((long) bcc_ptr + len) - (long)
pByteArea(smb_buffer_response) pByteArea(smb_buffer_response)
<= BCC(smb_buffer_response)) { <= BCC(smb_buffer_response)) {
ses->serverOS = kcalloc(len + 1, GFP_KERNEL); ses->serverOS = kcalloc(len + 1, GFP_KERNEL);
...@@ -1465,16 +1465,16 @@ CIFSNTLMSSPNegotiateSessSetup(unsigned int xid, ...@@ -1465,16 +1465,16 @@ CIFSNTLMSSPNegotiateSessSetup(unsigned int xid,
SecurityBlob->DomainName.MaximumLength = SecurityBlob->DomainName.MaximumLength =
cpu_to_le16(SecurityBlob->DomainName.Length); cpu_to_le16(SecurityBlob->DomainName.Length);
SecurityBlob->DomainName.Buffer = SecurityBlob->DomainName.Buffer =
cpu_to_le32((unsigned int) &SecurityBlob-> cpu_to_le32((long) &SecurityBlob->
DomainString - DomainString -
(unsigned int) &SecurityBlob->Signature); (long) &SecurityBlob->Signature);
bcc_ptr += SecurityBlob->DomainName.Length; bcc_ptr += SecurityBlob->DomainName.Length;
SecurityBlobLength += SecurityBlob->DomainName.Length; SecurityBlobLength += SecurityBlob->DomainName.Length;
SecurityBlob->DomainName.Length = SecurityBlob->DomainName.Length =
cpu_to_le16(SecurityBlob->DomainName.Length); cpu_to_le16(SecurityBlob->DomainName.Length);
} }
if (ses->capabilities & CAP_UNICODE) { if (ses->capabilities & CAP_UNICODE) {
if ((int) bcc_ptr % 2) { if ((long) bcc_ptr % 2) {
*bcc_ptr = 0; *bcc_ptr = 0;
bcc_ptr++; bcc_ptr++;
} }
...@@ -1511,7 +1511,7 @@ CIFSNTLMSSPNegotiateSessSetup(unsigned int xid, ...@@ -1511,7 +1511,7 @@ CIFSNTLMSSPNegotiateSessSetup(unsigned int xid,
SecurityBlob->NegotiateFlags = SecurityBlob->NegotiateFlags =
cpu_to_le32(SecurityBlob->NegotiateFlags); cpu_to_le32(SecurityBlob->NegotiateFlags);
pSMB->req.SecurityBlobLength = cpu_to_le16(SecurityBlobLength); pSMB->req.SecurityBlobLength = cpu_to_le16(SecurityBlobLength);
BCC(smb_buffer) = (int) bcc_ptr - (int) pByteArea(smb_buffer); BCC(smb_buffer) = (long) bcc_ptr - (long) pByteArea(smb_buffer);
smb_buffer->smb_buf_length += BCC(smb_buffer); smb_buffer->smb_buf_length += BCC(smb_buffer);
BCC(smb_buffer) = cpu_to_le16(BCC(smb_buffer)); BCC(smb_buffer) = cpu_to_le16(BCC(smb_buffer));
...@@ -1564,7 +1564,7 @@ CIFSNTLMSSPNegotiateSessSetup(unsigned int xid, ...@@ -1564,7 +1564,7 @@ CIFSNTLMSSPNegotiateSessSetup(unsigned int xid,
if(SecurityBlob2->NegotiateFlags & NTLMSSP_NEGOTIATE_NTLMV2) if(SecurityBlob2->NegotiateFlags & NTLMSSP_NEGOTIATE_NTLMV2)
*pNTLMv2_flag = TRUE; *pNTLMv2_flag = TRUE;
if (smb_buffer->Flags2 &= SMBFLG2_UNICODE) { if (smb_buffer->Flags2 &= SMBFLG2_UNICODE) {
if ((int) (bcc_ptr) % 2) { if ((long) (bcc_ptr) % 2) {
remaining_words = remaining_words =
(BCC(smb_buffer_response) (BCC(smb_buffer_response)
- 1) / 2; - 1) / 2;
...@@ -1650,7 +1650,7 @@ CIFSNTLMSSPNegotiateSessSetup(unsigned int xid, ...@@ -1650,7 +1650,7 @@ CIFSNTLMSSPNegotiateSessSetup(unsigned int xid,
} else { /* ASCII */ } else { /* ASCII */
len = strnlen(bcc_ptr, 1024); len = strnlen(bcc_ptr, 1024);
if (((int) bcc_ptr + len) - (int) if (((long) bcc_ptr + len) - (long)
pByteArea(smb_buffer_response) pByteArea(smb_buffer_response)
<= BCC(smb_buffer_response)) { <= BCC(smb_buffer_response)) {
ses->serverOS = ses->serverOS =
...@@ -1846,7 +1846,7 @@ CIFSNTLMSSPAuthSessSetup(unsigned int xid, struct cifsSesInfo *ses, ...@@ -1846,7 +1846,7 @@ CIFSNTLMSSPAuthSessSetup(unsigned int xid, struct cifsSesInfo *ses,
SecurityBlobLength += SecurityBlob->WorkstationName.Length; SecurityBlobLength += SecurityBlob->WorkstationName.Length;
SecurityBlob->WorkstationName.Length = cpu_to_le16(SecurityBlob->WorkstationName.Length); */ SecurityBlob->WorkstationName.Length = cpu_to_le16(SecurityBlob->WorkstationName.Length); */
if ((int) bcc_ptr % 2) { if ((long) bcc_ptr % 2) {
*bcc_ptr = 0; *bcc_ptr = 0;
bcc_ptr++; bcc_ptr++;
} }
...@@ -1918,7 +1918,7 @@ CIFSNTLMSSPAuthSessSetup(unsigned int xid, struct cifsSesInfo *ses, ...@@ -1918,7 +1918,7 @@ CIFSNTLMSSPAuthSessSetup(unsigned int xid, struct cifsSesInfo *ses,
SecurityBlob->NegotiateFlags = SecurityBlob->NegotiateFlags =
cpu_to_le32(SecurityBlob->NegotiateFlags); cpu_to_le32(SecurityBlob->NegotiateFlags);
pSMB->req.SecurityBlobLength = cpu_to_le16(SecurityBlobLength); pSMB->req.SecurityBlobLength = cpu_to_le16(SecurityBlobLength);
BCC(smb_buffer) = (int) bcc_ptr - (int) pByteArea(smb_buffer); BCC(smb_buffer) = (long) bcc_ptr - (long) pByteArea(smb_buffer);
smb_buffer->smb_buf_length += BCC(smb_buffer); smb_buffer->smb_buf_length += BCC(smb_buffer);
BCC(smb_buffer) = cpu_to_le16(BCC(smb_buffer)); BCC(smb_buffer) = cpu_to_le16(BCC(smb_buffer));
...@@ -1959,7 +1959,7 @@ CIFSNTLMSSPAuthSessSetup(unsigned int xid, struct cifsSesInfo *ses, ...@@ -1959,7 +1959,7 @@ CIFSNTLMSSPAuthSessSetup(unsigned int xid, struct cifsSesInfo *ses,
("\nNTLMSSP response to Authenticate ")); ("\nNTLMSSP response to Authenticate "));
if (smb_buffer->Flags2 &= SMBFLG2_UNICODE) { if (smb_buffer->Flags2 &= SMBFLG2_UNICODE) {
if ((int) (bcc_ptr) % 2) { if ((long) (bcc_ptr) % 2) {
remaining_words = remaining_words =
(BCC(smb_buffer_response) (BCC(smb_buffer_response)
- 1) / 2; - 1) / 2;
...@@ -2037,8 +2037,8 @@ CIFSNTLMSSPAuthSessSetup(unsigned int xid, struct cifsSesInfo *ses, ...@@ -2037,8 +2037,8 @@ CIFSNTLMSSPAuthSessSetup(unsigned int xid, struct cifsSesInfo *ses,
} else { /* ASCII */ } else { /* ASCII */
len = strnlen(bcc_ptr, 1024); len = strnlen(bcc_ptr, 1024);
if (((int) bcc_ptr + len) - if (((long) bcc_ptr + len) -
(int) pByteArea(smb_buffer_response) (long) pByteArea(smb_buffer_response)
<= BCC(smb_buffer_response)) { <= BCC(smb_buffer_response)) {
ses->serverOS = kcalloc(len + 1,GFP_KERNEL); ses->serverOS = kcalloc(len + 1,GFP_KERNEL);
strncpy(ses->serverOS,bcc_ptr, len); strncpy(ses->serverOS,bcc_ptr, len);
...@@ -2142,7 +2142,7 @@ CIFSTCon(unsigned int xid, struct cifsSesInfo *ses, ...@@ -2142,7 +2142,7 @@ CIFSTCon(unsigned int xid, struct cifsSesInfo *ses,
strcpy(bcc_ptr, "?????"); strcpy(bcc_ptr, "?????");
bcc_ptr += strlen("?????"); bcc_ptr += strlen("?????");
bcc_ptr += 1; bcc_ptr += 1;
BCC(smb_buffer) = (int) bcc_ptr - (int) pByteArea(smb_buffer); BCC(smb_buffer) = (long) bcc_ptr - (long) pByteArea(smb_buffer);
smb_buffer->smb_buf_length += BCC(smb_buffer); smb_buffer->smb_buf_length += BCC(smb_buffer);
BCC(smb_buffer) = cpu_to_le16(BCC(smb_buffer)); BCC(smb_buffer) = cpu_to_le16(BCC(smb_buffer));
...@@ -2159,8 +2159,8 @@ CIFSTCon(unsigned int xid, struct cifsSesInfo *ses, ...@@ -2159,8 +2159,8 @@ CIFSTCon(unsigned int xid, struct cifsSesInfo *ses,
strncpy(tcon->treeName, tree, MAX_TREE_SIZE); strncpy(tcon->treeName, tree, MAX_TREE_SIZE);
if (smb_buffer->Flags2 &= SMBFLG2_UNICODE) { if (smb_buffer->Flags2 &= SMBFLG2_UNICODE) {
length = UniStrnlen((wchar_t *) bcc_ptr, 512); length = UniStrnlen((wchar_t *) bcc_ptr, 512);
if (((int) bcc_ptr + (2 * length)) - if (((long) bcc_ptr + (2 * length)) -
(int) pByteArea(smb_buffer_response) <= (long) pByteArea(smb_buffer_response) <=
BCC(smb_buffer_response)) { BCC(smb_buffer_response)) {
tcon->nativeFileSystem = tcon->nativeFileSystem =
kcalloc(length + 2, GFP_KERNEL); kcalloc(length + 2, GFP_KERNEL);
...@@ -2175,8 +2175,8 @@ CIFSTCon(unsigned int xid, struct cifsSesInfo *ses, ...@@ -2175,8 +2175,8 @@ CIFSTCon(unsigned int xid, struct cifsSesInfo *ses,
/* else do not bother copying these informational fields */ /* else do not bother copying these informational fields */
} else { } else {
length = strnlen(bcc_ptr, 1024); length = strnlen(bcc_ptr, 1024);
if (((int) bcc_ptr + length) - if (((long) bcc_ptr + length) -
(int) pByteArea(smb_buffer_response) <= (long) pByteArea(smb_buffer_response) <=
BCC(smb_buffer_response)) { BCC(smb_buffer_response)) {
tcon->nativeFileSystem = tcon->nativeFileSystem =
kcalloc(length + 1, GFP_KERNEL); kcalloc(length + 1, GFP_KERNEL);
......
...@@ -572,9 +572,6 @@ fill_in_inode(struct inode *tmp_inode, ...@@ -572,9 +572,6 @@ fill_in_inode(struct inode *tmp_inode,
tmp_inode->i_size = pfindData->EndOfFile; tmp_inode->i_size = pfindData->EndOfFile;
tmp_inode->i_blocks = tmp_inode->i_blocks =
do_div(pfindData->AllocationSize, tmp_inode->i_blksize); do_div(pfindData->AllocationSize, tmp_inode->i_blksize);
cFYI(1,
("\nFinddata alloc size (from smb) %lld",
pfindData->AllocationSize));
if (pfindData->AllocationSize < pfindData->EndOfFile) if (pfindData->AllocationSize < pfindData->EndOfFile)
cFYI(1, ("\nServer inconsistency Error: it says allocation size less than end of file ")); cFYI(1, ("\nServer inconsistency Error: it says allocation size less than end of file "));
cFYI(1, cFYI(1,
...@@ -652,10 +649,6 @@ unix_fill_in_inode(struct inode *tmp_inode, ...@@ -652,10 +649,6 @@ unix_fill_in_inode(struct inode *tmp_inode,
tmp_inode->i_size = pfindData->EndOfFile; tmp_inode->i_size = pfindData->EndOfFile;
tmp_inode->i_blocks = tmp_inode->i_blocks =
do_div(pfindData->NumOfBytes, tmp_inode->i_blksize); do_div(pfindData->NumOfBytes, tmp_inode->i_blksize);
cFYI(0, ("\nFinddata alloc size (from smb) %lld", pfindData->NumOfBytes)); /* BB remove */
if (pfindData->NumOfBytes < pfindData->EndOfFile)
cFYI(0, ("\nServer inconsistency Error: it says allocation size less than end of file ")); /* BB remove */
cFYI(1, ("\nCIFS FFIRST: Size %ld and blocks %ld ", (unsigned long) tmp_inode->i_size, tmp_inode->i_blocks)); /* BB remove */
if (S_ISREG(tmp_inode->i_mode)) { if (S_ISREG(tmp_inode->i_mode)) {
cFYI(1, (" File inode ")); cFYI(1, (" File inode "));
tmp_inode->i_op = &cifs_file_inode_ops; tmp_inode->i_op = &cifs_file_inode_ops;
......
...@@ -131,9 +131,6 @@ cifs_get_inode_info_unix(struct inode **pinode, ...@@ -131,9 +131,6 @@ cifs_get_inode_info_unix(struct inode **pinode,
inode->i_blksize = inode->i_blksize =
(pTcon->ses->maxBuf - MAX_CIFS_HDR_SIZE) & 0xFFFFFE00; (pTcon->ses->maxBuf - MAX_CIFS_HDR_SIZE) & 0xFFFFFE00;
inode->i_blocks = do_div(findData.NumOfBytes, inode->i_blksize); inode->i_blocks = do_div(findData.NumOfBytes, inode->i_blksize);
cFYI(1,
("\nFinddata alloc size (from smb) %lld",
findData.NumOfBytes));
if (findData.NumOfBytes < findData.EndOfFile) if (findData.NumOfBytes < findData.EndOfFile)
cFYI(1, ("\nServer inconsistency Error: it says allocation size less than end of file ")); cFYI(1, ("\nServer inconsistency Error: it says allocation size less than end of file "));
cFYI(1, cFYI(1,
......
...@@ -694,8 +694,8 @@ const struct nt_err_code_struct nt_errs[] = { ...@@ -694,8 +694,8 @@ const struct nt_err_code_struct nt_errs[] = {
/***************************************************************************** /*****************************************************************************
Print an error message from the status code Print an error message from the status code
*****************************************************************************/ *****************************************************************************/
void /* void
print_status(__u32 status_code) cifs_print_status(__u32 status_code)
{ {
int idx = 0; int idx = 0;
...@@ -709,4 +709,4 @@ print_status(__u32 status_code) ...@@ -709,4 +709,4 @@ print_status(__u32 status_code)
idx++; idx++;
} }
return; return;
} } */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment