Skip to contentSkip to conversation

staging: iio: accel: remove unnecessary syntax

PATCH In review Chris Ruffin 3 participants 3 messages Sep 14, 2014 – Sep 21, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: iio: accel: remove unnecessary syntax

The else clause in the conditional of lis3l02dq_data_rdy_trig_poll() does not make consistent use of braces with the rest of the conditional. Fix this coding style problem by removing the unnecessary conditional altogether.

---
 drivers/staging/iio/accel/lis3l02dq_ring.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/staging/iio/accel/lis3l02dq_ring.c +3 -2
index 1d934ee..9efc77b 100644
@@ -34,8 +34,9 @@ irqreturn_t lis3l02dq_data_rdy_trig_poll(int irq, void *private)
 	if (st->trigger_on) {
 		iio_trigger_poll(st->trig);
 		return IRQ_HANDLED;
-	} else
-		return IRQ_WAKE_THREAD;
+	}
+
+	return IRQ_WAKE_THREAD;
 }
 
 static const u8 read_all_tx_array[] = {
Signature · 1 line
1.7.10.4
Acked-by on v1 1/1
#1 lore raw

Chris Ruffin schrieb, Am 15.09.2014 01:38:

Quoted 6 lines

The else clause in the conditional of lis3l02dq_data_rdy_trig_poll() does not make consistent use of braces with the rest of the conditional. Fix this coding style problem by removing the unnecessary conditional altogether.

Quoted 21 lines
---
 drivers/staging/iio/accel/lis3l02dq_ring.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/staging/iio/accel/lis3l02dq_ring.c +3 -2
index 1d934ee..9efc77b 100644
@@ -34,8 +34,9 @@ irqreturn_t lis3l02dq_data_rdy_trig_poll(int irq, void *private)
 	if (st->trigger_on) {
 		iio_trigger_poll(st->trig);
 		return IRQ_HANDLED;
-	} else
-		return IRQ_WAKE_THREAD;
+	}
+
+	return IRQ_WAKE_THREAD;
 }
 
 static const u8 read_all_tx_array[] = {
maintainer
#2 lore raw
Quoted 8 lines · Hartmut Knaack

Chris Ruffin schrieb, Am 15.09.2014 01:38:

Quoted 6 lines

The else clause in the conditional of lis3l02dq_data_rdy_trig_poll() does not make consistent use of braces with the rest of the conditional. Fix this coding style problem by removing the unnecessary conditional altogether.

Applied to the togreg branch of iio.git - initially pushed out as testing for the autobuilders to play.

Thanks,

Jonathan

Quoted 27 lines
Quoted 11 lines
---
 drivers/staging/iio/accel/lis3l02dq_ring.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/staging/iio/accel/lis3l02dq_ring.c +0 -0
index 1d934ee..9efc77b 100644
@@ -34,8 +34,9 @@ irqreturn_t lis3l02dq_data_rdy_trig_poll(int irq, void *private)
 	if (st->trigger_on) {

drivers/staging/iio/accel/lis3l02dq_ring.c irqreturn_t lis3l02dq_data_rdy_trig_poll(int irq, void *private) · line 42

Quoted 10 lines
drivers/staging/iio/accel/lis3l02dq_ring.c +3 -2
 		iio_trigger_poll(st->trig);
 		return IRQ_HANDLED;
-	} else
-		return IRQ_WAKE_THREAD;
+	}
+
+	return IRQ_WAKE_THREAD;
 }
 
 static const u8 read_all_tx_array[] = {

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html