public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Pushkar Jambhlekar <pushkar.iit@gmail.com>
To: Oleg Drokin <oleg.drokin@intel.com>,
	Andreas Dilger <andreas.dilger@intel.com>,
	James Simmons <jsimmons@infradead.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"John L. Hammond" <john.hammond@intel.com>,
	Al Viro <viro@zeniv.linux.org.uk>,
	Lai Siyao <lai.siyao@intel.com>,
	Pushkar Jambhlekar <pushkar.iit@gmail.com>,
	James Nunez <james.a.nunez@intel.com>,
	Andrew Perepechko <andrew.perepechko@seagate.com>,
	wang di <di.wang@intel.com>,
	Bob Glossman <bob.glossman@intel.com>,
	Andreas Gruenbacher <agruenba@redhat.com>,
	Jinshan Xiong <jinshan.xiong@intel.com>,
	Bobi Jam <bobijam@hotmail.com>,
	"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	Henri Doreau <henri.doreau@cea.fr>,
	Prakash Surya <surya1@llnl.gov>, Emoly Liu <emoly.liu@intel.com>,
	Dmitry Eremin <dmitry.eremin@intel.com>,
	Johann Lombardi <johann.lombardi@intel.com>
Cc: lustre-devel@lists.lustre.org, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH] drivers/staging: lustre: Avoiding multiple line dereference
Date: Tue,  4 Apr 2017 14:59:30 +0530	[thread overview]
Message-ID: <1491298170-29104-1-git-send-email-pushkar.iit@gmail.com> (raw)

Making references in single line

Signed-off-by: Pushkar Jambhlekar <pushkar.iit@gmail.com>
---
 drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 3 +--
 drivers/staging/lustre/lustre/llite/llite_lib.c   | 6 ++----
 drivers/staging/lustre/lustre/mgc/mgc_request.c   | 3 +--
 drivers/staging/lustre/lustre/ptlrpc/import.c     | 3 +--
 drivers/staging/lustre/lustre/ptlrpc/layout.c     | 3 +--
 5 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c
index 84eeaa5..3171d48 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c
@@ -936,8 +936,7 @@ static int ldlm_cli_cancel_req(struct obd_export *exp,
 		rc = ptlrpc_queue_wait(req);
 		if (rc == LUSTRE_ESTALE) {
 			CDEBUG(D_DLMTRACE, "client/server (nid %s) out of sync -- not fatal\n",
-			       libcfs_nid2str(req->rq_import->
-					      imp_connection->c_peer.nid));
+			       libcfs_nid2str(req->rq_import->imp_connection->c_peer.nid));
 			rc = 0;
 		} else if (rc == -ETIMEDOUT && /* check there was no reconnect*/
 			   req->rq_import_generation == imp->imp_generation) {
diff --git a/drivers/staging/lustre/lustre/llite/llite_lib.c b/drivers/staging/lustre/lustre/llite/llite_lib.c
index 7b80040..eb84dc5 100644
--- a/drivers/staging/lustre/lustre/llite/llite_lib.c
+++ b/drivers/staging/lustre/lustre/llite/llite_lib.c
@@ -106,10 +106,8 @@ static struct ll_sb_info *ll_init_sbi(struct super_block *sb)
 	sbi->ll_flags |= LL_SBI_LAZYSTATFS;
 
 	for (i = 0; i <= LL_PROCESS_HIST_MAX; i++) {
-		spin_lock_init(&sbi->ll_rw_extents_info.pp_extents[i].
-			       pp_r_hist.oh_lock);
-		spin_lock_init(&sbi->ll_rw_extents_info.pp_extents[i].
-			       pp_w_hist.oh_lock);
+		spin_lock_init(&sbi->ll_rw_extents_info.pp_extents[i].pp_r_hist.oh_lock);
+		spin_lock_init(&sbi->ll_rw_extents_info.pp_extents[i].pp_w_hist.oh_lock);
 	}
 
 	/* metadata statahead is enabled by default */
diff --git a/drivers/staging/lustre/lustre/mgc/mgc_request.c b/drivers/staging/lustre/lustre/mgc/mgc_request.c
index 6a76605..88294a4 100644
--- a/drivers/staging/lustre/lustre/mgc/mgc_request.c
+++ b/drivers/staging/lustre/lustre/mgc/mgc_request.c
@@ -1768,8 +1768,7 @@ static int mgc_process_config(struct obd_device *obd, u32 len, void *buf)
 
 		rc = mgc_process_log(obd, cld);
 		if (rc == 0 && cld->cld_recover) {
-			if (OCD_HAS_FLAG(&obd->u.cli.cl_import->
-					 imp_connect_data, IMP_RECOV)) {
+			if (OCD_HAS_FLAG(&obd->u.cli.cl_import->imp_connect_data, IMP_RECOV)) {
 				rc = mgc_process_log(obd, cld->cld_recover);
 			} else {
 				struct config_llog_data *cir;
diff --git a/drivers/staging/lustre/lustre/ptlrpc/import.c b/drivers/staging/lustre/lustre/ptlrpc/import.c
index 93e172f..452bb9e 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/import.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/import.c
@@ -359,8 +359,7 @@ void ptlrpc_invalidate_import(struct obd_import *imp)
 
 				CERROR("%s: Unregistering RPCs found (%d). Network is sluggish? Waiting them to error out.\n",
 				       cli_tgt,
-				       atomic_read(&imp->
-						   imp_unregistering));
+				       atomic_read(&imp->imp_unregistering));
 			}
 			spin_unlock(&imp->imp_lock);
 		}
diff --git a/drivers/staging/lustre/lustre/ptlrpc/layout.c b/drivers/staging/lustre/lustre/ptlrpc/layout.c
index 356d735..1e34b55 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/layout.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/layout.c
@@ -2102,8 +2102,7 @@ u32 req_capsule_fmt_size(__u32 magic, const struct req_format *fmt,
 
 	for (; i < fmt->rf_fields[loc].nr; ++i)
 		if (fmt->rf_fields[loc].d[i]->rmf_size != -1)
-			size += cfs_size_round(fmt->rf_fields[loc].d[i]->
-					       rmf_size);
+			size += cfs_size_round(fmt->rf_fields[loc].d[i]->rmf_size);
 	return size;
 }
 
-- 
2.7.4

             reply	other threads:[~2017-04-04  9:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-04  9:29 Pushkar Jambhlekar [this message]
2017-04-08 10:45 ` [PATCH] drivers/staging: lustre: Avoiding multiple line dereference Greg Kroah-Hartman

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=1491298170-29104-1-git-send-email-pushkar.iit@gmail.com \
    --to=pushkar.iit@gmail.com \
    --cc=agruenba@redhat.com \
    --cc=andreas.dilger@intel.com \
    --cc=andrew.perepechko@seagate.com \
    --cc=bob.glossman@intel.com \
    --cc=bobijam@hotmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=di.wang@intel.com \
    --cc=dmitry.eremin@intel.com \
    --cc=emoly.liu@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=henri.doreau@cea.fr \
    --cc=james.a.nunez@intel.com \
    --cc=jinshan.xiong@intel.com \
    --cc=johann.lombardi@intel.com \
    --cc=john.hammond@intel.com \
    --cc=jsimmons@infradead.org \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=lai.siyao@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lustre-devel@lists.lustre.org \
    --cc=oleg.drokin@intel.com \
    --cc=surya1@llnl.gov \
    --cc=viro@zeniv.linux.org.uk \
    /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