Skip to contentSkip to conversation

cmd: led.c: fix coding style

PATCH New Akee Huang 2 participants 2 messages Aug 12, 2018 – Aug 13, 2018

lore
Share & tools
lore

Akee Huang

author
#0 lore raw

PATCH 1/1 cmd: led.c: fix coding style

Fix coding style according to checkpatch.pl

---
 cmd/led.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
cmd/led.c +6 -6
index fc07ca95a3..b339c98dfb 100644
@@ -133,10 +133,10 @@ int do_led(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 #define BLINK ""
 #endif
 
-U_BOOT_CMD(
-	led, 4, 1, do_led,
-	"manage LEDs",
-	"<led_label> on|off|toggle" BLINK "\tChange LED state\n"
-	"led [<led_label>\tGet LED state\n"
-	"led list\t\tshow a list of LEDs"
+U_BOOT_CMD(led,
+	   4, 1, do_led,
+	   "manage LEDs",
+	   "<led_label> on|off|toggle" BLINK "\tChange LED state\n"
+	   "led [<led_label>\tGet LED state\n"
+	   "led list\t\tshow a list of LEDs"
 );
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/1 cmd: led.c: fix coding style

Quoted 18 lines · Akee Huang

Fix coding style according to checkpatch.pl

---
 cmd/led.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
cmd/led.c +0 -3
index fc07ca95a3..b339c98dfb 100644
@@ -133,10 +133,10 @@ int do_led(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 #define BLINK ""
 #endif
 
-U_BOOT_CMD(
-	led, 4, 1, do_led,
-	"manage LEDs",

cmd/led.c int do_led(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) · line 142

Quoted 10 lines
cmd/led.c +6 -3
-	"<led_label> on|off|toggle" BLINK "\tChange LED state\n"
-	"led [<led_label>\tGet LED state\n"
-	"led list\t\tshow a list of LEDs"
+U_BOOT_CMD(led,
+	   4, 1, do_led,
+	   "manage LEDs",
+	   "<led_label> on|off|toggle" BLINK "\tChange LED state\n"
+	   "led [<led_label>\tGet LED state\n"
+	   "led list\t\tshow a list of LEDs"
 );

This is indeed a style violation. However, a quick 'git grep' shows that we really don't have consistency here. And to the extent that we do it's following the style that checkpatch.pl doesn't like and we're doing in cmd/led.c. So, in the absence of a Coccinelle (or simlar) script and proposal to get everything consistent, I don't think this patch by itself is a good idea to apply, sorry.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180813/e1b6988e/attachment.sig>