Thread (44 messages) 44 messages, 4 authors, 2021-03-09

Re: [PATCH v4 05/15] pinctrl: add a pincontrol driver for BCM6328

From: Andy Shevchenko <hidden>
Date: 2021-03-04 12:14:10
Also in: linux-arm-kernel, linux-gpio, lkml

On Thu, Mar 4, 2021 at 1:13 PM Álvaro Fernández Rojas [off-list ref] wrote:
quoted
El 4 mar 2021, a las 11:49, Andy Shevchenko [off-list ref] escribió:
On Thu, Mar 4, 2021 at 10:57 AM Álvaro Fernández Rojas
[off-list ref] wrote:
...
quoted
quoted
+       static const unsigned int bcm6328_mux[] = {
+               BCM6328_MUX_LO_REG,
+               BCM6328_MUX_HI_REG,
quoted
+               BCM6328_MUX_OTHER_REG
When it's not terminator add a comma, otherwise remove a comma.
… so you want me to add a comma or not?
Hmm... you tell me! If this is a list which covers all possible cases
_and_ the last one is the kinda maximum value (aka terminator), then
comma is not needed, otherwise add it (to me feels like the latter
should be done here).
quoted
Also, why is it inside a function? It's anyway global and constant.
Because this is only used by this function and I’m used to doing this to comply with MISRA C 2004 at work :)
It makes code a bit harder to read.
quoted
quoted
+       };
-- 
With Best Regards,
Andy Shevchenko
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help