2014-06-25 04:58:30

by Anil Belur

[permalink] [raw]
Subject: [PATCH 1/4] staging: lustre: llite: llite_capa.c - fixes checkpatch errors - unecessary init of static variables to 0

From: Anil Belur <[email protected]>

- this commit fixes some "ERROR: do not initialise statics to 0 or NULL"

Signed-off-by: Anil Belur <[email protected]>
---
drivers/staging/lustre/lustre/llite/llite_capa.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/lustre/lustre/llite/llite_capa.c b/drivers/staging/lustre/lustre/llite/llite_capa.c
index d06d0b1..7ed45a4 100644
--- a/drivers/staging/lustre/lustre/llite/llite_capa.c
+++ b/drivers/staging/lustre/lustre/llite/llite_capa.c
@@ -63,10 +63,10 @@ static struct list_head *ll_capa_list = &capa_list[CAPA_SITE_CLIENT];
struct timer_list ll_capa_timer;
/* for debug: indicate whether capa on llite is enabled or not */
static atomic_t ll_capa_debug = ATOMIC_INIT(0);
-static unsigned long long ll_capa_renewed = 0;
-static unsigned long long ll_capa_renewal_noent = 0;
-static unsigned long long ll_capa_renewal_failed = 0;
-static unsigned long long ll_capa_renewal_retries = 0;
+static unsigned long long ll_capa_renewed;
+static unsigned long long ll_capa_renewal_noent;
+static unsigned long long ll_capa_renewal_failed;
+static unsigned long long ll_capa_renewal_retries;

static int ll_update_capa(struct obd_capa *ocapa, struct lustre_capa *capa);

--
1.9.0


2014-06-25 04:58:37

by Anil Belur

[permalink] [raw]
Subject: [PATCH 2/4] staging: lustre: llite: llite_capa.c - fixed warning to use recomended headers <linux/uaccess.h>

From: Anil Belur <[email protected]>

- this fixes "WARNING: Use #include <linux/uaccess.h> instead of
<asm/uaccess.h>"

Signed-off-by: Anil Belur <[email protected]>
---
drivers/staging/lustre/lustre/llite/llite_capa.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/llite/llite_capa.c b/drivers/staging/lustre/lustre/llite/llite_capa.c
index 7ed45a4..2f11cbf 100644
--- a/drivers/staging/lustre/lustre/llite/llite_capa.c
+++ b/drivers/staging/lustre/lustre/llite/llite_capa.c
@@ -41,7 +41,7 @@
#define DEBUG_SUBSYSTEM S_LLITE

#include <linux/fs.h>
-#include <asm/uaccess.h>
+#include <linux/uaccess.h>
#include <linux/file.h>
#include <linux/kmod.h>

--
1.9.0

2014-06-25 04:58:45

by Anil Belur

[permalink] [raw]
Subject: [PATCH 4/4] staging: lustre: llite: dir.c - fix for coding style issues

From: Anil Belur <[email protected]>

- this fixes some coding style issues "ERROR: "(foo*)" should be "(foo *)"

Signed-off-by: Anil Belur <[email protected]>
---
drivers/staging/lustre/lustre/llite/dir.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/lustre/lustre/llite/dir.c b/drivers/staging/lustre/lustre/llite/dir.c
index 5d096d8..6efaf03 100644
--- a/drivers/staging/lustre/lustre/llite/dir.c
+++ b/drivers/staging/lustre/lustre/llite/dir.c
@@ -1266,7 +1266,7 @@ static long ll_dir_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
if (mdtidx < 0)
return mdtidx;

- if (put_user((int)mdtidx, (int*)arg))
+ if (put_user((int)mdtidx, (int *)arg))
return -EFAULT;

return 0;
@@ -1778,7 +1778,7 @@ out_quotactl:
return -EFAULT;
return 0;
case LL_IOC_GET_CONNECT_FLAGS: {
- return obd_iocontrol(cmd, sbi->ll_md_exp, 0, NULL, (void*)arg);
+ return obd_iocontrol(cmd, sbi->ll_md_exp, 0, NULL, (void *)arg);
}
case OBD_IOC_CHANGELOG_SEND:
case OBD_IOC_CHANGELOG_CLEAR:
--
1.9.0

2014-06-25 04:58:41

by Anil Belur

[permalink] [raw]
Subject: [PATCH 3/4] staging: lustre: llite: dir.c - fixes indented labels in code

From: Anil Belur <[email protected]>

- this fixes "WARNING: labels should not be indented"

Signed-off-by: Anil Belur <[email protected]>
---
drivers/staging/lustre/lustre/llite/dir.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/lustre/lustre/llite/dir.c b/drivers/staging/lustre/lustre/llite/dir.c
index ae6f61a..5d096d8 100644
--- a/drivers/staging/lustre/lustre/llite/dir.c
+++ b/drivers/staging/lustre/lustre/llite/dir.c
@@ -1501,7 +1501,7 @@ out_rmdir:
GOTO(out_req, rc = -EFAULT);
rc = -EOVERFLOW;
}
- skip_lmm:
+skip_lmm:
if (cmd == IOC_MDC_GETFILEINFO || cmd == LL_IOC_MDC_GETINFO) {
struct lov_user_mds_data *lmdp;
lstat_t st = { 0 };
@@ -1525,7 +1525,7 @@ out_rmdir:
GOTO(out_req, rc = -EFAULT);
}

- out_req:
+out_req:
ptlrpc_req_finished(request);
if (filename)
ll_putname(filename);
@@ -1589,9 +1589,9 @@ out_rmdir:
if (copy_to_user(&lumd->lmd_st, &st, sizeof(st)))
GOTO(free_lsm, rc = -EFAULT);

- free_lsm:
+free_lsm:
obd_free_memmd(sbi->ll_dt_exp, &lsm);
- free_lmm:
+free_lmm:
OBD_FREE_LARGE(lmm, lmmsize);
return rc;
}
@@ -1653,7 +1653,7 @@ out_rmdir:
CDEBUG(D_QUOTA, "copy_to_user failed\n");
GOTO(out_poll, rc);
}
- out_poll:
+out_poll:
OBD_FREE_PTR(check);
return rc;
}
@@ -1702,9 +1702,9 @@ out_rmdir:
rc = -EFAULT;
}

- out_quotactl_20:
+out_quotactl_20:
OBD_FREE_PTR(qctl_20);
- out_quotactl_18:
+out_quotactl_18:
OBD_FREE_PTR(qctl_18);
return rc;
}
@@ -1726,7 +1726,7 @@ out_rmdir:
if (rc == 0 && copy_to_user((void *)arg,qctl,sizeof(*qctl)))
rc = -EFAULT;

- out_quotactl:
+out_quotactl:
OBD_FREE_PTR(qctl);
return rc;
}
--
1.9.0