]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[CIFS] More whitespace/formatting fixes (noticed by checkpatch)
authorSteve French <sfrench@us.ibm.com>
Tue, 17 Jul 2007 17:34:02 +0000 (17:34 +0000)
committerSteve French <sfrench@us.ibm.com>
Tue, 17 Jul 2007 17:34:02 +0000 (17:34 +0000)
Signed-off-by: Steve French <sfrench@us.ibm.com>
fs/cifs/cifsencrypt.c
fs/cifs/cifsfs.c
fs/cifs/cifssmb.c
fs/cifs/connect.c
fs/cifs/file.c
fs/cifs/link.c
fs/cifs/misc.c
fs/cifs/netmisc.c
fs/cifs/sess.c
fs/cifs/xattr.c

index be012a17278a7042c3316ac97caa3e938f72f6a4..36272293027d41902231b0725aba64ba680e49dc 100644 (file)
@@ -109,7 +109,8 @@ static int cifs_calc_signature2(const struct kvec *iov, int n_vec,
                if (i == 0) {
                        if (iov[0].iov_len <= 8 ) /* cmd field at offset 9 */
                                break; /* nothing to sign or corrupt header */
-                       MD5Update(&context,iov[0].iov_base+4, iov[0].iov_len-4);
+                       MD5Update(&context, iov[0].iov_base+4,
+                                 iov[0].iov_len-4);
                } else
                        MD5Update(&context, iov[i].iov_base, iov[i].iov_len);
        }
index 8ebd887205bb2ec74a6cba24587373e0811b77de..a0a2f3186557836f1972d0da5a7f72d9c9325f87 100644 (file)
@@ -71,16 +71,20 @@ static struct task_struct *dnotifyThread = NULL;
 static const struct super_operations cifs_super_ops;
 unsigned int CIFSMaxBufSize = CIFS_MAX_MSGSIZE;
 module_param(CIFSMaxBufSize, int, 0);
-MODULE_PARM_DESC(CIFSMaxBufSize,"Network buffer size (not including header). Default: 16384 Range: 8192 to 130048");
+MODULE_PARM_DESC(CIFSMaxBufSize, "Network buffer size (not including header). "
+                                "Default: 16384 Range: 8192 to 130048");
 unsigned int cifs_min_rcv = CIFS_MIN_RCV_POOL;
 module_param(cifs_min_rcv, int, 0);
-MODULE_PARM_DESC(cifs_min_rcv,"Network buffers in pool. Default: 4 Range: 1 to 64");
+MODULE_PARM_DESC(cifs_min_rcv, "Network buffers in pool. Default: 4 Range: "
+                               "1 to 64");
 unsigned int cifs_min_small = 30;
 module_param(cifs_min_small, int, 0);
-MODULE_PARM_DESC(cifs_min_small,"Small network buffers in pool. Default: 30 Range: 2 to 256");
+MODULE_PARM_DESC(cifs_min_small, "Small network buffers in pool. Default: 30 "
+                                "Range: 2 to 256");
 unsigned int cifs_max_pending = CIFS_MAX_REQ;
 module_param(cifs_max_pending, int, 0);
-MODULE_PARM_DESC(cifs_max_pending,"Simultaneous requests to server. Default: 50 Range: 2 to 256");
+MODULE_PARM_DESC(cifs_max_pending, "Simultaneous requests to server. "
+                                  "Default: 50 Range: 2 to 256");
 
 extern mempool_t *cifs_sm_req_poolp;
 extern mempool_t *cifs_req_poolp;
@@ -902,7 +906,8 @@ static int cifs_oplock_thread(void *dummyarg)
                                            0 /* len */ , 0 /* offset */, 0,
                                            0, LOCKING_ANDX_OPLOCK_RELEASE,
                                            0 /* wait flag */);
-                                       cFYI(1,("Oplock release rc = %d ", rc));
+                                       cFYI(1, 
+                                             ("Oplock release rc = %d ", rc));
                                }
                        } else
                                spin_unlock(&GlobalMid_Lock);
