* [PATCH v2 01/13] staging: lustre: remove space between function name and and open parenthesis
@ 2014-08-11 18:27 Srikrishan Malik
2014-08-11 18:27 ` [PATCH v2 02/13] staging: lustre: remove spaces from start of line Srikrishan Malik
` (11 more replies)
0 siblings, 12 replies; 16+ messages in thread
From: Srikrishan Malik @ 2014-08-11 18:27 UTC (permalink / raw)
To: greg, andreas.dilger, oleg.drokin; +Cc: devel, linux-kernel, Srikrishan Malik
Fixes following checkpatch warning:
WARNING: space prohibited between function name and open parenthesis '('
Signed-off-by: Srikrishan Malik <srikrishanmalik@gmail.com>
---
drivers/staging/lustre/lustre/mdc/mdc_internal.h | 2 +-
drivers/staging/lustre/lustre/mdc/mdc_lib.c | 4 ++--
drivers/staging/lustre/lustre/mdc/mdc_locks.c | 2 +-
drivers/staging/lustre/lustre/mdc/mdc_request.c | 14 +++++++-------
4 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/drivers/staging/lustre/lustre/mdc/mdc_internal.h b/drivers/staging/lustre/lustre/mdc/mdc_internal.h
index e8235559e27f..f4da8f3523d2 100644
--- a/drivers/staging/lustre/lustre/mdc/mdc_internal.h
+++ b/drivers/staging/lustre/lustre/mdc/mdc_internal.h
@@ -40,7 +40,7 @@
#include "../include/lustre_mdc.h"
#include "../include/lustre_mds.h"
-#if defined (CONFIG_PROC_FS)
+#if defined CONFIG_PROC_FS
void lprocfs_mdc_init_vars(struct lprocfs_static_vars *lvars);
#else
static inline void lprocfs_mdc_init_vars(struct lprocfs_static_vars *lvars)
diff --git a/drivers/staging/lustre/lustre/mdc/mdc_lib.c b/drivers/staging/lustre/lustre/mdc/mdc_lib.c
index f54dd90c7e50..60217ba440aa 100644
--- a/drivers/staging/lustre/lustre/mdc/mdc_lib.c
+++ b/drivers/staging/lustre/lustre/mdc/mdc_lib.c
@@ -42,7 +42,7 @@
static void __mdc_pack_body(struct mdt_body *b, __u32 suppgid)
{
- LASSERT (b != NULL);
+ LASSERT(b != NULL);
b->suppgid = suppgid;
b->uid = from_kuid(&init_user_ns, current_uid());
@@ -409,7 +409,7 @@ void mdc_link_pack(struct ptlrpc_request *req, struct md_op_data *op_data)
CLASSERT(sizeof(struct mdt_rec_reint) == sizeof(struct mdt_rec_link));
rec = req_capsule_client_get(&req->rq_pill, &RMF_REC_REINT);
- LASSERT (rec != NULL);
+ LASSERT(rec != NULL);
rec->lk_opcode = REINT_LINK;
rec->lk_fsuid = op_data->op_fsuid;//current->fsuid;
diff --git a/drivers/staging/lustre/lustre/mdc/mdc_locks.c b/drivers/staging/lustre/lustre/mdc/mdc_locks.c
index 71219b90e22b..88b43823c632 100644
--- a/drivers/staging/lustre/lustre/mdc/mdc_locks.c
+++ b/drivers/staging/lustre/lustre/mdc/mdc_locks.c
@@ -633,7 +633,7 @@ static int mdc_finish_enqueue(struct obd_export *exp,
body = req_capsule_server_get(pill, &RMF_MDT_BODY);
if (body == NULL) {
- CERROR ("Can't swab mdt_body\n");
+ CERROR("Can't swab mdt_body\n");
return -EPROTO;
}
diff --git a/drivers/staging/lustre/lustre/mdc/mdc_request.c b/drivers/staging/lustre/lustre/mdc/mdc_request.c
index 4a1cc4eb73d5..0b517e550477 100644
--- a/drivers/staging/lustre/lustre/mdc/mdc_request.c
+++ b/drivers/staging/lustre/lustre/mdc/mdc_request.c
@@ -1702,7 +1702,7 @@ static int mdc_quotactl(struct obd_device *unused, struct obd_export *exp,
if (oqc) {
*oqctl = *oqc;
} else if (!rc) {
- CERROR ("Can't unpack obd_quotactl\n");
+ CERROR("Can't unpack obd_quotactl\n");
rc = -EPROTO;
}
} else if (!rc) {
@@ -2426,14 +2426,14 @@ static int mdc_setup(struct obd_device *obd, struct lustre_cfg *cfg)
struct lprocfs_static_vars lvars = { NULL };
int rc;
- OBD_ALLOC(cli->cl_rpc_lock, sizeof (*cli->cl_rpc_lock));
+ OBD_ALLOC(cli->cl_rpc_lock, sizeof(*cli->cl_rpc_lock));
if (!cli->cl_rpc_lock)
return -ENOMEM;
mdc_init_rpc_lock(cli->cl_rpc_lock);
ptlrpcd_addref();
- OBD_ALLOC(cli->cl_close_lock, sizeof (*cli->cl_close_lock));
+ OBD_ALLOC(cli->cl_close_lock, sizeof(*cli->cl_close_lock));
if (!cli->cl_close_lock)
GOTO(err_rpc_lock, rc = -ENOMEM);
mdc_init_rpc_lock(cli->cl_close_lock);
@@ -2459,9 +2459,9 @@ static int mdc_setup(struct obd_device *obd, struct lustre_cfg *cfg)
return rc;
err_close_lock:
- OBD_FREE(cli->cl_close_lock, sizeof (*cli->cl_close_lock));
+ OBD_FREE(cli->cl_close_lock, sizeof(*cli->cl_close_lock));
err_rpc_lock:
- OBD_FREE(cli->cl_rpc_lock, sizeof (*cli->cl_rpc_lock));
+ OBD_FREE(cli->cl_rpc_lock, sizeof(*cli->cl_rpc_lock));
ptlrpcd_decref();
return rc;
}
@@ -2523,8 +2523,8 @@ static int mdc_cleanup(struct obd_device *obd)
{
struct client_obd *cli = &obd->u.cli;
- OBD_FREE(cli->cl_rpc_lock, sizeof (*cli->cl_rpc_lock));
- OBD_FREE(cli->cl_close_lock, sizeof (*cli->cl_close_lock));
+ OBD_FREE(cli->cl_rpc_lock, sizeof(*cli->cl_rpc_lock));
+ OBD_FREE(cli->cl_close_lock, sizeof(*cli->cl_close_lock));
ptlrpcd_decref();
--
1.9.3
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v2 02/13] staging: lustre: remove spaces from start of line
2014-08-11 18:27 [PATCH v2 01/13] staging: lustre: remove space between function name and and open parenthesis Srikrishan Malik
@ 2014-08-11 18:27 ` Srikrishan Malik
2014-08-11 18:27 ` [PATCH v2 03/13] staging: lustre: move open brace to next line after functions Srikrishan Malik
` (10 subsequent siblings)
11 siblings, 0 replies; 16+ messages in thread
From: Srikrishan Malik @ 2014-08-11 18:27 UTC (permalink / raw)
To: greg, andreas.dilger, oleg.drokin; +Cc: devel, linux-kernel, Srikrishan Malik
Fixes the following checkpatch warning:
WARNING: please, no spaces at the start of a line
Signed-off-by: Srikrishan Malik <srikrishanmalik@gmail.com>
---
drivers/staging/lustre/lustre/mdc/lproc_mdc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/lustre/lustre/mdc/lproc_mdc.c b/drivers/staging/lustre/lustre/mdc/lproc_mdc.c
index d1d891b91663..f883d9c28f20 100644
--- a/drivers/staging/lustre/lustre/mdc/lproc_mdc.c
+++ b/drivers/staging/lustre/lustre/mdc/lproc_mdc.c
@@ -209,6 +209,6 @@ static struct lprocfs_vars lprocfs_mdc_module_vars[] = {
void lprocfs_mdc_init_vars(struct lprocfs_static_vars *lvars)
{
- lvars->module_vars = lprocfs_mdc_module_vars;
- lvars->obd_vars = lprocfs_mdc_obd_vars;
+ lvars->module_vars = lprocfs_mdc_module_vars;
+ lvars->obd_vars = lprocfs_mdc_obd_vars;
}
--
1.9.3
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v2 03/13] staging: lustre: move open brace to next line after functions
2014-08-11 18:27 [PATCH v2 01/13] staging: lustre: remove space between function name and and open parenthesis Srikrishan Malik
2014-08-11 18:27 ` [PATCH v2 02/13] staging: lustre: remove spaces from start of line Srikrishan Malik
@ 2014-08-11 18:27 ` Srikrishan Malik
2014-08-11 18:27 ` [PATCH v2 04/13] staging: lustre: fix lines over 80 chars Srikrishan Malik
` (9 subsequent siblings)
11 siblings, 0 replies; 16+ messages in thread
From: Srikrishan Malik @ 2014-08-11 18:27 UTC (permalink / raw)
To: greg, andreas.dilger, oleg.drokin; +Cc: devel, linux-kernel, Srikrishan Malik
Fixes the following checkpatch error:
ERROR: open brace '{' following function declarations go on the next line
Signed-off-by: Srikrishan Malik <srikrishanmalik@gmail.com>
---
drivers/staging/lustre/lustre/mdc/mdc_lib.c | 3 ++-
drivers/staging/lustre/lustre/mdc/mdc_request.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/lustre/lustre/mdc/mdc_lib.c b/drivers/staging/lustre/lustre/mdc/mdc_lib.c
index 60217ba440aa..daaa7422c03f 100644
--- a/drivers/staging/lustre/lustre/mdc/mdc_lib.c
+++ b/drivers/staging/lustre/lustre/mdc/mdc_lib.c
@@ -256,7 +256,8 @@ void mdc_open_pack(struct ptlrpc_request *req, struct md_op_data *op_data,
set_mrc_cr_flags(rec, cr_flags);
}
-static inline __u64 attr_pack(unsigned int ia_valid) {
+static inline __u64 attr_pack(unsigned int ia_valid)
+{
__u64 sa_valid = 0;
if (ia_valid & ATTR_MODE)
diff --git a/drivers/staging/lustre/lustre/mdc/mdc_request.c b/drivers/staging/lustre/lustre/mdc/mdc_request.c
index 0b517e550477..0bcf624620ce 100644
--- a/drivers/staging/lustre/lustre/mdc/mdc_request.c
+++ b/drivers/staging/lustre/lustre/mdc/mdc_request.c
@@ -2384,7 +2384,8 @@ int mdc_fid_alloc(struct obd_export *exp, struct lu_fid *fid,
return seq_client_alloc_fid(NULL, seq, fid);
}
-struct obd_uuid *mdc_get_uuid(struct obd_export *exp) {
+struct obd_uuid *mdc_get_uuid(struct obd_export *exp)
+{
struct client_obd *cli = &exp->exp_obd->u.cli;
return &cli->cl_target_uuid;
}
--
1.9.3
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v2 04/13] staging: lustre: fix lines over 80 chars
2014-08-11 18:27 [PATCH v2 01/13] staging: lustre: remove space between function name and and open parenthesis Srikrishan Malik
2014-08-11 18:27 ` [PATCH v2 02/13] staging: lustre: remove spaces from start of line Srikrishan Malik
2014-08-11 18:27 ` [PATCH v2 03/13] staging: lustre: move open brace to next line after functions Srikrishan Malik
@ 2014-08-11 18:27 ` Srikrishan Malik
2014-08-11 18:27 ` [PATCH v2 05/13] staging: lustre: Add missing spaces around operators and braces Srikrishan Malik
` (8 subsequent siblings)
11 siblings, 0 replies; 16+ messages in thread
From: Srikrishan Malik @ 2014-08-11 18:27 UTC (permalink / raw)
To: greg, andreas.dilger, oleg.drokin; +Cc: devel, linux-kernel, Srikrishan Malik
Fixes the following checkpatch warning:
WARNING: line over 80 characters
Signed-off-by: Srikrishan Malik <srikrishanmalik@gmail.com>
---
drivers/staging/lustre/lustre/mdc/lproc_mdc.c | 6 ++++--
drivers/staging/lustre/lustre/mdc/mdc_lib.c | 9 ++++++---
drivers/staging/lustre/lustre/mdc/mdc_locks.c | 7 ++++---
drivers/staging/lustre/lustre/mdc/mdc_request.c | 6 ++++--
4 files changed, 18 insertions(+), 10 deletions(-)
diff --git a/drivers/staging/lustre/lustre/mdc/lproc_mdc.c b/drivers/staging/lustre/lustre/mdc/lproc_mdc.c
index f883d9c28f20..16341c818358 100644
--- a/drivers/staging/lustre/lustre/mdc/lproc_mdc.c
+++ b/drivers/staging/lustre/lustre/mdc/lproc_mdc.c
@@ -56,7 +56,8 @@ static ssize_t mdc_max_rpcs_in_flight_seq_write(struct file *file,
size_t count,
loff_t *off)
{
- struct obd_device *dev = ((struct seq_file *)file->private_data)->private;
+ struct obd_device *dev =
+ ((struct seq_file *)file->private_data)->private;
struct client_obd *cli = &dev->u.cli;
int val, rc;
@@ -84,7 +85,8 @@ static int mdc_kuc_open(struct inode *inode, struct file *file)
static ssize_t mdc_kuc_write(struct file *file, const char *buffer,
size_t count, loff_t *off)
{
- struct obd_device *obd = ((struct seq_file *)file->private_data)->private;
+ struct obd_device *obd =
+ ((struct seq_file *)file->private_data)->private;
struct kuc_hdr *lh;
struct hsm_action_list *hal;
struct hsm_action_item *hai;
diff --git a/drivers/staging/lustre/lustre/mdc/mdc_lib.c b/drivers/staging/lustre/lustre/mdc/mdc_lib.c
index daaa7422c03f..16e2e0b611d1 100644
--- a/drivers/staging/lustre/lustre/mdc/mdc_lib.c
+++ b/drivers/staging/lustre/lustre/mdc/mdc_lib.c
@@ -52,7 +52,8 @@ static void __mdc_pack_body(struct mdt_body *b, __u32 suppgid)
b->capability = cfs_curproc_cap_pack();
}
-void mdc_pack_capa(struct ptlrpc_request *req, const struct req_msg_field *field,
+void mdc_pack_capa(struct ptlrpc_request *req,
+ const struct req_msg_field *field,
struct obd_capa *oc)
{
struct req_capsule *pill = &req->rq_pill;
@@ -317,7 +318,8 @@ static void mdc_setattr_pack_rec(struct mdt_rec_setattr *rec,
rec->sa_atime = LTIME_S(op_data->op_attr.ia_atime);
rec->sa_mtime = LTIME_S(op_data->op_attr.ia_mtime);
rec->sa_ctime = LTIME_S(op_data->op_attr.ia_ctime);
- rec->sa_attr_flags = ((struct ll_iattr *)&op_data->op_attr)->ia_attr_flags;
+ rec->sa_attr_flags =
+ ((struct ll_iattr *)&op_data->op_attr)->ia_attr_flags;
if ((op_data->op_attr.ia_valid & ATTR_GID) &&
in_group_p(op_data->op_attr.ia_gid))
rec->sa_suppgid =
@@ -552,7 +554,8 @@ int mdc_enter_request(struct client_obd *cli)
list_add_tail(&mcw.mcw_entry, &cli->cl_cache_waiters);
init_waitqueue_head(&mcw.mcw_waitq);
client_obd_list_unlock(&cli->cl_loi_list_lock);
- rc = l_wait_event(mcw.mcw_waitq, mdc_req_avail(cli, &mcw), &lwi);
+ rc = l_wait_event(mcw.mcw_waitq, mdc_req_avail(cli, &mcw),
+ &lwi);
if (rc) {
client_obd_list_lock(&cli->cl_loi_list_lock);
if (list_empty(&mcw.mcw_entry))
diff --git a/drivers/staging/lustre/lustre/mdc/mdc_locks.c b/drivers/staging/lustre/lustre/mdc/mdc_locks.c
index 88b43823c632..5de9e8862393 100644
--- a/drivers/staging/lustre/lustre/mdc/mdc_locks.c
+++ b/drivers/staging/lustre/lustre/mdc/mdc_locks.c
@@ -450,8 +450,8 @@ static struct ptlrpc_request *mdc_intent_unlink_pack(struct obd_export *exp,
}
static struct ptlrpc_request *mdc_intent_getattr_pack(struct obd_export *exp,
- struct lookup_intent *it,
- struct md_op_data *op_data)
+ struct lookup_intent *it,
+ struct md_op_data *op_data)
{
struct ptlrpc_request *req;
struct obd_device *obddev = class_exp2obd(exp);
@@ -1039,7 +1039,8 @@ static int mdc_finish_intent_lock(struct obd_export *exp,
memcpy(&old_lock, lockh, sizeof(*lockh));
if (ldlm_lock_match(NULL, LDLM_FL_BLOCK_GRANTED, NULL,
- LDLM_IBITS, &policy, LCK_NL, &old_lock, 0)) {
+ LDLM_IBITS, &policy, LCK_NL,
+ &old_lock, 0)) {
ldlm_lock_decref_and_cancel(lockh,
it->d.lustre.it_lock_mode);
memcpy(lockh, &old_lock, sizeof(old_lock));
diff --git a/drivers/staging/lustre/lustre/mdc/mdc_request.c b/drivers/staging/lustre/lustre/mdc/mdc_request.c
index 0bcf624620ce..5126262aa73d 100644
--- a/drivers/staging/lustre/lustre/mdc/mdc_request.c
+++ b/drivers/staging/lustre/lustre/mdc/mdc_request.c
@@ -897,7 +897,8 @@ int mdc_close(struct obd_export *exp, struct md_op_data *op_data,
mod->mod_open_req->rq_replay = 0;
spin_unlock(&mod->mod_open_req->rq_lock);
} else {
- CDEBUG(D_HA, "couldn't find open req; expecting close error\n");
+ CDEBUG(D_HA,
+ "couldn't find open req; expecting close error\n");
}
mdc_close_pack(req, op_data);
@@ -1084,7 +1085,8 @@ restart_bulk:
CERROR("too many resend retries, returning error\n");
return -EIO;
}
- lwi = LWI_TIMEOUT_INTR(cfs_time_seconds(resends), NULL, NULL, NULL);
+ lwi = LWI_TIMEOUT_INTR(cfs_time_seconds(resends),
+ NULL, NULL, NULL);
l_wait_event(waitq, 0, &lwi);
goto restart_bulk;
--
1.9.3
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v2 05/13] staging: lustre: Add missing spaces around operators and braces.
2014-08-11 18:27 [PATCH v2 01/13] staging: lustre: remove space between function name and and open parenthesis Srikrishan Malik
` (2 preceding siblings ...)
2014-08-11 18:27 ` [PATCH v2 04/13] staging: lustre: fix lines over 80 chars Srikrishan Malik
@ 2014-08-11 18:27 ` Srikrishan Malik
2014-08-11 18:27 ` [PATCH v2 06/13] staging: lustre: replace c99 style comments with C89 Srikrishan Malik
` (7 subsequent siblings)
11 siblings, 0 replies; 16+ messages in thread
From: Srikrishan Malik @ 2014-08-11 18:27 UTC (permalink / raw)
To: greg, andreas.dilger, oleg.drokin; +Cc: devel, linux-kernel, Srikrishan Malik
Fixes the following checkpatch errors:
ERROR: space required after that ',' (ctx:VxV)
ERROR: space required after that close brace '}'
Signed-off-by: Srikrishan Malik <srikrishanmalik@gmail.com>
---
drivers/staging/lustre/lustre/mdc/mdc_lib.c | 25 +++++++++++++------------
drivers/staging/lustre/lustre/mdc/mdc_locks.c | 5 +++--
drivers/staging/lustre/lustre/mdc/mdc_reint.c | 2 +-
drivers/staging/lustre/lustre/mdc/mdc_request.c | 7 ++++---
4 files changed, 21 insertions(+), 18 deletions(-)
diff --git a/drivers/staging/lustre/lustre/mdc/mdc_lib.c b/drivers/staging/lustre/lustre/mdc/mdc_lib.c
index 16e2e0b611d1..35ce2fdf696c 100644
--- a/drivers/staging/lustre/lustre/mdc/mdc_lib.c
+++ b/drivers/staging/lustre/lustre/mdc/mdc_lib.c
@@ -345,7 +345,8 @@ void mdc_setattr_pack(struct ptlrpc_request *req, struct md_op_data *op_data,
struct mdt_ioepoch *epoch;
struct lov_user_md *lum = NULL;
- CLASSERT(sizeof(struct mdt_rec_reint) ==sizeof(struct mdt_rec_setattr));
+ CLASSERT(sizeof(struct mdt_rec_reint) ==
+ sizeof(struct mdt_rec_setattr));
rec = req_capsule_client_get(&req->rq_pill, &RMF_REC_REINT);
mdc_setattr_pack_rec(rec, op_data);
@@ -385,18 +386,18 @@ void mdc_unlink_pack(struct ptlrpc_request *req, struct md_op_data *op_data)
rec = req_capsule_client_get(&req->rq_pill, &RMF_REC_REINT);
LASSERT(rec != NULL);
- rec->ul_opcode = op_data->op_cli_flags & CLI_RM_ENTRY ?
+ rec->ul_opcode = op_data->op_cli_flags & CLI_RM_ENTRY ?
REINT_RMENTRY : REINT_UNLINK;
- rec->ul_fsuid = op_data->op_fsuid;
- rec->ul_fsgid = op_data->op_fsgid;
- rec->ul_cap = op_data->op_cap;
- rec->ul_mode = op_data->op_mode;
- rec->ul_suppgid1= op_data->op_suppgids[0];
- rec->ul_suppgid2= -1;
- rec->ul_fid1 = op_data->op_fid1;
- rec->ul_fid2 = op_data->op_fid2;
- rec->ul_time = op_data->op_mod_time;
- rec->ul_bias = op_data->op_bias;
+ rec->ul_fsuid = op_data->op_fsuid;
+ rec->ul_fsgid = op_data->op_fsgid;
+ rec->ul_cap = op_data->op_cap;
+ rec->ul_mode = op_data->op_mode;
+ rec->ul_suppgid1 = op_data->op_suppgids[0];
+ rec->ul_suppgid2 = -1;
+ rec->ul_fid1 = op_data->op_fid1;
+ rec->ul_fid2 = op_data->op_fid2;
+ rec->ul_time = op_data->op_mod_time;
+ rec->ul_bias = op_data->op_bias;
mdc_pack_capa(req, &RMF_CAPA1, op_data->op_capa1);
diff --git a/drivers/staging/lustre/lustre/mdc/mdc_locks.c b/drivers/staging/lustre/lustre/mdc/mdc_locks.c
index 5de9e8862393..a5a2597616e9 100644
--- a/drivers/staging/lustre/lustre/mdc/mdc_locks.c
+++ b/drivers/staging/lustre/lustre/mdc/mdc_locks.c
@@ -621,7 +621,7 @@ static int mdc_finish_enqueue(struct obd_export *exp,
* function without doing so, and try to replay a failed create
* (bug 3440) */
if (it->it_op & IT_OPEN && req->rq_replay &&
- (!it_disposition(it, DISP_OPEN_OPEN) ||intent->it_status != 0))
+ (!it_disposition(it, DISP_OPEN_OPEN) || intent->it_status != 0))
mdc_clear_replay_flag(req, intent->it_status);
DEBUG_REQ(D_RPCTRACE, req, "op: %d disposition: %x, status: %d",
@@ -1047,7 +1047,8 @@ static int mdc_finish_intent_lock(struct obd_export *exp,
it->d.lustre.it_lock_handle = lockh->cookie;
}
}
- CDEBUG(D_DENTRY,"D_IT dentry %.*s intent: %s status %d disp %x rc %d\n",
+ CDEBUG(D_DENTRY,
+ "D_IT dentry %.*s intent: %s status %d disp %x rc %d\n",
op_data->op_namelen, op_data->op_name, ldlm_it2str(it->it_op),
it->d.lustre.it_status, it->d.lustre.it_disposition, rc);
return rc;
diff --git a/drivers/staging/lustre/lustre/mdc/mdc_reint.c b/drivers/staging/lustre/lustre/mdc/mdc_reint.c
index c5420a42bc33..b8c0f482b76f 100644
--- a/drivers/staging/lustre/lustre/mdc/mdc_reint.c
+++ b/drivers/staging/lustre/lustre/mdc/mdc_reint.c
@@ -71,7 +71,7 @@ int mdc_resource_get_unused(struct obd_export *exp, const struct lu_fid *fid,
__u64 bits)
{
struct ldlm_namespace *ns = exp->exp_obd->obd_namespace;
- ldlm_policy_data_t policy = {{0}};
+ ldlm_policy_data_t policy = {};
struct ldlm_res_id res_id;
struct ldlm_resource *res;
int count;
diff --git a/drivers/staging/lustre/lustre/mdc/mdc_request.c b/drivers/staging/lustre/lustre/mdc/mdc_request.c
index 5126262aa73d..6def92133227 100644
--- a/drivers/staging/lustre/lustre/mdc/mdc_request.c
+++ b/drivers/staging/lustre/lustre/mdc/mdc_request.c
@@ -326,7 +326,8 @@ static int mdc_is_subdir(struct obd_export *exp,
return rc;
}
-static int mdc_xattr_common(struct obd_export *exp,const struct req_format *fmt,
+static int mdc_xattr_common(struct obd_export *exp,
+ const struct req_format *fmt,
const struct lu_fid *fid,
struct obd_capa *oc, int opcode, obd_valid valid,
const char *xattr_name, const char *input,
@@ -544,7 +545,7 @@ int mdc_get_lustre_md(struct obd_export *exp, struct ptlrpc_request *req,
int lmvsize;
struct lov_mds_md *lmv;
- if(!S_ISDIR(md->body->mode)) {
+ if (!S_ISDIR(md->body->mode)) {
CDEBUG(D_INFO, "OBD_MD_FLDIREA set, should be a "
"directory, but is not\n");
GOTO(out, rc = -EPROTO);
@@ -1536,7 +1537,7 @@ static int changelog_kkuc_cb(const struct lu_env *env, struct llog_handle *llh,
memcpy(lh + 1, &rec->cr, len - sizeof(*lh));
rc = libcfs_kkuc_msg_put(cs->cs_fp, lh);
- CDEBUG(D_CHANGELOG, "kucmsg fp %p len %d rc %d\n", cs->cs_fp, len,rc);
+ CDEBUG(D_CHANGELOG, "kucmsg fp %p len %d rc %d\n", cs->cs_fp, len, rc);
return rc;
}
--
1.9.3
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v2 06/13] staging: lustre: replace c99 style comments with C89
2014-08-11 18:27 [PATCH v2 01/13] staging: lustre: remove space between function name and and open parenthesis Srikrishan Malik
` (3 preceding siblings ...)
2014-08-11 18:27 ` [PATCH v2 05/13] staging: lustre: Add missing spaces around operators and braces Srikrishan Malik
@ 2014-08-11 18:27 ` Srikrishan Malik
2014-08-11 18:27 ` [PATCH v2 07/13] staging: lustre: add blank lines after declarations Srikrishan Malik
` (6 subsequent siblings)
11 siblings, 0 replies; 16+ messages in thread
From: Srikrishan Malik @ 2014-08-11 18:27 UTC (permalink / raw)
To: greg, andreas.dilger, oleg.drokin; +Cc: devel, linux-kernel, Srikrishan Malik
Fixes the following checkpatch error:
ERROR: do not use C99 // comments
Signed-off-by: Srikrishan Malik <srikrishanmalik@gmail.com>
---
drivers/staging/lustre/lustre/mdc/mdc_lib.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/lustre/lustre/mdc/mdc_lib.c b/drivers/staging/lustre/lustre/mdc/mdc_lib.c
index 35ce2fdf696c..8b301f4d7e23 100644
--- a/drivers/staging/lustre/lustre/mdc/mdc_lib.c
+++ b/drivers/staging/lustre/lustre/mdc/mdc_lib.c
@@ -416,9 +416,9 @@ void mdc_link_pack(struct ptlrpc_request *req, struct md_op_data *op_data)
LASSERT(rec != NULL);
rec->lk_opcode = REINT_LINK;
- rec->lk_fsuid = op_data->op_fsuid;//current->fsuid;
- rec->lk_fsgid = op_data->op_fsgid;//current->fsgid;
- rec->lk_cap = op_data->op_cap;//current->cap_effective;
+ rec->lk_fsuid = op_data->op_fsuid; /* current->fsuid; */
+ rec->lk_fsgid = op_data->op_fsgid; /* current->fsgid; */
+ rec->lk_cap = op_data->op_cap; /* current->cap_effective; */
rec->lk_suppgid1 = op_data->op_suppgids[0];
rec->lk_suppgid2 = op_data->op_suppgids[1];
rec->lk_fid1 = op_data->op_fid1;
--
1.9.3
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v2 07/13] staging: lustre: add blank lines after declarations
2014-08-11 18:27 [PATCH v2 01/13] staging: lustre: remove space between function name and and open parenthesis Srikrishan Malik
` (4 preceding siblings ...)
2014-08-11 18:27 ` [PATCH v2 06/13] staging: lustre: replace c99 style comments with C89 Srikrishan Malik
@ 2014-08-11 18:27 ` Srikrishan Malik
2014-08-11 18:27 ` [PATCH v2 08/13] staging: lustre: fix multi line strings Srikrishan Malik
` (5 subsequent siblings)
11 siblings, 0 replies; 16+ messages in thread
From: Srikrishan Malik @ 2014-08-11 18:27 UTC (permalink / raw)
To: greg, andreas.dilger, oleg.drokin; +Cc: devel, linux-kernel, Srikrishan Malik
Fixes the following checkpatch warning:
WARNING: Missing a blank line after declarations
Signed-off-by: Srikrishan Malik <srikrishanmalik@gmail.com>
---
drivers/staging/lustre/lustre/mdc/mdc_lib.c | 1 +
drivers/staging/lustre/lustre/mdc/mdc_locks.c | 3 +++
drivers/staging/lustre/lustre/mdc/mdc_request.c | 5 +++++
3 files changed, 9 insertions(+)
diff --git a/drivers/staging/lustre/lustre/mdc/mdc_lib.c b/drivers/staging/lustre/lustre/mdc/mdc_lib.c
index 8b301f4d7e23..e8732cc30ce2 100644
--- a/drivers/staging/lustre/lustre/mdc/mdc_lib.c
+++ b/drivers/staging/lustre/lustre/mdc/mdc_lib.c
@@ -490,6 +490,7 @@ void mdc_getattr_pack(struct ptlrpc_request *req, __u64 valid, int flags,
if (op_data->op_name) {
char *tmp = req_capsule_client_get(&req->rq_pill, &RMF_NAME);
+
LOGL0(op_data->op_name, op_data->op_namelen, tmp);
}
diff --git a/drivers/staging/lustre/lustre/mdc/mdc_locks.c b/drivers/staging/lustre/lustre/mdc/mdc_locks.c
index a5a2597616e9..4d837d61be65 100644
--- a/drivers/staging/lustre/lustre/mdc/mdc_locks.c
+++ b/drivers/staging/lustre/lustre/mdc/mdc_locks.c
@@ -134,6 +134,7 @@ int mdc_set_lock_data(struct obd_export *exp, __u64 *lockh, void *data,
if (lock->l_resource->lr_lvb_inode &&
lock->l_resource->lr_lvb_inode != data) {
struct inode *old_inode = lock->l_resource->lr_lvb_inode;
+
LASSERTF(old_inode->i_state & I_FREEING,
"Found existing inode %p/%lu/%u state %lu in lock: "
"setting data to %p/%lu/%u\n", old_inode,
@@ -678,6 +679,7 @@ static int mdc_finish_enqueue(struct obd_export *exp,
*/
if ((it->it_op & IT_OPEN) && req->rq_replay) {
void *lmm;
+
if (req_capsule_get_size(pill, &RMF_EADATA,
RCL_CLIENT) <
body->eadatasize)
@@ -1029,6 +1031,7 @@ static int mdc_finish_intent_lock(struct obd_export *exp,
lock = ldlm_handle2lock(lockh);
if (lock) {
ldlm_policy_data_t policy = lock->l_policy_data;
+
LDLM_DEBUG(lock, "matching against this");
LASSERTF(fid_res_name_eq(&mdt_body->fid1,
diff --git a/drivers/staging/lustre/lustre/mdc/mdc_request.c b/drivers/staging/lustre/lustre/mdc/mdc_request.c
index 6def92133227..57d903156917 100644
--- a/drivers/staging/lustre/lustre/mdc/mdc_request.c
+++ b/drivers/staging/lustre/lustre/mdc/mdc_request.c
@@ -203,6 +203,7 @@ static int mdc_getattr_common(struct obd_export *exp,
if (body->valid & OBD_MD_FLMDSCAPA) {
struct lustre_capa *capa;
+
capa = req_capsule_server_get(pill, &RMF_CAPA1);
if (capa == NULL)
return -EPROTO;
@@ -283,6 +284,7 @@ int mdc_getattr_name(struct obd_export *exp, struct md_op_data *op_data,
if (op_data->op_name) {
char *name = req_capsule_client_get(&req->rq_pill, &RMF_NAME);
+
LASSERT(strnlen(op_data->op_name, op_data->op_namelen) ==
op_data->op_namelen);
memcpy(name, op_data->op_name, op_data->op_namelen);
@@ -696,6 +698,7 @@ void mdc_replay_open(struct ptlrpc_request *req)
void mdc_commit_open(struct ptlrpc_request *req)
{
struct md_open_data *mod = req->rq_cb_data;
+
if (mod == NULL)
return;
@@ -2390,6 +2393,7 @@ int mdc_fid_alloc(struct obd_export *exp, struct lu_fid *fid,
struct obd_uuid *mdc_get_uuid(struct obd_export *exp)
{
struct client_obd *cli = &exp->exp_obd->u.cli;
+
return &cli->cl_target_uuid;
}
@@ -2742,6 +2746,7 @@ int __init mdc_init(void)
{
int rc;
struct lprocfs_static_vars lvars = { NULL };
+
lprocfs_mdc_init_vars(&lvars);
rc = class_register_type(&mdc_obd_ops, &mdc_md_ops, lvars.module_vars,
--
1.9.3
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v2 08/13] staging: lustre: fix multi line strings
2014-08-11 18:27 [PATCH v2 01/13] staging: lustre: remove space between function name and and open parenthesis Srikrishan Malik
` (5 preceding siblings ...)
2014-08-11 18:27 ` [PATCH v2 07/13] staging: lustre: add blank lines after declarations Srikrishan Malik
@ 2014-08-11 18:27 ` Srikrishan Malik
2014-08-12 2:17 ` Drokin, Oleg
2014-08-13 14:01 ` [PATCH v3 08/13]] " Srikrishan Malik
2014-08-11 18:27 ` [PATCH v2 09/13] staging: lustre: Added space between type name and * Srikrishan Malik
` (4 subsequent siblings)
11 siblings, 2 replies; 16+ messages in thread
From: Srikrishan Malik @ 2014-08-11 18:27 UTC (permalink / raw)
To: greg, andreas.dilger, oleg.drokin; +Cc: devel, linux-kernel, Srikrishan Malik
Fixes the following checkpatch warning:
WARNING: quoted string split across lines
Signed-off-by: Srikrishan Malik <srikrishanmalik@gmail.com>
---
drivers/staging/lustre/lustre/mdc/mdc_locks.c | 9 +++----
drivers/staging/lustre/lustre/mdc/mdc_reint.c | 3 +--
drivers/staging/lustre/lustre/mdc/mdc_request.c | 36 ++++++++++++-------------
3 files changed, 23 insertions(+), 25 deletions(-)
diff --git a/drivers/staging/lustre/lustre/mdc/mdc_locks.c b/drivers/staging/lustre/lustre/mdc/mdc_locks.c
index 4d837d61be65..7f724e3c3f06 100644
--- a/drivers/staging/lustre/lustre/mdc/mdc_locks.c
+++ b/drivers/staging/lustre/lustre/mdc/mdc_locks.c
@@ -136,11 +136,10 @@ int mdc_set_lock_data(struct obd_export *exp, __u64 *lockh, void *data,
struct inode *old_inode = lock->l_resource->lr_lvb_inode;
LASSERTF(old_inode->i_state & I_FREEING,
- "Found existing inode %p/%lu/%u state %lu in lock: "
- "setting data to %p/%lu/%u\n", old_inode,
- old_inode->i_ino, old_inode->i_generation,
- old_inode->i_state,
- new_inode, new_inode->i_ino, new_inode->i_generation);
+ "Found existing inode %p/%lu/%u state %lu in lock: setting data to %p/%lu/%u\n",
+ old_inode, old_inode->i_ino, old_inode->i_generation,
+ old_inode->i_state, new_inode, new_inode->i_ino,
+ new_inode->i_generation);
}
lock->l_resource->lr_lvb_inode = new_inode;
if (bits)
diff --git a/drivers/staging/lustre/lustre/mdc/mdc_reint.c b/drivers/staging/lustre/lustre/mdc/mdc_reint.c
index b8c0f482b76f..46800335ca7d 100644
--- a/drivers/staging/lustre/lustre/mdc/mdc_reint.c
+++ b/drivers/staging/lustre/lustre/mdc/mdc_reint.c
@@ -158,8 +158,7 @@ int mdc_setattr(struct obd_export *exp, struct md_op_data *op_data,
*mod = obd_mod_alloc();
if (*mod == NULL) {
- DEBUG_REQ(D_ERROR, req, "Can't allocate "
- "md_open_data");
+ DEBUG_REQ(D_ERROR, req, "Can't allocate md_open_data");
} else {
req->rq_replay = 1;
req->rq_cb_data = *mod;
diff --git a/drivers/staging/lustre/lustre/mdc/mdc_request.c b/drivers/staging/lustre/lustre/mdc/mdc_request.c
index 57d903156917..6c691a4763b5 100644
--- a/drivers/staging/lustre/lustre/mdc/mdc_request.c
+++ b/drivers/staging/lustre/lustre/mdc/mdc_request.c
@@ -517,14 +517,14 @@ int mdc_get_lustre_md(struct obd_export *exp, struct ptlrpc_request *req,
struct lov_mds_md *lmm;
if (!S_ISREG(md->body->mode)) {
- CDEBUG(D_INFO, "OBD_MD_FLEASIZE set, should be a "
- "regular file, but is not\n");
+ CDEBUG(D_INFO,
+ "OBD_MD_FLEASIZE set, should be a regular file, but is not\n");
GOTO(out, rc = -EPROTO);
}
if (md->body->eadatasize == 0) {
- CDEBUG(D_INFO, "OBD_MD_FLEASIZE set, "
- "but eadatasize 0\n");
+ CDEBUG(D_INFO,
+ "OBD_MD_FLEASIZE set, but eadatasize 0\n");
GOTO(out, rc = -EPROTO);
}
lmmsize = md->body->eadatasize;
@@ -537,8 +537,8 @@ int mdc_get_lustre_md(struct obd_export *exp, struct ptlrpc_request *req,
GOTO(out, rc);
if (rc < sizeof(*md->lsm)) {
- CDEBUG(D_INFO, "lsm size too small: "
- "rc < sizeof (*md->lsm) (%d < %d)\n",
+ CDEBUG(D_INFO,
+ "lsm size too small: rc < sizeof (*md->lsm) (%d < %d)\n",
rc, (int)sizeof(*md->lsm));
GOTO(out, rc = -EPROTO);
}
@@ -548,14 +548,14 @@ int mdc_get_lustre_md(struct obd_export *exp, struct ptlrpc_request *req,
struct lov_mds_md *lmv;
if (!S_ISDIR(md->body->mode)) {
- CDEBUG(D_INFO, "OBD_MD_FLDIREA set, should be a "
- "directory, but is not\n");
+ CDEBUG(D_INFO,
+ "OBD_MD_FLDIREA set, should be a directory, but is not\n");
GOTO(out, rc = -EPROTO);
}
if (md->body->eadatasize == 0) {
- CDEBUG(D_INFO, "OBD_MD_FLDIREA is set, "
- "but eadatasize 0\n");
+ CDEBUG(D_INFO,
+ "OBD_MD_FLDIREA is set, but eadatasize 0\n");
return -EPROTO;
}
if (md->body->valid & OBD_MD_MEA) {
@@ -571,8 +571,8 @@ int mdc_get_lustre_md(struct obd_export *exp, struct ptlrpc_request *req,
GOTO(out, rc);
if (rc < sizeof(*md->mea)) {
- CDEBUG(D_INFO, "size too small: "
- "rc < sizeof(*md->mea) (%d < %d)\n",
+ CDEBUG(D_INFO,
+ "size too small: rc < sizeof(*md->mea) (%d < %d)\n",
rc, (int)sizeof(*md->mea));
GOTO(out, rc = -EPROTO);
}
@@ -778,8 +778,8 @@ int mdc_set_open_replay_data(struct obd_export *exp,
rec->cr_old_handle.cookie = body->handle.cookie;
open_req->rq_replay_cb = mdc_replay_open;
if (!fid_is_sane(&body->fid1)) {
- DEBUG_REQ(D_ERROR, open_req, "Saving replay request with "
- "insane fid");
+ DEBUG_REQ(D_ERROR, open_req,
+ "Saving replay request with insane fid");
LBUG();
}
@@ -928,8 +928,8 @@ int mdc_close(struct obd_export *exp, struct md_op_data *op_data,
rc = lustre_msg_get_status(req->rq_repmsg);
if (lustre_msg_get_type(req->rq_repmsg) == PTL_RPC_MSG_ERR) {
- DEBUG_REQ(D_ERROR, req, "type == PTL_RPC_MSG_ERR, err "
- "= %d", rc);
+ DEBUG_REQ(D_ERROR, req,
+ "type == PTL_RPC_MSG_ERR, err = %d", rc);
if (rc > 0)
rc = -rc;
}
@@ -2055,8 +2055,8 @@ static int mdc_hsm_copytool_send(int len, void *val)
return -EPROTO;
}
- CDEBUG(D_HSM, " Received message mg=%x t=%d m=%d l=%d actions=%d "
- "on %s\n",
+ CDEBUG(D_HSM,
+ " Received message mg=%x t=%d m=%d l=%d actions=%d on %s\n",
lh->kuc_magic, lh->kuc_transport, lh->kuc_msgtype,
lh->kuc_msglen, hal->hal_count, hal->hal_fsname);
--
1.9.3
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v2 09/13] staging: lustre: Added space between type name and *
2014-08-11 18:27 [PATCH v2 01/13] staging: lustre: remove space between function name and and open parenthesis Srikrishan Malik
` (6 preceding siblings ...)
2014-08-11 18:27 ` [PATCH v2 08/13] staging: lustre: fix multi line strings Srikrishan Malik
@ 2014-08-11 18:27 ` Srikrishan Malik
2014-08-11 18:27 ` [PATCH v2 10/13] staging: lustre: Fix misplaced opening brace warnings Srikrishan Malik
` (3 subsequent siblings)
11 siblings, 0 replies; 16+ messages in thread
From: Srikrishan Malik @ 2014-08-11 18:27 UTC (permalink / raw)
To: greg, andreas.dilger, oleg.drokin; +Cc: devel, linux-kernel, Srikrishan Malik
Fixes the following checkpatch error:
ERROR: "(foo*)" should be "(foo *)"
Signed-off-by: Srikrishan Malik <srikrishanmalik@gmail.com>
---
drivers/staging/lustre/lustre/mdc/mdc_locks.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/lustre/lustre/mdc/mdc_locks.c b/drivers/staging/lustre/lustre/mdc/mdc_locks.c
index 7f724e3c3f06..c03d77c9c5b8 100644
--- a/drivers/staging/lustre/lustre/mdc/mdc_locks.c
+++ b/drivers/staging/lustre/lustre/mdc/mdc_locks.c
@@ -218,7 +218,7 @@ int mdc_find_cbdata(struct obd_export *exp,
struct ldlm_res_id res_id;
int rc = 0;
- fid_build_reg_res_name((struct lu_fid*)fid, &res_id);
+ fid_build_reg_res_name((struct lu_fid *)fid, &res_id);
rc = ldlm_resource_iterate(class_exp2obd(exp)->obd_namespace, &res_id,
it, data);
if (rc == LDLM_ITER_STOP)
--
1.9.3
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v2 10/13] staging: lustre: Fix misplaced opening brace warnings
2014-08-11 18:27 [PATCH v2 01/13] staging: lustre: remove space between function name and and open parenthesis Srikrishan Malik
` (7 preceding siblings ...)
2014-08-11 18:27 ` [PATCH v2 09/13] staging: lustre: Added space between type name and * Srikrishan Malik
@ 2014-08-11 18:27 ` Srikrishan Malik
2014-08-11 18:27 ` [PATCH v2 11/13] staging: lustre: move else on the same line as closing brace Srikrishan Malik
` (2 subsequent siblings)
11 siblings, 0 replies; 16+ messages in thread
From: Srikrishan Malik @ 2014-08-11 18:27 UTC (permalink / raw)
To: greg, andreas.dilger, oleg.drokin; +Cc: devel, linux-kernel, Srikrishan Malik
Fixes the following checkpatch error:
ERROR: that open brace { should be on the previous line
Signed-off-by: Srikrishan Malik <srikrishanmalik@gmail.com>
---
drivers/staging/lustre/lustre/mdc/mdc_locks.c | 18 +++++++++++-------
drivers/staging/lustre/lustre/mdc/mdc_reint.c | 3 +--
drivers/staging/lustre/lustre/mdc/mdc_request.c | 7 +++++--
3 files changed, 17 insertions(+), 11 deletions(-)
diff --git a/drivers/staging/lustre/lustre/mdc/mdc_locks.c b/drivers/staging/lustre/lustre/mdc/mdc_locks.c
index c03d77c9c5b8..288ce9119ed5 100644
--- a/drivers/staging/lustre/lustre/mdc/mdc_locks.c
+++ b/drivers/staging/lustre/lustre/mdc/mdc_locks.c
@@ -785,14 +785,18 @@ int mdc_enqueue(struct obd_export *exp, struct ldlm_enqueue_info *einfo,
__u64 flags, saved_flags = extra_lock_flags;
int rc;
struct ldlm_res_id res_id;
- static const ldlm_policy_data_t lookup_policy =
- { .l_inodebits = { MDS_INODELOCK_LOOKUP } };
- static const ldlm_policy_data_t update_policy =
- { .l_inodebits = { MDS_INODELOCK_UPDATE } };
- static const ldlm_policy_data_t layout_policy =
- { .l_inodebits = { MDS_INODELOCK_LAYOUT } };
+ static const ldlm_policy_data_t lookup_policy = {
+ .l_inodebits = { MDS_INODELOCK_LOOKUP }
+ };
+ static const ldlm_policy_data_t update_policy = {
+ .l_inodebits = { MDS_INODELOCK_UPDATE }
+ };
+ static const ldlm_policy_data_t layout_policy = {
+ .l_inodebits = { MDS_INODELOCK_LAYOUT }
+ };
static const ldlm_policy_data_t getxattr_policy = {
- .l_inodebits = { MDS_INODELOCK_XATTR } };
+ .l_inodebits = { MDS_INODELOCK_XATTR }
+ };
ldlm_policy_data_t const *policy = &lookup_policy;
int generation, resends = 0;
struct ldlm_reply *lockrep;
diff --git a/drivers/staging/lustre/lustre/mdc/mdc_reint.c b/drivers/staging/lustre/lustre/mdc/mdc_reint.c
index 46800335ca7d..01af30ac1a52 100644
--- a/drivers/staging/lustre/lustre/mdc/mdc_reint.c
+++ b/drivers/staging/lustre/lustre/mdc/mdc_reint.c
@@ -152,8 +152,7 @@ int mdc_setattr(struct obd_export *exp, struct md_op_data *op_data,
ptlrpc_request_set_replen(req);
if (mod && (op_data->op_flags & MF_EPOCH_OPEN) &&
- req->rq_import->imp_replayable)
- {
+ req->rq_import->imp_replayable) {
LASSERT(*mod == NULL);
*mod = obd_mod_alloc();
diff --git a/drivers/staging/lustre/lustre/mdc/mdc_request.c b/drivers/staging/lustre/lustre/mdc/mdc_request.c
index 6c691a4763b5..bf2dcf50afd4 100644
--- a/drivers/staging/lustre/lustre/mdc/mdc_request.c
+++ b/drivers/staging/lustre/lustre/mdc/mdc_request.c
@@ -1794,8 +1794,11 @@ static int mdc_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
GOTO(out, rc);
case OBD_IOC_CHANGELOG_CLEAR: {
struct ioc_changelog *icc = karg;
- struct changelog_setinfo cs =
- {.cs_recno = icc->icc_recno, .cs_id = icc->icc_id};
+ struct changelog_setinfo cs = {
+ .cs_recno = icc->icc_recno,
+ .cs_id = icc->icc_id
+ };
+
rc = obd_set_info_async(NULL, exp, strlen(KEY_CHANGELOG_CLEAR),
KEY_CHANGELOG_CLEAR, sizeof(cs), &cs,
NULL);
--
1.9.3
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v2 11/13] staging: lustre: move else on the same line as closing brace
2014-08-11 18:27 [PATCH v2 01/13] staging: lustre: remove space between function name and and open parenthesis Srikrishan Malik
` (8 preceding siblings ...)
2014-08-11 18:27 ` [PATCH v2 10/13] staging: lustre: Fix misplaced opening brace warnings Srikrishan Malik
@ 2014-08-11 18:27 ` Srikrishan Malik
2014-08-11 18:27 ` [PATCH v2 12/13] staging: lustre: remove parentheses usage with return Srikrishan Malik
2014-08-11 18:27 ` [PATCH v2 13/13] staging: lustre: Cleanup variable declarations in mdc_enqueue() Srikrishan Malik
11 siblings, 0 replies; 16+ messages in thread
From: Srikrishan Malik @ 2014-08-11 18:27 UTC (permalink / raw)
To: greg, andreas.dilger, oleg.drokin; +Cc: devel, linux-kernel, Srikrishan Malik
Fix the following checkpatch error:
ERROR: else should follow close brace '}'
Signed-off-by: Srikrishan Malik <srikrishanmalik@gmail.com>
---
drivers/staging/lustre/lustre/mdc/mdc_request.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/lustre/lustre/mdc/mdc_request.c b/drivers/staging/lustre/lustre/mdc/mdc_request.c
index bf2dcf50afd4..5a9a8526dea1 100644
--- a/drivers/staging/lustre/lustre/mdc/mdc_request.c
+++ b/drivers/staging/lustre/lustre/mdc/mdc_request.c
@@ -587,8 +587,7 @@ int mdc_get_lustre_md(struct obd_export *exp, struct ptlrpc_request *req,
lustre_swab_mdt_remote_perm);
if (!md->remote_perm)
GOTO(out, rc = -EPROTO);
- }
- else if (md->body->valid & OBD_MD_FLACL) {
+ } else if (md->body->valid & OBD_MD_FLACL) {
/* for ACL, it's possible that FLACL is set but aclsize is zero.
* only when aclsize != 0 there's an actual segment for ACL
* in reply buffer.
--
1.9.3
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v2 12/13] staging: lustre: remove parentheses usage with return
2014-08-11 18:27 [PATCH v2 01/13] staging: lustre: remove space between function name and and open parenthesis Srikrishan Malik
` (9 preceding siblings ...)
2014-08-11 18:27 ` [PATCH v2 11/13] staging: lustre: move else on the same line as closing brace Srikrishan Malik
@ 2014-08-11 18:27 ` Srikrishan Malik
2014-08-11 18:27 ` [PATCH v2 13/13] staging: lustre: Cleanup variable declarations in mdc_enqueue() Srikrishan Malik
11 siblings, 0 replies; 16+ messages in thread
From: Srikrishan Malik @ 2014-08-11 18:27 UTC (permalink / raw)
To: greg, andreas.dilger, oleg.drokin; +Cc: devel, linux-kernel, Srikrishan Malik
Fix the following checkpatch error:
ERROR: return is not a function, parentheses are not required
Signed-off-by: Srikrishan Malik <srikrishanmalik@gmail.com>
---
drivers/staging/lustre/lustre/mdc/mdc_request.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/lustre/lustre/mdc/mdc_request.c b/drivers/staging/lustre/lustre/mdc/mdc_request.c
index 5a9a8526dea1..4ab75c24bd17 100644
--- a/drivers/staging/lustre/lustre/mdc/mdc_request.c
+++ b/drivers/staging/lustre/lustre/mdc/mdc_request.c
@@ -2588,7 +2588,7 @@ static int mdc_process_config(struct obd_device *obd, obd_count len, void *buf)
rc = 0;
break;
}
- return(rc);
+ return rc;
}
--
1.9.3
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v2 13/13] staging: lustre: Cleanup variable declarations in mdc_enqueue()
2014-08-11 18:27 [PATCH v2 01/13] staging: lustre: remove space between function name and and open parenthesis Srikrishan Malik
` (10 preceding siblings ...)
2014-08-11 18:27 ` [PATCH v2 12/13] staging: lustre: remove parentheses usage with return Srikrishan Malik
@ 2014-08-11 18:27 ` Srikrishan Malik
11 siblings, 0 replies; 16+ messages in thread
From: Srikrishan Malik @ 2014-08-11 18:27 UTC (permalink / raw)
To: greg, andreas.dilger, oleg.drokin; +Cc: devel, linux-kernel, Srikrishan Malik
Changes:
- move const union vars to the top
- move rc to bottom
- do not initialize req
- set lvb_type to enum member instead of 0
- change __u64 to u64
- fix inconsistant columnization
Signed-off-by: Srikrishan Malik <srikrishanmalik@gmail.com>
---
These changes were suggested by Dan Carpenter <dan.carpenter@oracle.com>.
drivers/staging/lustre/lustre/mdc/mdc_locks.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/staging/lustre/lustre/mdc/mdc_locks.c b/drivers/staging/lustre/lustre/mdc/mdc_locks.c
index 288ce9119ed5..c64a38eaee3e 100644
--- a/drivers/staging/lustre/lustre/mdc/mdc_locks.c
+++ b/drivers/staging/lustre/lustre/mdc/mdc_locks.c
@@ -778,13 +778,8 @@ static int mdc_finish_enqueue(struct obd_export *exp,
int mdc_enqueue(struct obd_export *exp, struct ldlm_enqueue_info *einfo,
struct lookup_intent *it, struct md_op_data *op_data,
struct lustre_handle *lockh, void *lmm, int lmmsize,
- struct ptlrpc_request **reqp, __u64 extra_lock_flags)
+ struct ptlrpc_request **reqp, u64 extra_lock_flags)
{
- struct obd_device *obddev = class_exp2obd(exp);
- struct ptlrpc_request *req = NULL;
- __u64 flags, saved_flags = extra_lock_flags;
- int rc;
- struct ldlm_res_id res_id;
static const ldlm_policy_data_t lookup_policy = {
.l_inodebits = { MDS_INODELOCK_LOOKUP }
};
@@ -798,9 +793,14 @@ int mdc_enqueue(struct obd_export *exp, struct ldlm_enqueue_info *einfo,
.l_inodebits = { MDS_INODELOCK_XATTR }
};
ldlm_policy_data_t const *policy = &lookup_policy;
- int generation, resends = 0;
- struct ldlm_reply *lockrep;
- enum lvb_type lvb_type = 0;
+ struct obd_device *obddev = class_exp2obd(exp);
+ struct ptlrpc_request *req;
+ u64 flags, saved_flags = extra_lock_flags;
+ struct ldlm_res_id res_id;
+ int generation, resends = 0;
+ struct ldlm_reply *lockrep;
+ enum lvb_type lvb_type = LVB_T_NONE;
+ int rc;
LASSERTF(!it || einfo->ei_type == LDLM_IBITS, "lock type %d\n",
einfo->ei_type);
--
1.9.3
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2 08/13] staging: lustre: fix multi line strings
2014-08-11 18:27 ` [PATCH v2 08/13] staging: lustre: fix multi line strings Srikrishan Malik
@ 2014-08-12 2:17 ` Drokin, Oleg
2014-08-12 17:42 ` Srikrishan Malik
2014-08-13 14:01 ` [PATCH v3 08/13]] " Srikrishan Malik
1 sibling, 1 reply; 16+ messages in thread
From: Drokin, Oleg @ 2014-08-12 2:17 UTC (permalink / raw)
To: Srikrishan Malik
Cc: <greg@kroah.com>,
Dilger, Andreas, <devel@driverdev.osuosl.org>,
<linux-kernel@vger.kernel.org>
On Aug 11, 2014, at 2:27 PM, Srikrishan Malik wrote:
> Fixes the following checkpatch warning:
>
> WARNING: quoted string split across lines
> diff --git a/drivers/staging/lustre/lustre/mdc/mdc_request.c b/drivers/staging/lustre/lustre/mdc/mdc_request.c
> index 57d903156917..6c691a4763b5 100644
> --- a/drivers/staging/lustre/lustre/mdc/mdc_request.c
> +++ b/drivers/staging/lustre/lustre/mdc/mdc_request.c
> @@ -2055,8 +2055,8 @@ static int mdc_hsm_copytool_send(int len, void *val)
> return -EPROTO;
> }
>
> - CDEBUG(D_HSM, " Received message mg=%x t=%d m=%d l=%d actions=%d "
> - "on %s\n",
> + CDEBUG(D_HSM,
> + " Received message mg=%x t=%d m=%d l=%d actions=%d on %s\n",
> lh->kuc_magic, lh->kuc_transport, lh->kuc_msgtype,
> lh->kuc_msglen, hal->hal_count, hal->hal_fsname);
I imagine we can drop the leading space here as well.
Thanks.
Bye,
Oleg
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2 08/13] staging: lustre: fix multi line strings
2014-08-12 2:17 ` Drokin, Oleg
@ 2014-08-12 17:42 ` Srikrishan Malik
0 siblings, 0 replies; 16+ messages in thread
From: Srikrishan Malik @ 2014-08-12 17:42 UTC (permalink / raw)
To: Drokin, Oleg
Cc: <greg@kroah.com>,
Dilger, Andreas, <devel@driverdev.osuosl.org>,
<linux-kernel@vger.kernel.org>
On Tue, Aug 12, 2014 at 02:17:07AM +0000, Drokin, Oleg wrote:
>
> On Aug 11, 2014, at 2:27 PM, Srikrishan Malik wrote:
>
> > Fixes the following checkpatch warning:
> >
> > WARNING: quoted string split across lines
>
> > diff --git a/drivers/staging/lustre/lustre/mdc/mdc_request.c b/drivers/staging/lustre/lustre/mdc/mdc_request.c
> > index 57d903156917..6c691a4763b5 100644
> > --- a/drivers/staging/lustre/lustre/mdc/mdc_request.c
> > +++ b/drivers/staging/lustre/lustre/mdc/mdc_request.c
> > @@ -2055,8 +2055,8 @@ static int mdc_hsm_copytool_send(int len, void *val)
> > return -EPROTO;
> > }
> >
> > - CDEBUG(D_HSM, " Received message mg=%x t=%d m=%d l=%d actions=%d "
> > - "on %s\n",
> > + CDEBUG(D_HSM,
> > + " Received message mg=%x t=%d m=%d l=%d actions=%d on %s\n",
> > lh->kuc_magic, lh->kuc_transport, lh->kuc_msgtype,
> > lh->kuc_msglen, hal->hal_count, hal->hal_fsname);
>
> I imagine we can drop the leading space here as well.
ok, I will resend this patch including the suggested change.
I was not sure if we can do this in single patch.
>
> Thanks.
>
> Bye,
> Oleg
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v3 08/13]] staging: lustre: fix multi line strings
2014-08-11 18:27 ` [PATCH v2 08/13] staging: lustre: fix multi line strings Srikrishan Malik
2014-08-12 2:17 ` Drokin, Oleg
@ 2014-08-13 14:01 ` Srikrishan Malik
1 sibling, 0 replies; 16+ messages in thread
From: Srikrishan Malik @ 2014-08-13 14:01 UTC (permalink / raw)
To: greg, andreas.dilger, oleg.drokin; +Cc: devel, linux-kernel, Srikrishan Malik
Fixes the following checkpatch warning:
WARNING: quoted string split across lines
Signed-off-by: Srikrishan Malik <srikrishanmalik@gmail.com>
---
Changes in v3: Removed leading space from debug message.
drivers/staging/lustre/lustre/mdc/mdc_locks.c | 9 +++----
drivers/staging/lustre/lustre/mdc/mdc_reint.c | 3 +--
drivers/staging/lustre/lustre/mdc/mdc_request.c | 36 ++++++++++++-------------
3 files changed, 23 insertions(+), 25 deletions(-)
diff --git a/drivers/staging/lustre/lustre/mdc/mdc_locks.c b/drivers/staging/lustre/lustre/mdc/mdc_locks.c
index 4d837d61be65..7f724e3c3f06 100644
--- a/drivers/staging/lustre/lustre/mdc/mdc_locks.c
+++ b/drivers/staging/lustre/lustre/mdc/mdc_locks.c
@@ -136,11 +136,10 @@ int mdc_set_lock_data(struct obd_export *exp, __u64 *lockh, void *data,
struct inode *old_inode = lock->l_resource->lr_lvb_inode;
LASSERTF(old_inode->i_state & I_FREEING,
- "Found existing inode %p/%lu/%u state %lu in lock: "
- "setting data to %p/%lu/%u\n", old_inode,
- old_inode->i_ino, old_inode->i_generation,
- old_inode->i_state,
- new_inode, new_inode->i_ino, new_inode->i_generation);
+ "Found existing inode %p/%lu/%u state %lu in lock: setting data to %p/%lu/%u\n",
+ old_inode, old_inode->i_ino, old_inode->i_generation,
+ old_inode->i_state, new_inode, new_inode->i_ino,
+ new_inode->i_generation);
}
lock->l_resource->lr_lvb_inode = new_inode;
if (bits)
diff --git a/drivers/staging/lustre/lustre/mdc/mdc_reint.c b/drivers/staging/lustre/lustre/mdc/mdc_reint.c
index b8c0f482b76f..46800335ca7d 100644
--- a/drivers/staging/lustre/lustre/mdc/mdc_reint.c
+++ b/drivers/staging/lustre/lustre/mdc/mdc_reint.c
@@ -158,8 +158,7 @@ int mdc_setattr(struct obd_export *exp, struct md_op_data *op_data,
*mod = obd_mod_alloc();
if (*mod == NULL) {
- DEBUG_REQ(D_ERROR, req, "Can't allocate "
- "md_open_data");
+ DEBUG_REQ(D_ERROR, req, "Can't allocate md_open_data");
} else {
req->rq_replay = 1;
req->rq_cb_data = *mod;
diff --git a/drivers/staging/lustre/lustre/mdc/mdc_request.c b/drivers/staging/lustre/lustre/mdc/mdc_request.c
index 57d903156917..1dfe90e7418f 100644
--- a/drivers/staging/lustre/lustre/mdc/mdc_request.c
+++ b/drivers/staging/lustre/lustre/mdc/mdc_request.c
@@ -517,14 +517,14 @@ int mdc_get_lustre_md(struct obd_export *exp, struct ptlrpc_request *req,
struct lov_mds_md *lmm;
if (!S_ISREG(md->body->mode)) {
- CDEBUG(D_INFO, "OBD_MD_FLEASIZE set, should be a "
- "regular file, but is not\n");
+ CDEBUG(D_INFO,
+ "OBD_MD_FLEASIZE set, should be a regular file, but is not\n");
GOTO(out, rc = -EPROTO);
}
if (md->body->eadatasize == 0) {
- CDEBUG(D_INFO, "OBD_MD_FLEASIZE set, "
- "but eadatasize 0\n");
+ CDEBUG(D_INFO,
+ "OBD_MD_FLEASIZE set, but eadatasize 0\n");
GOTO(out, rc = -EPROTO);
}
lmmsize = md->body->eadatasize;
@@ -537,8 +537,8 @@ int mdc_get_lustre_md(struct obd_export *exp, struct ptlrpc_request *req,
GOTO(out, rc);
if (rc < sizeof(*md->lsm)) {
- CDEBUG(D_INFO, "lsm size too small: "
- "rc < sizeof (*md->lsm) (%d < %d)\n",
+ CDEBUG(D_INFO,
+ "lsm size too small: rc < sizeof (*md->lsm) (%d < %d)\n",
rc, (int)sizeof(*md->lsm));
GOTO(out, rc = -EPROTO);
}
@@ -548,14 +548,14 @@ int mdc_get_lustre_md(struct obd_export *exp, struct ptlrpc_request *req,
struct lov_mds_md *lmv;
if (!S_ISDIR(md->body->mode)) {
- CDEBUG(D_INFO, "OBD_MD_FLDIREA set, should be a "
- "directory, but is not\n");
+ CDEBUG(D_INFO,
+ "OBD_MD_FLDIREA set, should be a directory, but is not\n");
GOTO(out, rc = -EPROTO);
}
if (md->body->eadatasize == 0) {
- CDEBUG(D_INFO, "OBD_MD_FLDIREA is set, "
- "but eadatasize 0\n");
+ CDEBUG(D_INFO,
+ "OBD_MD_FLDIREA is set, but eadatasize 0\n");
return -EPROTO;
}
if (md->body->valid & OBD_MD_MEA) {
@@ -571,8 +571,8 @@ int mdc_get_lustre_md(struct obd_export *exp, struct ptlrpc_request *req,
GOTO(out, rc);
if (rc < sizeof(*md->mea)) {
- CDEBUG(D_INFO, "size too small: "
- "rc < sizeof(*md->mea) (%d < %d)\n",
+ CDEBUG(D_INFO,
+ "size too small: rc < sizeof(*md->mea) (%d < %d)\n",
rc, (int)sizeof(*md->mea));
GOTO(out, rc = -EPROTO);
}
@@ -778,8 +778,8 @@ int mdc_set_open_replay_data(struct obd_export *exp,
rec->cr_old_handle.cookie = body->handle.cookie;
open_req->rq_replay_cb = mdc_replay_open;
if (!fid_is_sane(&body->fid1)) {
- DEBUG_REQ(D_ERROR, open_req, "Saving replay request with "
- "insane fid");
+ DEBUG_REQ(D_ERROR, open_req,
+ "Saving replay request with insane fid");
LBUG();
}
@@ -928,8 +928,8 @@ int mdc_close(struct obd_export *exp, struct md_op_data *op_data,
rc = lustre_msg_get_status(req->rq_repmsg);
if (lustre_msg_get_type(req->rq_repmsg) == PTL_RPC_MSG_ERR) {
- DEBUG_REQ(D_ERROR, req, "type == PTL_RPC_MSG_ERR, err "
- "= %d", rc);
+ DEBUG_REQ(D_ERROR, req,
+ "type == PTL_RPC_MSG_ERR, err = %d", rc);
if (rc > 0)
rc = -rc;
}
@@ -2055,8 +2055,8 @@ static int mdc_hsm_copytool_send(int len, void *val)
return -EPROTO;
}
- CDEBUG(D_HSM, " Received message mg=%x t=%d m=%d l=%d actions=%d "
- "on %s\n",
+ CDEBUG(D_HSM,
+ "Received message mg=%x t=%d m=%d l=%d actions=%d on %s\n",
lh->kuc_magic, lh->kuc_transport, lh->kuc_msgtype,
lh->kuc_msglen, hal->hal_count, hal->hal_fsname);
--
1.9.3
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2014-08-13 14:02 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-11 18:27 [PATCH v2 01/13] staging: lustre: remove space between function name and and open parenthesis Srikrishan Malik
2014-08-11 18:27 ` [PATCH v2 02/13] staging: lustre: remove spaces from start of line Srikrishan Malik
2014-08-11 18:27 ` [PATCH v2 03/13] staging: lustre: move open brace to next line after functions Srikrishan Malik
2014-08-11 18:27 ` [PATCH v2 04/13] staging: lustre: fix lines over 80 chars Srikrishan Malik
2014-08-11 18:27 ` [PATCH v2 05/13] staging: lustre: Add missing spaces around operators and braces Srikrishan Malik
2014-08-11 18:27 ` [PATCH v2 06/13] staging: lustre: replace c99 style comments with C89 Srikrishan Malik
2014-08-11 18:27 ` [PATCH v2 07/13] staging: lustre: add blank lines after declarations Srikrishan Malik
2014-08-11 18:27 ` [PATCH v2 08/13] staging: lustre: fix multi line strings Srikrishan Malik
2014-08-12 2:17 ` Drokin, Oleg
2014-08-12 17:42 ` Srikrishan Malik
2014-08-13 14:01 ` [PATCH v3 08/13]] " Srikrishan Malik
2014-08-11 18:27 ` [PATCH v2 09/13] staging: lustre: Added space between type name and * Srikrishan Malik
2014-08-11 18:27 ` [PATCH v2 10/13] staging: lustre: Fix misplaced opening brace warnings Srikrishan Malik
2014-08-11 18:27 ` [PATCH v2 11/13] staging: lustre: move else on the same line as closing brace Srikrishan Malik
2014-08-11 18:27 ` [PATCH v2 12/13] staging: lustre: remove parentheses usage with return Srikrishan Malik
2014-08-11 18:27 ` [PATCH v2 13/13] staging: lustre: Cleanup variable declarations in mdc_enqueue() Srikrishan Malik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®