mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/8] staging: pi433: collapse else block after return statement
@ 2017-12-13 14:21 Valentin Vidic
  2017-12-13 14:21 ` [PATCH 2/8] staging: pi433: move var declaration to function level Valentin Vidic
                   ` (6 more replies)
  0 siblings, 7 replies; 28+ messages in thread
From: Valentin Vidic @ 2017-12-13 14:21 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Simon Sandström, Marcin Ciupak, Marcus Wolf, devel,
	linux-kernel, Valentin Vidic

Fixes checkpatch warning:

  WARNING: else is not generally useful after a break or return

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
---
 drivers/staging/pi433/pi433_if.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c
index b4e6094ad553..02887988d2ea 100644
--- a/drivers/staging/pi433/pi433_if.c
+++ b/drivers/staging/pi433/pi433_if.c
@@ -773,11 +773,11 @@ pi433_read(struct file *filp, char __user *buf, size_t size, loff_t *f_pos)
 	if (device->rx_active) {
 		mutex_unlock(&device->rx_lock);
 		return -EAGAIN;
-	} else {
-		device->rx_active = true;
-		mutex_unlock(&device->rx_lock);
 	}
 
+	device->rx_active = true;
+	mutex_unlock(&device->rx_lock);
+
 	/* start receiving */
 	/* will block until something was received*/
 	device->rx_buffer_size = size;
@@ -1117,12 +1117,12 @@ static int pi433_probe(struct spi_device *spi)
 	if (retval) {
 		dev_dbg(&spi->dev, "configuration of SPI interface failed!\n");
 		return retval;
-	} else {
-		dev_dbg(&spi->dev,
-			"spi interface setup: mode 0x%2x, %d bits per word, %dhz max speed",
-			spi->mode, spi->bits_per_word, spi->max_speed_hz);
 	}
 
+	dev_dbg(&spi->dev,
+		"spi interface setup: mode 0x%2x, %d bits per word, %dhz max speed",
+		spi->mode, spi->bits_per_word, spi->max_speed_hz);
+
 	/* Ping the chip by reading the version register */
 	retval = spi_w8r8(spi, 0x10);
 	if (retval < 0)
-- 
2.15.0

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2017-12-19 14:12 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-13 14:21 [PATCH 1/8] staging: pi433: collapse else block after return statement Valentin Vidic
2017-12-13 14:21 ` [PATCH 2/8] staging: pi433: move var declaration to function level Valentin Vidic
2017-12-13 14:47   ` Dan Carpenter
2017-12-13 15:57     ` [PATCH 2/8 v2] " Valentin Vidic
2017-12-13 19:01   ` [PATCH 2/8] " Joe Perches
2017-12-13 19:46     ` [PATCH 2/8 v3] staging: pi433: cleanup local variable declaration Valentin Vidic
2017-12-13 14:21 ` [PATCH 3/8] staging: pi433: replace unsigned with unsigned int Valentin Vidic
2017-12-13 14:21 ` [PATCH 4/8] staging: pi433: add parentheses to mask and shift Valentin Vidic
2017-12-13 14:49   ` Dan Carpenter
2017-12-13 15:24   ` Marcus Wolf
2017-12-13 14:21 ` [PATCH 5/8] staging: pi433: fix DATAMODUL_MODULATION_TYPE_OOK value Valentin Vidic
2017-12-13 14:36   ` Dan Carpenter
2017-12-13 14:21 ` [PATCH 6/8] staging: pi433: use defines for shifting register values Valentin Vidic
2017-12-13 15:32   ` Marcus Wolf
2017-12-13 16:55     ` [PATCH 6/8 v2] " Valentin Vidic
2017-12-13 17:15       ` Marcus Wolf
2017-12-13 17:44         ` [PATCH 6/8 v3] " Valentin Vidic
2017-12-13 17:52           ` Marcus Wolf
2017-12-14 14:42           ` Dan Carpenter
2017-12-14 15:20             ` [PATCH 6/8 v4] staging: pi433: remove unused function Valentin Vidic
2017-12-14 16:08               ` rf69_get_lna_gain Marcus Wolf
2017-12-14 18:13                 ` rf69_get_lna_gain Simon Sandström
2017-12-19 14:12               ` [PATCH 6/8 v4] staging: pi433: remove unused function Greg Kroah-Hartman
2017-12-13 16:58     ` [PATCH 6/8] staging: pi433: use defines for shifting register values Valentin Vidic
2017-12-13 14:21 ` [PATCH 7/8] staging: pi433: avoid logging ENOMEM messages Valentin Vidic
2017-12-13 14:21 ` [PATCH 8/8] staging: pi433: replace printk calls with dev_dbg Valentin Vidic
2017-12-13 14:52   ` Dan Carpenter
2017-12-13 15:23     ` Valentin Vidic

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®