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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1491200110-17727-1-git-send-email-prasant.jalan@gmail.com>
Date:   Mon,  3 Apr 2017 11:45:10 +0530
From:   Prasant Jalan <prasant.jalan@...il.com>
To:     Larry.Finger@...inger.net
Cc:     florian.c.schilhabel@...glemail.com,
        vijaikumar.kanagarajan@...il.com, gregkh@...uxfoundation.org,
        jrdr.linux@...il.com, geliangtang@....com,
        raphael.beamonte@...il.com, devel@...verdev.osuosl.org,
        linux-kernel@...r.kernel.org,
        Prasant Jalan <prasant.jalan@...il.com>
Subject: [PATCH v2] staging: rtl8712: fixed multiple line derefence issue

Checkpatch emits WARNING: Avoid multiple line dereference.

Checkpatch warning is fixed by:
* Trivial indentation improvement and
* Using += instead of + helps shortening the statement.

Signed-off-by: Prasant Jalan <prasant.jalan@...il.com>
---

  v2:
    * Used += instead of + (pointed out by Joe Perches)
    * Rebased to the latest next tree

 drivers/staging/rtl8712/rtl871x_xmit.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8712/rtl871x_xmit.c b/drivers/staging/rtl8712/rtl871x_xmit.c
index de88819..eda2aee 100644
--- a/drivers/staging/rtl8712/rtl871x_xmit.c
+++ b/drivers/staging/rtl8712/rtl871x_xmit.c
@@ -213,8 +213,9 @@ sint r8712_update_attrib(struct _adapter *padapter, _pkt *pkt,
 		if (padapter->pwrctrlpriv.pwr_mode !=
 		    padapter->registrypriv.power_mgnt) {
 			del_timer_sync(&pmlmepriv->dhcp_timer);
-			r8712_set_ps_mode(padapter, padapter->registrypriv.
-				power_mgnt, padapter->registrypriv.smart_ps);
+			r8712_set_ps_mode(padapter,
+					  padapter->registrypriv.power_mgnt,
+					  padapter->registrypriv.smart_ps);
 		}
 	}
 }
@@ -416,15 +417,13 @@ static sint xmitframe_addmic(struct _adapter *padapter,
 							   &pframe[10], 6);
 			}
 			if (pqospriv->qos_option == 1)
-					priority[0] = (u8)pxmitframe->
-						      attrib.priority;
+				priority[0] = (u8)pxmitframe->attrib.priority;
 			r8712_secmicappend(&micdata, &priority[0], 4);
 			payload = pframe;
 			for (curfragnum = 0; curfragnum < pattrib->nr_frags;
 			     curfragnum++) {
 				payload = (u8 *)RND4((addr_t)(payload));
-				payload = payload + pattrib->
-					  hdrlen + pattrib->iv_len;
+				payload += pattrib->hdrlen + pattrib->iv_len;
 				if ((curfragnum + 1) == pattrib->nr_frags) {
 					length = pattrib->last_txcmdsz -
 						  pattrib->hdrlen -
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