[PATCH v3 3/7] staging: ks7010: fix line continuations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Checkpatch emits CHECK: Logical continuations should be on the
previous line. Also the same code section causes checkpatch to emit
WARNING: Avoid multiple line dereference.

Move logical line continuations onto the previous line. Move multiple
line dereferences onto single line.

Make these two changes in a single patch to give review a chance
to critique the final layout of the *complex* logical statement.

Signed-off-by: Tobin C. Harding <me@xxxxxxxx>
---

Documentation/process/coding-style.rst states that spaces never be
used for indentation. This patch violates that. Current Emacs settings
(setup using configuration tips from coding-style.rst) does not do a
good job either. I would like to learn the best practice for these
situations.

 drivers/staging/ks7010/ks_hostif.c | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c
index 54ff06d..461482b 100644
--- a/drivers/staging/ks7010/ks_hostif.c
+++ b/drivers/staging/ks7010/ks_hostif.c
@@ -332,16 +332,13 @@ int hostif_data_indication_wpa(struct ks_wlan_private *priv,
 		priv->nstats.rx_errors++;
 		return -EINVAL;
 	}
-	if (((auth_type == TYPE_PMK1
-				&& priv->wpa.pairwise_suite ==
-				IW_AUTH_CIPHER_TKIP) || (auth_type == TYPE_GMK1
-							&& priv->wpa.
-							group_suite ==
-							IW_AUTH_CIPHER_TKIP)
-			|| (auth_type == TYPE_GMK2
-				&& priv->wpa.group_suite ==
-				IW_AUTH_CIPHER_TKIP))
-		&& priv->wpa.key[auth_type - 1].key_len) {
+	if (((auth_type == TYPE_PMK1 &&
+	      priv->wpa.pairwise_suite == IW_AUTH_CIPHER_TKIP) ||
+	     (auth_type == TYPE_GMK1 &&
+	      priv->wpa.group_suite == IW_AUTH_CIPHER_TKIP) ||
+	     (auth_type == TYPE_GMK2 &&
+	      priv->wpa.group_suite == IW_AUTH_CIPHER_TKIP)) &&
+	    priv->wpa.key[auth_type - 1].key_len) {
 		DPRINTK(4, "TKIP: protocol=%04X: size=%u\n",
 			eth_proto, priv->rx_size);
 		/* MIC save */
-- 
2.7.4

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux