Skip to contentSkip to conversation

Braces added to the if

PATCH In review Javad Rahimi 2 participants 2 messages Dec 7, 2021 – Dec 8, 2021 Arm/Allwinner sunXi SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Braces added to the if

---

 board/sunxi/board.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
board/sunxi/board.c +2 -1
index ff80283702..62d32b6329 100644
@@ -1017,9 +1017,10 @@ void __led_init (led_id_t mask, int state)
 
 	ret = gpio_lookup_name(CUBIE2_LED_BOOT_GPIO, NULL, NULL, &gpio_boot_led);
 
-	if (ret)
+	if (ret) {
 		debug("[gpio_lookup_name]LED Err: %d", ret);
 		return;
+	}
 
 	gpio_request(gpio_boot_led, "boot_led");
 	gpio_direction_output(gpio_boot_led, 1);
Signature · 1 line
2.25.1
#1 lore raw

Hello Javad,

Am Tue, Dec 07, 2021 at 10:42:15AM +0330 schrieb Javad Rahimi:

Quoted 11 lines

---

 board/sunxi/board.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
board/sunxi/board.c +0 -0
index ff80283702..62d32b6329 100644

board/sunxi/board.c void __led_init (led_id_t mask, int state) · line 1023

Quoted 8 lines
board/sunxi/board.c +2 -1
@@ -1017,9 +1017,10 @@ void __led_init (led_id_t mask, int state)
 
 	ret = gpio_lookup_name(CUBIE2_LED_BOOT_GPIO, NULL, NULL, &gpio_boot_led);
 
-	if (ret)
+	if (ret) {
 		debug("[gpio_lookup_name]LED Err: %d", ret);
 		return;
+	}

Please squash this to the other patch and resend a v2.

If this would be a style change to existing code, it would still need a better commit message, but it seems to be a fix for the patch you send earlier. Please use ./scripts/checkpatch.pl before sending. ;-)

Greets
Alex

Quoted 6 lines
board/sunxi/board.c +0 -0
 	gpio_request(gpio_boot_led, "boot_led");
 	gpio_direction_output(gpio_boot_led, 1);
Signature · 1 line
2.25.1