lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Tue,  4 Apr 2017 14:59:30 +0530
From:   Pushkar Jambhlekar <pushkar.iit@...il.com>
To:     Oleg Drokin <oleg.drokin@...el.com>,
        Andreas Dilger <andreas.dilger@...el.com>,
        James Simmons <jsimmons@...radead.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "John L. Hammond" <john.hammond@...el.com>,
        Al Viro <viro@...iv.linux.org.uk>,
        Lai Siyao <lai.siyao@...el.com>,
        Pushkar Jambhlekar <pushkar.iit@...il.com>,
        James Nunez <james.a.nunez@...el.com>,
        Andrew Perepechko <andrew.perepechko@...gate.com>,
        wang di <di.wang@...el.com>,
        Bob Glossman <bob.glossman@...el.com>,
        Andreas Gruenbacher <agruenba@...hat.com>,
        Jinshan Xiong <jinshan.xiong@...el.com>,
        Bobi Jam <bobijam@...mail.com>,
        "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
        Henri Doreau <henri.doreau@....fr>,
        Prakash Surya <surya1@...l.gov>,
        Emoly Liu <emoly.liu@...el.com>,
        Dmitry Eremin <dmitry.eremin@...el.com>,
        Johann Lombardi <johann.lombardi@...el.com>
Cc:     lustre-devel@...ts.lustre.org, devel@...verdev.osuosl.org,
        linux-kernel@...r.kernel.org
Subject: [PATCH] drivers/staging: lustre: Avoiding multiple line dereference

Making references in single line

Signed-off-by: Pushkar Jambhlekar <pushkar.iit@...il.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

Powered by blists - more mailing lists