@@ -1040,7 +1045,7 @@ init_cifs(void)
 static void __exit
 exit_cifs(void)
 {
-       cFYI(0, ("In unregister ie exit_cifs"));
+       cFYI(0, ("exit_cifs"));
 #ifdef CONFIG_PROC_FS
        cifs_proc_clean();
 #endif
@@ -1055,7 +1060,8 @@ exit_cifs(void)
 MODULE_AUTHOR("Steve French <sfrench@us.ibm.com>");
 MODULE_LICENSE("GPL"); /* combination of LGPL + GPL source behaves as GPL */
 MODULE_DESCRIPTION
-    ("VFS to access servers complying with the SNIA CIFS Specification e.g. Samba and Windows");
+    ("VFS to access servers complying with the SNIA CIFS Specification "
+     "e.g. Samba and Windows");
 MODULE_VERSION(CIFS_VERSION);
 module_init(init_cifs)
 module_exit(exit_cifs)
index b339f5f128daec487f7e2ac57af75ae3cc8b1fb2..a6ff406ac6b488cd62751db72b29ab58fde06416 100644 (file)
@@ -132,10 +132,13 @@ small_smb_init(int smb_command, int wct, struct cifsTconInfo *tcon,
                                /* Give Demultiplex thread up to 10 seconds to
                                   reconnect, should be greater than cifs socket
                                   timeout which is 7 seconds */
-                       while(tcon->ses->server->tcpStatus == CifsNeedReconnect) {
+                       while(tcon->ses->server->tcpStatus ==
+                                                        CifsNeedReconnect) {
                                wait_event_interruptible_timeout(tcon->ses->server->response_q,
-                                       (tcon->ses->server->tcpStatus == CifsGood), 10 * HZ);
-                               if (tcon->ses->server->tcpStatus == CifsNeedReconnect) {
+                                       (tcon->ses->server->tcpStatus == 
+                                                       CifsGood), 10 * HZ);
+                               if (tcon->ses->server->tcpStatus ==
+                                                       CifsNeedReconnect) {
                                        /* on "soft" mounts we wait once */
                                        if ((tcon->retry == FALSE) ||
                                           (tcon->ses->status == CifsExiting)) {
@@ -209,7 +212,8 @@ small_smb_init(int smb_command, int wct, struct cifsTconInfo *tcon,
                return -ENOMEM;
        }
 
-       header_assemble((struct smb_hdr *) *request_buf, smb_command, tcon,wct);
+       header_assemble((struct smb_hdr *) *request_buf, smb_command,
+                       tcon,wct);
 
        if (tcon != NULL)
                cifs_stats_inc(&tcon->num_smbs_sent);
@@ -274,9 +278,11 @@ smb_init(int smb_command, int wct, struct cifsTconInfo *tcon,
                                /* Give Demultiplex thread up to 10 seconds to
                                   reconnect, should be greater than cifs socket
                                   timeout which is 7 seconds */
-                       while(tcon->ses->server->tcpStatus == CifsNeedReconnect) {
+                       while (tcon->ses->server->tcpStatus ==
+                                                       CifsNeedReconnect) {
                                wait_event_interruptible_timeout(tcon->ses->server->response_q,
-                                       (tcon->ses->server->tcpStatus == CifsGood), 10 * HZ);
+                                       (tcon->ses->server->tcpStatus ==
+                                                       CifsGood), 10 * HZ);
                                if (tcon->ses->server->tcpStatus ==
                                                CifsNeedReconnect) {
                                        /* on "soft" mounts we wait once */
@@ -381,7 +387,8 @@ static int validate_t2(struct smb_t2_rsp *pSMB)
                        /* check that bcc is less than negotiated smb buffer */
                        total_size = le16_to_cpu(pSMB->t2_rsp.ParameterCount);
                        if (total_size < 512) {
-                               total_size+=le16_to_cpu(pSMB->t2_rsp.DataCount);
+                               total_size += 
+                                       le16_to_cpu(pSMB->t2_rsp.DataCount);
                                /* BCC le converted in SendReceive */
                                pBCC = (pSMB->hdr.WordCount * 2) +
                                        sizeof(struct smb_hdr) +
@@ -2608,7 +2615,7 @@ CIFSSMBQueryReparseLinkInfo(const int xid, struct cifsTconInfo *tcon,
                                        reparse_buf->TargetNameOffset +
                                        reparse_buf->TargetNameLen) >
                                                end_of_smb) {
-                                       cFYI(1,("reparse buf extended beyond SMB"));
+                                       cFYI(1,("reparse buf goes beyond SMB"));
                                        rc = -EIO;
                                        goto qreparse_out;
                                }
@@ -2632,7 +2639,8 @@ CIFSSMBQueryReparseLinkInfo(const int xid, struct cifsTconInfo *tcon,
                                }
                        } else {
                                rc = -EIO;
-                               cFYI(1,("Invalid return data count on get reparse info ioctl"));
+                               cFYI(1, ("Invalid return data count on "
+                                        "get reparse info ioctl"));
                        }
                        symlinkinfo[buflen] = 0; /* just in case so the caller
                                        does not go off the end of the buffer */
@@ -2750,7 +2758,8 @@ static __u16 ACL_to_cifs_posix(char *parm_data, const char *pACL,
                return 0;
 
        count = posix_acl_xattr_count((size_t)buflen);
-       cFYI(1,("setting acl with %d entries from buf of length %d and version of %d",
+       cFYI(1,("setting acl with %d entries from buf of length %d and "
+               "version of %d",
                count, buflen, le32_to_cpu(local_acl->a_version)));
        if (le32_to_cpu(local_acl->a_version) != 2) {
                cFYI(1, ("unknown POSIX ACL version %d",
@@ -3957,7 +3966,9 @@ getDFSRetry:
                                        (8 /* sizeof start of data block */ +
                                        data_offset +
                                        (char *) &pSMBr->hdr.Protocol);
-                       cFYI(1,("num_referrals: %d dfs flags: 0x%x ... \nfor referral one refer size: 0x%x srv type: 0x%x refer flags: 0x%x ttl: 0x%x",
+                       cFYI(1,("num_referrals: %d dfs flags: 0x%x ... \n"
+                               "for referral one refer size: 0x%x srv "
+                               "type: 0x%x refer flags: 0x%x ttl: 0x%x",
                                le16_to_cpu(pSMBr->NumberOfReferrals),
                                le16_to_cpu(pSMBr->DFSFlags),
                                le16_to_cpu(referrals->ReferralSize),
index 9d6d9a09d97384731fe335547b0cce0349ffa08c..8b341a8599f8d23e74f471f7dced5030c905bea9 100644 (file)
@@ -278,7 +278,7 @@ static int coalesce_t2(struct smb_hdr *psecond, struct smb_hdr *pTargetSMB)
        total_data_size = le16_to_cpu(pSMBt->t2_rsp.TotalDataCount);
 
        if (total_data_size != le16_to_cpu(pSMB2->t2_rsp.TotalDataCount)) {
-               cFYI(1, ("total data sizes of primary and secondary t2 differ"));
+               cFYI(1, ("total data size of primary and secondary t2 differ"));
        }
 
        total_in_buf = le16_to_cpu(pSMBt->t2_rsp.DataCount);
@@ -1036,7 +1036,8 @@ cifs_parse_mount_options(char *options, const char *devname,
                        }
                } else if (strnicmp(data, "iocharset", 9) == 0) {
                        if (!value || !*value) {
-                               printk(KERN_WARNING "CIFS: invalid iocharset specified\n");
+                               printk(KERN_WARNING "CIFS: invalid iocharset "
+                                                   "specified\n");
                                return 1;       /* needs_arg; */
                        }
                        if (strnlen(value, 65) < 65) {
@@ -1046,7 +1047,8 @@ cifs_parse_mount_options(char *options, const char *devname,
                                   is used by caller */
                                cFYI(1, ("iocharset set to %s", value));
                        } else {
-                               printk(KERN_WARNING "CIFS: iocharset name too long.\n");
+                               printk(KERN_WARNING "CIFS: iocharset name "
+                                                   "too long.\n");
                                return 1;
                        }
                } else if (strnicmp(data, "uid", 3) == 0) {
@@ -1098,7 +1100,7 @@ cifs_parse_mount_options(char *options, const char *devname,
                        }
                } else if (strnicmp(data, "netbiosname", 4) == 0) {
                        if (!value || !*value || (*value == ' ')) {
-                               cFYI(1, ("invalid (empty) netbiosname specified"));
+                               cFYI(1, ("invalid (empty) netbiosname"));
                        } else {
                                memset(vol->source_rfc1001_name, 0x20, 15);
                                for (i = 0; i < 15; i++) {
@@ -2827,7 +2829,8 @@ CIFSNTLMSSPNegotiateSessSetup(unsigned int xid,
                                                bcc_ptr++;
                                        } else
                                                cFYI(1,
-                                                    ("Variable field of length %d extends beyond end of smb",
+                                                    ("field of length %d "
+                                                   "extends beyond end of smb",
                                                      len));
                                }
                        } else {
@@ -2990,13 +2993,17 @@ CIFSNTLMSSPAuthSessSetup(unsigned int xid, struct cifsSesInfo *ses,
                            cpu_to_le16(len);
                }
 
-               /* SecurityBlob->WorkstationName.Length = cifs_strtoUCS((__le16 *) bcc_ptr, "AMACHINE",64, nls_codepage);
+               /* SecurityBlob->WorkstationName.Length =
+                cifs_strtoUCS((__le16 *) bcc_ptr, "AMACHINE",64, nls_codepage);
                   SecurityBlob->WorkstationName.Length *= 2;
-                  SecurityBlob->WorkstationName.MaximumLength = cpu_to_le16(SecurityBlob->WorkstationName.Length);
-                  SecurityBlob->WorkstationName.Buffer = cpu_to_le32(SecurityBlobLength);
+                  SecurityBlob->WorkstationName.MaximumLength =
+                       cpu_to_le16(SecurityBlob->WorkstationName.Length);
+                  SecurityBlob->WorkstationName.Buffer =
+                                cpu_to_le32(SecurityBlobLength);
                   bcc_ptr += 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 ((long) bcc_ptr % 2) {
                        *bcc_ptr = 0;
@@ -3202,7 +3209,7 @@ CIFSNTLMSSPAuthSessSetup(unsigned int xid, struct cifsSesInfo *ses,
                                        len = strnlen(bcc_ptr, 1024);
                                        if (((long) bcc_ptr + len) -
                                           (long) pByteArea(smb_buffer_response)
-                            <= BCC(smb_buffer_response)) {
+                                               <= BCC(smb_buffer_response)) {
                                                if (ses->serverOS)
                                                        kfree(ses->serverOS);
                                                ses->serverOS = kzalloc(len + 1,GFP_KERNEL);
@@ -3216,7 +3223,8 @@ CIFSNTLMSSPAuthSessSetup(unsigned int xid, struct cifsSesInfo *ses,
                                                kfree(ses->serverNOS);
                                                ses->serverNOS = kzalloc(len+1,
                                                                    GFP_KERNEL);
-                                               strncpy(ses->serverNOS, bcc_ptr, len);
+                                               strncpy(ses->serverNOS,
+                                                       bcc_ptr, len);
                                                bcc_ptr += len;
                                                bcc_ptr[0] = 0;
                                                bcc_ptr++;
@@ -3224,19 +3232,24 @@ CIFSNTLMSSPAuthSessSetup(unsigned int xid, struct cifsSesInfo *ses,
                                                len = strnlen(bcc_ptr, 1024);
                                                if (ses->serverDomain)
                                                        kfree(ses->serverDomain);
-                                               ses->serverDomain = kzalloc(len+1,GFP_KERNEL);
-                                               strncpy(ses->serverDomain, bcc_ptr, len);
+                                               ses->serverDomain =
+                                                               kzalloc(len+1,
+                                                                   GFP_KERNEL);
+                                               strncpy(ses->serverDomain,
+                                                       bcc_ptr, len);
                                                bcc_ptr += len;
                                                bcc_ptr[0] = 0;
                                                bcc_ptr++;
                                        } else
                                                cFYI(1,
-                                                    ("Variable field of length %d extends beyond end of smb ",
+                                                    ("field of length %d "
+                                                  "extends beyond end of smb ",
                                                      len));
                                }
                        } else {
                                cERROR(1,
-                                      (" Security Blob Length extends beyond end of SMB"));
+                                      (" Security Blob extends beyond end "
+                                       "of SMB"));
                        }
                } else {
                        cERROR(1, ("No session structure passed in."));
index 0620feaaea66afc48b7858385c83c7e4a97e30e3..0a39491280d158b4750ba29b606e9bfb9f2397cc 100644 (file)
@@ -502,7 +502,8 @@ int cifs_close(struct inode *inode, struct file *file)
                                        timeout *= 4;
                                }
                                if (atomic_read(&pSMBFile->wrtPending))
-                                       cERROR(1,("close with pending writes"));
+                                       cERROR(1,
+                                               ("close with pending writes"));
                                rc = CIFSSMBClose(xid, pTcon,
                                                  pSMBFile->netfid);
                        }
@@ -1285,7 +1286,7 @@ retry:
                                                   1);
                                atomic_dec(&open_file->wrtPending);
                                if (rc || bytes_written < bytes_to_write) {
-                                       cERROR(1,("Write2 ret %d, written = %d",
+                                       cERROR(1, ("Write2 ret %d, wrote %d",
                                                  rc, bytes_written));
                                        /* BB what if continued retry is
                                           requested via mount flags? */
index e79b1c3e5f392b245357f280bf36ed0330d42136..7da755c6550a6e3c4862d07672f7cf70c08a59cd 100644 (file)
@@ -287,7 +287,8 @@ cifs_readlink(struct dentry *direntry, char __user *pBuffer, int buflen)
                                fid,
                                cifs_sb->local_nls);
                        if (CIFSSMBClose(xid, pTcon, fid)) {
-                               cFYI(1,("Error closing junction point (open for ioctl)"));
+                               cFYI(1, ("Error closing junction point "
+                                        "(open for ioctl)"));
                        }
                        if (rc == -EIO) {
                                /* Query if DFS Junction */
index 21a2c46334e1ae86cb4927f268514987469fcf2d..0bcec0844bee8830099f9ae264e8cd65860bf012 100644 (file)
@@ -353,7 +353,8 @@ header_assemble(struct smb_hdr *buffer, char smb_command /* command */ ,
                /*      with userid/password pairs found on the smb session   */
                /*      for other target tcp/ip addresses               BB    */
                                if (current->fsuid != treeCon->ses->linux_uid) {
-                                       cFYI(1,("Multiuser mode and UID did not match tcon uid"));
+                                       cFYI(1, ("Multiuser mode and UID "
+                                                "did not match tcon uid"));
                                        read_lock(&GlobalSMBSeslock);
                                        list_for_each(temp_item, &GlobalSMBSessionList) {
                                                ses = list_entry(temp_item, struct cifsSesInfo, cifsSessionList);
@@ -461,7 +462,8 @@ checkSMB(struct smb_hdr *smb, __u16 mid, unsigned int length)
        clc_len = smbCalcSize_LE(smb);
 
        if (4 + len != length) {
-               cERROR(1, ("Length read does not match RFC1001 length %d",len));
+               cERROR(1, ("Length read does not match RFC1001 length %d",
+                          len));
                return 1;
        }
 
@@ -516,7 +518,8 @@ is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv)
 
                        pnotify = (struct file_notify_information *)
                                ((char *)&pSMBr->hdr.Protocol + data_offset);
-                       cFYI(1,("dnotify on %s Action: 0x%x", pnotify->FileName,
+                       cFYI(1, ("dnotify on %s Action: 0x%x",
+                                pnotify->FileName,
                                pnotify->Action));  /* BB removeme BB */
                        /*   cifs_dump_mem("Rcvd notify Data: ",buf,
                                sizeof(struct smb_hdr)+60); */
@@ -567,7 +570,8 @@ is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv)
                                if (pSMB->Fid == netfile->netfid) {
                                        struct cifsInodeInfo *pCifsInode;
                                        read_unlock(&GlobalSMBSeslock);
-                                       cFYI(1,("file id match, oplock break"));
+                                       cFYI(1,
+                                           ("file id match, oplock break"));
                                        pCifsInode =
                                                CIFS_I(netfile->pInode);
                                        pCifsInode->clientCanCacheAll = FALSE;
@@ -578,7 +582,8 @@ is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv)
                                        AllocOplockQEntry(netfile->pInode,
                                                          netfile->netfid,
                                                          tcon);
-                                       cFYI(1,("about to wake up oplock thd"));
+                                       cFYI(1,
+                                           ("about to wake up oplock thread"));
                                        if (oplockThread)
                                            wake_up_process(oplockThread);
                                        return TRUE;
index fe3d910efeb74ca9025bb67341e1838fe7575e90..2bfed3f45d0f97c4d9765bd6842c07e1e39f515f 100644 (file)
@@ -789,7 +789,8 @@ map_smb_to_linux_error(struct smb_hdr *smb)
                     sizeof (struct smb_to_posix_error); i++) {
                        if (mapping_table_ERRDOS[i].smb_err == 0)
                                break;
-                       else if (mapping_table_ERRDOS[i].smb_err == smberrcode) {
+                       else if (mapping_table_ERRDOS[i].smb_err ==
+                                                               smberrcode) {
                                rc = mapping_table_ERRDOS[i].posix_code;
                                break;
                        }
@@ -802,7 +803,8 @@ map_smb_to_linux_error(struct smb_hdr *smb)
                     sizeof (struct smb_to_posix_error); i++) {
                        if (mapping_table_ERRSRV[i].smb_err == 0)
                                break;
-                       else if (mapping_table_ERRSRV[i].smb_err == smberrcode) {
+                       else if (mapping_table_ERRSRV[i].smb_err ==
+                                                               smberrcode) {
                                rc = mapping_table_ERRSRV[i].posix_code;
                                break;
                        }
index a1e6f7f45b134b7c58c22bc9a1657ff40c5cb0f2..2ea027dda215cc2053d6645ca8a306ed959220c6 100644 (file)
@@ -535,7 +535,8 @@ CIFS_SessSetup(unsigned int xid, struct cifsSesInfo *ses, int first_time,
                rc = decode_unicode_ssetup(&bcc_ptr, bytes_remaining,
                                                   ses, nls_cp);
        else
-               rc = decode_ascii_ssetup(&bcc_ptr, bytes_remaining, ses,nls_cp);
+               rc = decode_ascii_ssetup(&bcc_ptr, bytes_remaining,
+                                        ses, nls_cp);
 
 ssetup_exit:
        kfree(str_area);
index 836c39e7c09a26aa1fac77672abdfcec80a6a1e3..f61e433d281c908c6b106a8f3c95ed8bf267ec9b 100644 (file)
@@ -184,7 +184,8 @@ int cifs_setxattr(struct dentry *direntry, const char *ea_name,
                        cFYI(1, ("set default POSIX ACL not supported"));
 #endif
                } else {
-                       cFYI(1, ("illegal xattr request %s (only user namespace supported)", ea_name));
+                       cFYI(1, ("illegal xattr request %s (only user namespace"
+                                " supported)", ea_name));
                  /* BB what if no namespace prefix? */
                  /* Should we just pass them to server, except for
                  system and perhaps security prefixes? */