* [PATCH] wilc1000 : rearrange line exceeding 80 characters
@ 2020-03-10 9:28 Deepak R Varma
2020-03-10 9:46 ` Greg KH
0 siblings, 1 reply; 4+ messages in thread
From: Deepak R Varma @ 2020-03-10 9:28 UTC (permalink / raw)
To: outreachy-kernel; +Cc: adham.abozaeid, ajay.kathat, gregkh, daniel.baluta
A long if condition exceeding 80 characters that makes evaluation
appear confusing. Rearranging the condition makes it easier to understand.
Signed-off-by: Deepak R Varma <mh12gx2825@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 045f5cdfdca0..d7a632c92a76 100644
--- a/drivers/staging/wilc1000/netdev.c
+++ b/drivers/staging/wilc1000/netdev.c
@@ -802,8 +802,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.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] wilc1000 : rearrange line exceeding 80 characters
2020-03-10 9:28 [PATCH] wilc1000 : rearrange line exceeding 80 characters Deepak R Varma
@ 2020-03-10 9:46 ` Greg KH
2020-03-10 11:04 ` Deepak Varma
0 siblings, 1 reply; 4+ messages in thread
From: Greg KH @ 2020-03-10 9:46 UTC (permalink / raw)
To: Deepak R Varma
Cc: outreachy-kernel, adham.abozaeid, ajay.kathat, daniel.baluta
On Tue, Mar 10, 2020 at 02:58:24PM +0530, Deepak R Varma wrote:
> A long if condition exceeding 80 characters that makes evaluation
> appear confusing. Rearranging the condition makes it easier to understand.
>
> Signed-off-by: Deepak R Varma <mh12gx2825@gmail.com>
> ---
> drivers/staging/wilc1000/netdev.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
You forgot "staging:" in your subject line.
>
> diff --git a/drivers/staging/wilc1000/netdev.c b/drivers/staging/wilc1000/netdev.c
> index 045f5cdfdca0..d7a632c92a76 100644
> --- a/drivers/staging/wilc1000/netdev.c
> +++ b/drivers/staging/wilc1000/netdev.c
> @@ -802,8 +802,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)))
The original code is really easier to follow than your change, so I
would just leave it as-is please.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] wilc1000 : rearrange line exceeding 80 characters
2020-03-10 9:46 ` Greg KH
@ 2020-03-10 11:04 ` Deepak Varma
2020-03-10 11:38 ` [Outreachy kernel] " Vaishali Thakkar
0 siblings, 1 reply; 4+ messages in thread
From: Deepak Varma @ 2020-03-10 11:04 UTC (permalink / raw)
To: outreachy-kernel
[-- Attachment #1.1: Type: text/plain, Size: 1582 bytes --]
Thank you Greg. What you commented makes sense.
Deepak.
On Tuesday, 10 March 2020 15:16:35 UTC+5:30, gregkh wrote:
>
> On Tue, Mar 10, 2020 at 02:58:24PM +0530, Deepak R Varma wrote:
> > A long if condition exceeding 80 characters that makes evaluation
> > appear confusing. Rearranging the condition makes it easier to
> understand.
> >
> > Signed-off-by: Deepak R Varma <mh12g...@gmail.com <javascript:>>
> > ---
> > drivers/staging/wilc1000/netdev.c | 6 ++++--
> > 1 file changed, 4 insertions(+), 2 deletions(-)
>
> You forgot "staging:" in your subject line.
>
> >
> > diff --git a/drivers/staging/wilc1000/netdev.c
> b/drivers/staging/wilc1000/netdev.c
> > index 045f5cdfdca0..d7a632c92a76 100644
> > --- a/drivers/staging/wilc1000/netdev.c
> > +++ b/drivers/staging/wilc1000/netdev.c
> > @@ -802,8 +802,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)))
>
> The original code is really easier to follow than your change, so I
> would just leave it as-is please.
>
> thanks,
>
> greg k-h
>
[-- Attachment #1.2: Type: text/html, Size: 2367 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Outreachy kernel] Re: [PATCH] wilc1000 : rearrange line exceeding 80 characters
2020-03-10 11:04 ` Deepak Varma
@ 2020-03-10 11:38 ` Vaishali Thakkar
0 siblings, 0 replies; 4+ messages in thread
From: Vaishali Thakkar @ 2020-03-10 11:38 UTC (permalink / raw)
To: Deepak Varma; +Cc: outreachy-kernel
On Tue, Mar 10, 2020 at 4:34 PM Deepak Varma <mh12gx2825@gmail.com> wrote:
>
> Thank you Greg. What you commented makes sense.
Hi Deepak,
Please don't top-post. You can read 'Responding to emails'
a section in the kernel first patch tutorial to understand the
difference between top-posting and responding inline.
> Deepak.
>
> On Tuesday, 10 March 2020 15:16:35 UTC+5:30, gregkh wrote:
>>
>> On Tue, Mar 10, 2020 at 02:58:24PM +0530, Deepak R Varma wrote:
>> > A long if condition exceeding 80 characters that makes evaluation
>> > appear confusing. Rearranging the condition makes it easier to understand.
>> >
>> > Signed-off-by: Deepak R Varma <mh12g...@gmail.com>
>> > ---
>> > drivers/staging/wilc1000/netdev.c | 6 ++++--
>> > 1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> You forgot "staging:" in your subject line.
>>
>> >
>> > diff --git a/drivers/staging/wilc1000/netdev.c b/drivers/staging/wilc1000/netdev.c
>> > index 045f5cdfdca0..d7a632c92a76 100644
>> > --- a/drivers/staging/wilc1000/netdev.c
>> > +++ b/drivers/staging/wilc1000/netdev.c
>> > @@ -802,8 +802,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)))
>>
>> The original code is really easier to follow than your change, so I
>> would just leave it as-is please.
>>
>> thanks,
>>
>> greg k-h
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/02081ae5-284b-401d-85df-dc1e6911e1f1%40googlegroups.com.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-03-10 11:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-10 9:28 [PATCH] wilc1000 : rearrange line exceeding 80 characters Deepak R Varma
2020-03-10 9:46 ` Greg KH
2020-03-10 11:04 ` Deepak Varma
2020-03-10 11:38 ` [Outreachy kernel] " Vaishali Thakkar
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.