From: Srikrishan Malik <srikrishanmalik@gmail.com>
To: greg@kroah.com, andreas.dilger@intel.com, oleg.drokin@intel.com
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
Srikrishan Malik <srikrishanmalik@gmail.com>
Subject: [PATCH v2 13/13] staging: lustre: Cleanup variable declarations in mdc_enqueue()
Date: Mon, 11 Aug 2014 23:57:39 +0530 [thread overview]
Message-ID: <1407781659-728-13-git-send-email-srikrishanmalik@gmail.com> (raw)
In-Reply-To: <1407781659-728-1-git-send-email-srikrishanmalik@gmail.com>
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
prev parent reply other threads:[~2014-08-11 18:29 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Srikrishan Malik [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1407781659-728-13-git-send-email-srikrishanmalik@gmail.com \
--to=srikrishanmalik@gmail.com \
--cc=andreas.dilger@intel.com \
--cc=devel@driverdev.osuosl.org \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg.drokin@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®