All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: wilc1000: rearrange line exceeding 80 characters
@ 2020-03-16 15:10 Gokce Kuler
  2020-03-17 13:00 ` [Outreachy kernel] " Stefano Brivio
  0 siblings, 1 reply; 2+ messages in thread
From: Gokce Kuler @ 2020-03-16 15:10 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: gregkh

Moved to the bottom line after && operator for it exceeds 80 character

Signed-off-by: Gokce Kuler <gokcekuler@gmail.com>
---
 drivers/staging/wilc1000/netdev.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/wilc1000/netdev.c b/drivers/staging/wilc1000/netdev.c
index a61c1a7..f94a17b 100644
--- a/drivers/staging/wilc1000/netdev.c
+++ b/drivers/staging/wilc1000/netdev.c
@@ -794,8 +794,10 @@ void wilc_wfi_mgmt_rx(struct wilc *wilc, u8 *buff, u32 size)
 		u16 type = le16_to_cpup((__le16 *)buff);
 
 		if (vif->priv.p2p_listen_state &&
-		    ((type == vif->frame_reg[0].type && vif->frame_reg[0].reg) ||
-		     (type == vif->frame_reg[1].type && vif->frame_reg[1].reg)))
+		    ((type == vif->frame_reg[0].type &&
+		      vif->frame_reg[0].reg) ||
+		     (type == vif->frame_reg[1].type &&
+		      vif->frame_reg[1].reg)))
 			wilc_wfi_p2p_rx(vif, buff, size);
 
 		if (vif->monitor_flag)
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Outreachy kernel] [PATCH] staging: wilc1000: rearrange line exceeding 80 characters
  2020-03-16 15:10 [PATCH] staging: wilc1000: rearrange line exceeding 80 characters Gokce Kuler
@ 2020-03-17 13:00 ` Stefano Brivio
  0 siblings, 0 replies; 2+ messages in thread
From: Stefano Brivio @ 2020-03-17 13:00 UTC (permalink / raw)
  To: Gokce Kuler; +Cc: outreachy-kernel, gregkh

On Mon, 16 Mar 2020 18:10:09 +0300
Gokce Kuler <gokcekuler@gmail.com> wrote:

> Moved to the bottom line after && operator for it exceeds 80 character
> 
> Signed-off-by: Gokce Kuler <gokcekuler@gmail.com>
> ---
>  drivers/staging/wilc1000/netdev.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/wilc1000/netdev.c b/drivers/staging/wilc1000/netdev.c
> index a61c1a7..f94a17b 100644
> --- a/drivers/staging/wilc1000/netdev.c
> +++ b/drivers/staging/wilc1000/netdev.c
> @@ -794,8 +794,10 @@ void wilc_wfi_mgmt_rx(struct wilc *wilc, u8 *buff, u32 size)
>  		u16 type = le16_to_cpup((__le16 *)buff);
>  
>  		if (vif->priv.p2p_listen_state &&
> -		    ((type == vif->frame_reg[0].type && vif->frame_reg[0].reg) ||
> -		     (type == vif->frame_reg[1].type && vif->frame_reg[1].reg)))
> +		    ((type == vif->frame_reg[0].type &&
> +		      vif->frame_reg[0].reg) ||
> +		     (type == vif->frame_reg[1].type &&
> +		      vif->frame_reg[1].reg)))
>  			wilc_wfi_p2p_rx(vif, buff, size);

Strictly speaking, your change is correct and this way the code
complies to the coding style.

Still, I tried to read the "fixed" version first, and it took me a
while to "vertically" track all those parentheses. Can you find a
better way to fix this?

-- 
Stefano



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-03-17 13:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-16 15:10 [PATCH] staging: wilc1000: rearrange line exceeding 80 characters Gokce Kuler
2020-03-17 13:00 ` [Outreachy kernel] " Stefano Brivio

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.