[PATCH] fs: nfsd: export: fix coding style issues

From: chihau Chau
Date: Tue Feb 09 2010 - 00:18:57 EST


From: Chihau Chau <chihau@xxxxxxxxx>

This fixes some coding style issues like spaces required, lines over 80
characters, assignments in if conditions and trailing whitespaces.

Signed-off-by: Chihau Chau <chihau@xxxxxxxxx>
---
fs/nfsd/export.c | 26 +++++++++++++++-----------
1 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c
index c487810..4ecb07b 100644
--- a/fs/nfsd/export.c
+++ b/fs/nfsd/export.c
@@ -41,7 +41,7 @@ static int exp_verify_string(char *cp, int max);

#define EXPKEY_HASHBITS 8
#define EXPKEY_HASHMAX (1 << EXPKEY_HASHBITS)
-#define EXPKEY_HASHMASK (EXPKEY_HASHMAX -1)
+#define EXPKEY_HASHMASK (EXPKEY_HASHMAX - 1)
static struct cache_head *expkey_table[EXPKEY_HASHMAX];

static void expkey_put(struct kref *ref)
@@ -66,7 +66,7 @@ static void expkey_request(struct cache_detail *cd,
qword_add(bpp, blen, ek->ek_client->name);
snprintf(type, 5, "%d", ek->ek_fsidtype);
qword_add(bpp, blen, type);
- qword_addhex(bpp, blen, (char*)ek->ek_fsid, key_len(ek->ek_fsidtype));
+ qword_addhex(bpp, blen, (char *)ek->ek_fsid, key_len(ek->ek_fsidtype));
(*bpp)[-1] = '\n';
}

@@ -75,7 +75,8 @@ static int expkey_upcall(struct cache_detail *cd, struct cache_head *h)
return sunrpc_cache_pipe_upcall(cd, h, expkey_request);
}

-static struct svc_expkey *svc_expkey_update(struct svc_expkey *new, struct svc_expkey *old);
+static struct svc_expkey *svc_expkey_update(struct svc_expkey *new,
+ struct svc_expkey *old);
static struct svc_expkey *svc_expkey_lookup(struct svc_expkey *);
static struct cache_detail svc_expkey_cache;

@@ -101,7 +102,8 @@ static int expkey_parse(struct cache_detail *cd, char *mesg, int mlen)
goto out;

err = -EINVAL;
- if ((len=qword_get(&mesg, buf, PAGE_SIZE)) <= 0)
+ len = qword_get(&mesg, buf, PAGE_SIZE);
+ if (len <= 0)
goto out;

err = -ENOENT;
@@ -111,15 +113,17 @@ static int expkey_parse(struct cache_detail *cd, char *mesg, int mlen)
dprintk("found domain %s\n", buf);

err = -EINVAL;
- if ((len=qword_get(&mesg, buf, PAGE_SIZE)) <= 0)
+ len = qword_get(&mesg, buf, PAGE_SIZE);
+ if (len <= 0)
goto out;
fsidtype = simple_strtoul(buf, &ep, 10);
if (*ep)
goto out;
dprintk("found fsidtype %d\n", fsidtype);
- if (key_len(fsidtype)==0) /* invalid type */
+ if (key_len(fsidtype) == 0) /* invalid type */
goto out;
- if ((len=qword_get(&mesg, buf, PAGE_SIZE)) <= 0)
+ len = qword_get(&mesg, buf, PAGE_SIZE);
+ if (len <= 0)
goto out;
dprintk("found fsid length %d\n", len);
if (len != key_len(fsidtype))
@@ -131,7 +135,7 @@ static int expkey_parse(struct cache_detail *cd, char *mesg, int mlen)
if (key.h.expiry_time == 0)
goto out;

- key.ek_client = dom;
+ key.ek_client = dom;
key.ek_fsidtype = fsidtype;
memcpy(key.ek_fsid, buf, len);

@@ -181,16 +185,16 @@ static int expkey_show(struct seq_file *m,
struct svc_expkey *ek ;
int i;

- if (h ==NULL) {
+ if (h == NULL) {
seq_puts(m, "#domain fsidtype fsid [path]\n");
return 0;
}
ek = container_of(h, struct svc_expkey, h);
seq_printf(m, "%s %d 0x", ek->ek_client->name,
ek->ek_fsidtype);
- for (i=0; i < key_len(ek->ek_fsidtype)/4; i++)
+ for (i = 0; i < key_len(ek->ek_fsidtype)/4; i++)
seq_printf(m, "%08x", ek->ek_fsid[i]);
- if (test_bit(CACHE_VALID, &h->flags) &&
+ if (test_bit(CACHE_VALID, &h->flags) &&
!test_bit(CACHE_NEGATIVE, &h->flags)) {
seq_printf(m, " ");
seq_path(m, &ek->ek_path, "\\ \t\n");
--
1.5.6.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/