[PATCH 9/9] staging: ks7010: Fix checkpatch whitespace checks

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

 



Checkpatch emits two CHECK messages;
CHECK: Logical continuations should be on the previous line
CHECK: Alignment should match open parenthesis

Move logical continuations onto the previous line. Add whitespace to
align code with parenthesis.

Signed-off-by: Tobin C. Harding <me@xxxxxxxx>
---
 drivers/staging/ks7010/ks7010_sdio.c | 33 +++++++++++++++++----------------
 1 file changed, 17 insertions(+), 16 deletions(-)

diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_sdio.c
index 3119ee2..a1e863f 100644
--- a/drivers/staging/ks7010/ks7010_sdio.c
+++ b/drivers/staging/ks7010/ks7010_sdio.c
@@ -193,15 +193,15 @@ static int _ks_wlan_hw_power_save(struct ks_wlan_private *priv)
 			atomic_read(&priv->psstatus.snooze_guard),
 			cnt_txqbody(priv));
 
-		if (!atomic_read(&priv->psstatus.confirm_wait)
-			&& !atomic_read(&priv->psstatus.snooze_guard)
-			&& !cnt_txqbody(priv)) {
+		if (!atomic_read(&priv->psstatus.confirm_wait) &&
+		    !atomic_read(&priv->psstatus.snooze_guard) &&
+		    !cnt_txqbody(priv)) {
 			ret = ks7010_sdio_read(priv, INT_PENDING, &rw_data,
 					       sizeof(rw_data));
 			if (ret) {
 				DPRINTK(1, " error : INT_PENDING=%02X\n", rw_data);
 				queue_delayed_work(priv->ks_wlan_hw.ks7010sdio_wq,
-						&priv->ks_wlan_hw.rw_wq, 1);
+						   &priv->ks_wlan_hw.rw_wq, 1);
 				break;
 			}
 			if (!rw_data) {
@@ -219,12 +219,12 @@ static int _ks_wlan_hw_power_save(struct ks_wlan_private *priv)
 				DPRINTK(3, "psstatus.status=PS_SNOOZE\n");
 			} else {
 				queue_delayed_work(priv->ks_wlan_hw.ks7010sdio_wq,
-						&priv->ks_wlan_hw.rw_wq, 1);
+						   &priv->ks_wlan_hw.rw_wq, 1);
 			}
 		} else {
 			queue_delayed_work(priv->ks_wlan_hw.ks7010sdio_wq,
-					&priv->ks_wlan_hw.rw_wq,
-					0);
+					   &priv->ks_wlan_hw.rw_wq,
+					   0);
 		}
 		break;
 	}
@@ -312,8 +312,8 @@ static void tx_device_task(void *dev)
 	int rc = 0;
 
 	DPRINTK(4, "\n");
-	if (cnt_txqbody(priv) > 0
-	    && atomic_read(&priv->psstatus.status) != PS_SNOOZE) {
+	if (cnt_txqbody(priv) > 0 &&
+	    atomic_read(&priv->psstatus.status) != PS_SNOOZE) {
 		sp = &priv->tx_dev.tx_dev_buff[priv->tx_dev.qhead];
 		if (priv->dev_state >= DEVICE_STATE_BOOT) {
 			rc = write_to_device(priv, sp->sendp, sp->size);
@@ -559,9 +559,11 @@ static void ks_sdio_interrupt(struct sdio_func *func)
 	/* read (General Communication B register) */
 	/* bit5 -> Write Status Idle */
 	/* bit2 -> Read Status Busy  */
-	if (status & INT_GCR_B
-		|| atomic_read(&priv->psstatus.status) == PS_SNOOZE) {
-		retval = ks7010_sdio_read(priv, GCR_B, &rw_data, sizeof(rw_data));
+	if (status & INT_GCR_B ||
+	    atomic_read(&priv->psstatus.status) == PS_SNOOZE) {
+		retval = ks7010_sdio_read(priv, GCR_B, &rw_data,
+					  sizeof(rw_data));
+
 		if (retval) {
 			DPRINTK(1, " error : GCR_B=%02X\n", rw_data);
 			goto intr_out;
@@ -579,7 +581,7 @@ static void ks_sdio_interrupt(struct sdio_func *func)
 	do {
 		/* read (WriteStatus/ReadDataSize FN1:00_0014) */
 		retval = ks7010_sdio_read(priv, WSTATUS_RSIZE, &rw_data,
-					sizeof(rw_data));
+					  sizeof(rw_data));
 		if (retval) {
 			DPRINTK(1, " error : WSTATUS_RSIZE=%02X\n", rw_data);
 			goto intr_out;
@@ -595,8 +597,8 @@ static void ks_sdio_interrupt(struct sdio_func *func)
 				/* dummy write for interrupt clear */
 				rw_data = 0;
 				retval = ks7010_sdio_write(priv, DATA_WINDOW,
-							&rw_data,
-							sizeof(rw_data));
+							   &rw_data,
+							   sizeof(rw_data));
 				if (retval) {
 					DPRINTK(1,
 						"write DATA_WINDOW Failed!!(%d)\n",
@@ -855,7 +857,6 @@ static void ks7010_card_init(struct ks_wlan_private *priv)
 	if (priv->mac_address_valid && priv->version_size)
 		priv->dev_state = DEVICE_STATE_PREINIT;
 
-
 	hostif_sme_enqueue(priv, SME_GET_EEPROM_CKSUM);
 
 	/* load initial wireless parameter */
-- 
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