Skip to content

Commit ad7a292

Browse files
author
Steve French
committed
[CIFS] reduce checkpatch warnings
Signed-off-by: Steve French <sfrench@us.ibm.com>
1 parent f315ccb commit ad7a292

23 files changed

Lines changed: 167 additions & 279 deletions

‎fs/cifs/README‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ A partial list of the supported mount options follows:
461461
cifsacl Report mode bits (e.g. on stat) based on the Windows ACL for
462462
the file. (EXPERIMENTAL)
463463
servern Specify the server 's netbios name (RFC1001 name) to use
464-
when attempting to setup a session to the server. This is
464+
when attempting to setup a session to the server.
465465
This is needed for mounting to some older servers (such
466466
as OS/2 or Windows 98 and Windows ME) since they do not
467467
support a default server name. A server name can be up

‎fs/cifs/cifs_debug.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,7 @@ void cifs_dump_mids(struct TCP_Server_Info *server)
9898
if (mid_entry->resp_buf) {
9999
cifs_dump_detail(mid_entry->resp_buf);
100100
cifs_dump_mem("existing buf: ",
101-
mid_entry->resp_buf,
102-
62 /* fixme */);
101+
mid_entry->resp_buf, 62);
103102
}
104103
}
105104
}

‎fs/cifs/cifs_debug.h‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ extern int cifsERROR;
6464
* ---------
6565
*/
6666
#else /* _CIFS_DEBUG */
67-
#define cERROR(button,prspec)
68-
#define cEVENT(format,arg...)
67+
#define cERROR(button, prspec)
68+
#define cEVENT(format, arg...)
6969
#define cFYI(button, prspec)
70-
#define cifserror(format,arg...)
70+
#define cifserror(format, arg...)
7171
#endif /* _CIFS_DEBUG */
7272

7373
#endif /* _H_CIFS_DEBUG */

