[PATCH 5/9] staging: ks7010: refactor, change retval to ret

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

 



Code can be refactored to take advantage of indentation removal in
previous commit. Code is still nested quite deeply. Variable name
retval takes up six characters, this is significant because 80
character line limit is being hit frequently.

Change variable name retval to ret to get an extra three characters to
fit on each line.

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

diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_sdio.c
index 06d1037..29d332d 100644
--- a/drivers/staging/ks7010/ks7010_sdio.c
+++ b/drivers/staging/ks7010/ks7010_sdio.c
@@ -171,7 +171,7 @@ void ks_wlan_hw_wakeup_request(struct ks_wlan_private *priv)
 static int _ks_wlan_hw_power_save(struct ks_wlan_private *priv)
 {
 	unsigned char rw_data;
-	int retval;
+	int ret;
 
 	if (priv->reg.powermgt == POWMGT_ACTIVE_MODE)
 		return 0;
@@ -196,11 +196,11 @@ static int _ks_wlan_hw_power_save(struct ks_wlan_private *priv)
 		if (!atomic_read(&priv->psstatus.confirm_wait)
 			&& !atomic_read(&priv->psstatus.snooze_guard)
 			&& !cnt_txqbody(priv)) {
-			retval =
+			ret =
 				ks7010_sdio_read(priv, INT_PENDING,
 						&rw_data,
 						sizeof(rw_data));
-			if (retval) {
+			if (ret) {
 				DPRINTK(1,
 					" error : INT_PENDING=%02X\n",
 					rw_data);
@@ -210,12 +210,12 @@ static int _ks_wlan_hw_power_save(struct ks_wlan_private *priv)
 			}
 			if (!rw_data) {
 				rw_data = GCR_B_DOZE;
-				retval =
+				ret =
 					ks7010_sdio_write(priv,
 							GCR_B,
 							&rw_data,
 							sizeof(rw_data));
-				if (retval) {
+				if (ret) {
 					DPRINTK(1,
 						" error : GCR_B=%02X\n",
 						rw_data);
-- 
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