Re: [PATCH v5 1/2] wilc1000: Add reset/enable GPIO support to SPI driver

2 messages, 2 authors, 2021-12-16 · open the first message on its own page

Re: [PATCH v5 1/2] wilc1000: Add reset/enable GPIO support to SPI driver

From: Kalle Valo <kvalo@kernel.org>
Date: 2021-12-16 08:10:57

David Mosberger-Tang [off-list ref] writes:
quoted
quoted
+       } else {
+               gpiod_set_value(gpios->reset, 1);       /* assert RESET */
+               gpiod_set_value(gpios->enable, 0);      /* deassert ENABLE */
I don't usually see comments near the code line in kernel. Maybe move them
before the actual code line or remove them at all as the code is impler enough?
You're kidding, right?
I agree with Claudiu, the comments are not really providing more
information from what can be seen from the code. And the style of having
the comment in the same line is not commonly used in upstream.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

Re: [PATCH v5 1/2] wilc1000: Add reset/enable GPIO support to SPI driver

From: David Mosberger-Tang <hidden>
Date: 2021-12-16 15:26:29

On Thu, 2021-12-16 at 10:10 +0200, Kalle Valo wrote:
David Mosberger-Tang [off-list ref] writes:
quoted
quoted
quoted
+       } else {
+               gpiod_set_value(gpios->reset, 1);       /* assert RESET */
+               gpiod_set_value(gpios->enable, 0);      /* deassert ENABLE */
I don't usually see comments near the code line in kernel. Maybe move them
before the actual code line or remove them at all as the code is impler enough?
You're kidding, right?
I agree with Claudiu, the comments are not really providing more
information from what can be seen from the code. And the style of having
the comment in the same line is not commonly used in upstream.
The code is obvious if you think of 1 as "assert" and 0 as "deassert".  It looks
utterly wrong if you think of 1 as outputting 3.3V and 0 as outputting 0V.

But if you insist, I'll remove the comments.

  --david

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help