Thread (26 messages) 26 messages, 6 authors, 2020-09-15

Re: [PATCH v3 1/2] leds: mt6360: Add LED driver for MT6360

From: Andy Shevchenko <hidden>
Date: 2020-09-10 11:52:28
Also in: linux-devicetree, linux-leds, linux-mediatek, lkml

On Thu, Sep 10, 2020 at 11:18 AM Pavel Machek [off-list ref] wrote:

...
quoted
quoted
quoted
+enum {
+       MT6360_LED_ISNK1 = 0,
+       MT6360_LED_ISNK2,
+       MT6360_LED_ISNK3,
+       MT6360_LED_ISNK4,
+       MT6360_LED_FLASH1,
+       MT6360_LED_FLASH2,
quoted
+       MT6360_MAX_LEDS,
No comma for terminator entry.
ACK
Actually, that comma is fine. Its absence would be fine, too.
It is slightly better not to have to prevent (theoretical) rebase or
other similar issues when a new item can go behind the terminator. In
such a case compiler can easily tell you if something is wrong.
quoted
quoted
quoted
+};
...
quoted
quoted
quoted
+static const struct of_device_id __maybe_unused mt6360_led_of_id[] = {
+       { .compatible = "mediatek,mt6360-led", },
quoted
+       {},
No need comma.
ACK
It is also no hurting comma.
Same explanation. It doesn't hurt per se, but its absence might serve a purpose.

-- 
With Best Regards,
Andy Shevchenko

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help