Skip to contentSkip to conversation

staging: fbtft: Merged two identical conditionals into one.

PATCH In review Narcisa Ana Maria Vasile 2 participants 2 messages Feb 28, 2017

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

PATCH 1/1 staging: fbtft: Merged two identical conditionals into one.

Merged two if conditionals into a single one, since they had exactly the same condition.

---
 drivers/staging/fbtft/fbtft_device.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/staging/fbtft/fbtft_device.c +2 -3
index c164d0f..0d97473 100644
@@ -1448,11 +1448,10 @@ static int __init fbtft_device_init(void)
 	if (fbtft_device_param_gpios[0].name[0])
 		gpio = fbtft_device_param_gpios;
 
-	if (verbose > 2)
+	if (verbose > 2) {
 		pr_spi_devices(); /* print list of registered SPI devices */
-
-	if (verbose > 2)
 		pr_p_devices(); /* print list of 'fb' platform devices */
+	}
 
 	pr_debug("name='%s', busnum=%d, cs=%d\n", name, busnum, cs);
 
Signature · 1 line
1.9.1
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Narcisa Ana Maria Vasile

Merged two if conditionals into a single one, since they had exactly the same condition.

Quoted 32 lines
---
 drivers/staging/fbtft/fbtft_device.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/staging/fbtft/fbtft_device.c +2 -4
index c164d0f..0d97473 100644
@@ -1448,11 +1448,10 @@ static int __init fbtft_device_init(void)
 	if (fbtft_device_param_gpios[0].name[0])
 		gpio = fbtft_device_param_gpios;
 
-	if (verbose > 2)
+	if (verbose > 2) {
 		pr_spi_devices(); /* print list of registered SPI devices */
-
-	if (verbose > 2)
 		pr_p_devices(); /* print list of 'fb' platform devices */
+	}
 
 	pr_debug("name='%s', busnum=%d, cs=%d\n", name, busnum, cs);
 
--

1.9.1

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1488297006-9801-1-git-send-email-narcisaanamaria12%40gmail.com.
For more options, visit https://groups.google.com/d/optout.