‎fs/cifs/cifs_unicode.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
*
3333
*/
3434
int
35-
cifs_strfromUCS_le(char *to, const __le16 * from,
35+
cifs_strfromUCS_le(char *to, const __le16 *from,
3636
int len, const struct nls_table *codepage)
3737
{
3838
int i;
@@ -61,7 +61,7 @@ cifs_strfromUCS_le(char *to, const __le16 * from,
6161
*
6262
*/
6363
int
64-
cifs_strtoUCS(__le16 * to, const char *from, int len,
64+
cifs_strtoUCS(__le16 *to, const char *from, int len,
6565
const struct nls_table *codepage)
6666
{
6767
int charlen;

‎fs/cifs/cifs_unicode.h‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,8 @@ UniStrstr(const wchar_t *ucs1, const wchar_t *ucs2)
254254
const wchar_t *anchor2 = ucs2;
255255

256256
while (*ucs1) {
257-
if (*ucs1 == *ucs2) { /* Partial match found */
257+
if (*ucs1 == *ucs2) {
258+
/* Partial match found */
258259
ucs1++;
259260
ucs2++;
260261
} else {
@@ -279,7 +280,8 @@ UniToupper(register wchar_t uc)
279280
{
280281
register const struct UniCaseRange *rp;
281282

282-
if (uc < sizeof (CifsUniUpperTable)) { /* Latin characters */
283+
if (uc < sizeof(CifsUniUpperTable)) {
284+
/* Latin characters */
283285
return uc + CifsUniUpperTable[uc]; /* Use base tables */
284286
} else {
285287
rp = CifsUniUpperRange; /* Use range tables */
@@ -320,7 +322,8 @@ UniTolower(wchar_t uc)
320322
{
321323
register struct UniCaseRange *rp;
322324

323-
if (uc < sizeof (UniLowerTable)) { /* Latin characters */
325+
if (uc < sizeof(UniLowerTable)) {
326+
/* Latin characters */
324327
return uc + UniLowerTable[uc]; /* Use base tables */
325328
} else {
326329
rp = UniLowerRange; /* Use range tables */

‎fs/cifs/cifsacl.c‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ static struct cifs_wksid wksidarr[NUM_WK_SIDS] = {
4646
static const struct cifs_sid sid_everyone = {
4747
1, 1, {0, 0, 0, 0, 0, 1}, {0} };
4848
/* group users */
49-
static const struct cifs_sid sid_user =
50-
{1, 2 , {0, 0, 0, 0, 0, 5}, {} };
49+
static const struct cifs_sid sid_user = {1, 2 , {0, 0, 0, 0, 0, 5}, {} };
5150

5251

5352
int match_sid(struct cifs_sid *ctsid)
@@ -195,9 +194,9 @@ static void access_flags_to_mode(__le32 ace_flags, int type, umode_t *pmode,
195194
/* For deny ACEs we change the mask so that subsequent allow access
196195
control entries do not turn on the bits we are denying */
197196
if (type == ACCESS_DENIED) {
198-
if (flags & GENERIC_ALL) {
197+
if (flags & GENERIC_ALL)
199198
*pbits_to_set &= ~S_IRWXUGO;
200-
}
199+
201200
if ((flags & GENERIC_WRITE) ||
202201
((flags & FILE_WRITE_RIGHTS) == FILE_WRITE_RIGHTS))
203202
*pbits_to_set &= ~S_IWUGO;

‎fs/cifs/cifsfs.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,8 @@ cifs_put_super(struct super_block *sb)
203203
return;
204204
}
205205
rc = cifs_umount(sb, cifs_sb);
206-
if (rc) {
206+
if (rc)
207207
cERROR(1, ("cifs_umount failed with return code %d", rc));
208-
}
209208
#ifdef CONFIG_CIFS_DFS_UPCALL
210209
if (cifs_sb->mountdata) {
211210
kfree(cifs_sb->mountdata);

‎fs/cifs/cifsproto.h‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ extern int SendReceiveNoRsp(const unsigned int xid, struct cifsSesInfo *ses,
5353
extern int SendReceive2(const unsigned int /* xid */ , struct cifsSesInfo *,
5454
struct kvec *, int /* nvec to send */,
5555
int * /* type of buf returned */ , const int flags);
56-
extern int SendReceiveBlockingLock(const unsigned int /* xid */ ,
57-
struct cifsTconInfo *,
58-
struct smb_hdr * /* input */ ,
59-
struct smb_hdr * /* out */ ,
60-
int * /* bytes returned */);
56+
extern int SendReceiveBlockingLock(const unsigned int xid,
57+
struct cifsTconInfo *ptcon,
58+
struct smb_hdr *in_buf ,
59+
struct smb_hdr *out_buf,
60+
int *bytes_returned);
6161
extern int checkSMB(struct smb_hdr *smb, __u16 mid, unsigned int length);
6262
extern int is_valid_oplock_break(struct smb_hdr *smb, struct TCP_Server_Info *);
6363
extern int is_size_safe_to_change(struct cifsInodeInfo *, __u64 eof);
@@ -84,7 +84,7 @@ extern __u16 GetNextMid(struct TCP_Server_Info *server);
8484
extern struct oplock_q_entry *AllocOplockQEntry(struct inode *, u16,
8585
struct cifsTconInfo *);
8686
extern void DeleteOplockQEntry(struct oplock_q_entry *);
87-
extern struct timespec cifs_NTtimeToUnix(u64 /* utc nanoseconds since 1601 */ );
87+
extern struct timespec cifs_NTtimeToUnix(u64 utc_nanoseconds_since_1601);
8888
extern u64 cifs_UnixTimeToNT(struct timespec);
8989
extern __le64 cnvrtDosCifsTm(__u16 date, __u16 time);
9090
extern struct timespec cnvrtDosUnixTm(__u16 date, __u16 time);
@@ -175,11 +175,11 @@ extern int CIFSSMBQFSPosixInfo(const int xid, struct cifsTconInfo *tcon,
175175
struct kstatfs *FSData);
176176

177177
extern int CIFSSMBSetTimes(const int xid, struct cifsTconInfo *tcon,
178-
const char *fileName, const FILE_BASIC_INFO * data,
178+
const char *fileName, const FILE_BASIC_INFO *data,
179179
const struct nls_table *nls_codepage,
180180
int remap_special_chars);
181181
extern int CIFSSMBSetFileTimes(const int xid, struct cifsTconInfo *tcon,
182-
const FILE_BASIC_INFO * data, __u16 fid);
182+
const FILE_BASIC_INFO *data, __u16 fid);
183183
#if 0
184184
extern int CIFSSMBSetAttrLegacy(int xid, struct cifsTconInfo *tcon,
185185
char *fileName, __u16 dos_attributes,

0 commit comments

Comments
 (0)