staging: lustre: llite: llite_capa.c - fixes checkpatch errors - unecessary init of static variables to 0
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"
--- drivers/staging/lustre/lustre/llite/llite_capa.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/lustre/lustre/llite/llite_capa.c +4 -4
@@ -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);
Signature · 1 line
1.9.0
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>"
--- drivers/staging/lustre/lustre/llite/llite_capa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/lustre/lustre/llite/llite_capa.c +1 -1
@@ -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>
Signature · 1 line
1.9.0
PATCH 3/4 staging: lustre: llite: dir.c - fixes indented labels in code
In reply to Anil BelurFrom: Anil Belur <[email protected]>
- this fixes "WARNING: labels should not be indented"
--- drivers/staging/lustre/lustre/llite/dir.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/staging/lustre/lustre/llite/dir.c +8 -8
@@ -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 &©_to_user ((void *)arg,qctl,sizeof (*qctl))) rc = -EFAULT ; - out_quotactl: +out_quotactl:OBD_FREE_PTR (qctl);return rc; }
Signature · 1 line
1.9.0
PATCH 4/4 staging: lustre: llite: dir.c - fix for coding style issues
In reply to Anil BelurFrom: Anil Belur <[email protected]>
- this fixes some coding style issues "ERROR: "(foo*)" should be "(foo *)"
--- drivers/staging/lustre/lustre/llite/dir.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/lustre/lustre/llite/dir.c +2 -2
@@ -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 :
Signature · 1 line
1.9.0