* [PATCH] Staging: rtl8192u: ieee80211_rx: Remove unused code
@ 2015-10-14 14:24 Shivani Bhardwaj
2015-10-14 14:26 ` [Outreachy kernel] " Julia Lawall
0 siblings, 1 reply; 7+ messages in thread
From: Shivani Bhardwaj @ 2015-10-14 14:24 UTC (permalink / raw)
To: outreachy-kernel
The variable frame_authorized is declared and mentioned in the code but
is not used anywhere so, it should be removed.
Semantic patch used:
@@
type T;
identifier i;
constant C;
position p != e.p;
@@
- T i@p;
<+... when != i
- i = C;
...+>
Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
---
drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
index 4b5f32d..ab60c3f 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
@@ -899,7 +899,6 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
struct net_device *wds = NULL;
struct sk_buff *skb2 = NULL;
struct net_device *wds = NULL;
- int frame_authorized = 0;
int from_assoc_ap = 0;
void *sta = NULL;
#endif
@@ -1106,10 +1105,8 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
switch (hostap_handle_sta_rx(ieee, dev, skb, rx_stats,
wds != NULL)) {
case AP_RX_CONTINUE_NOT_AUTHORIZED:
- frame_authorized = 0;
break;
case AP_RX_CONTINUE:
- frame_authorized = 1;
break;
case AP_RX_DROP:
goto rx_dropped;
--
2.1.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [Outreachy kernel] [PATCH] Staging: rtl8192u: ieee80211_rx: Remove unused code
2015-10-14 14:24 [PATCH] Staging: rtl8192u: ieee80211_rx: Remove unused code Shivani Bhardwaj
@ 2015-10-14 14:26 ` Julia Lawall
2015-10-14 16:08 ` Shivani Bhardwaj
0 siblings, 1 reply; 7+ messages in thread
From: Julia Lawall @ 2015-10-14 14:26 UTC (permalink / raw)
To: Shivani Bhardwaj; +Cc: outreachy-kernel
On Wed, 14 Oct 2015, Shivani Bhardwaj wrote:
> The variable frame_authorized is declared and mentioned in the code but
> is not used anywhere so, it should be removed.
> Semantic patch used:
> @@
> type T;
> identifier i;
> constant C;
> position p != e.p;
> @@
>
> - T i@p;
> <+... when != i
> - i = C;
> ...+>
>
> Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
> ---
> drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
> index 4b5f32d..ab60c3f 100644
> --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
> +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
> @@ -899,7 +899,6 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
> struct net_device *wds = NULL;
> struct sk_buff *skb2 = NULL;
> struct net_device *wds = NULL;
> - int frame_authorized = 0;
> int from_assoc_ap = 0;
> void *sta = NULL;
> #endif
> @@ -1106,10 +1105,8 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
> switch (hostap_handle_sta_rx(ieee, dev, skb, rx_stats,
> wds != NULL)) {
> case AP_RX_CONTINUE_NOT_AUTHORIZED:
> - frame_authorized = 0;
> break;
> case AP_RX_CONTINUE:
> - frame_authorized = 1;
> break;
Should the cases be merged? I don't know what is the common strategy in
the Linux kernel.
julia
> case AP_RX_DROP:
> goto rx_dropped;
> --
> 2.1.0
>
> --
> 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 post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20151014142414.GA17736%40ubuntu.
> For more options, visit https://groups.google.com/d/optout.
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Outreachy kernel] [PATCH] Staging: rtl8192u: ieee80211_rx: Remove unused code
2015-10-14 14:26 ` [Outreachy kernel] " Julia Lawall
@ 2015-10-14 16:08 ` Shivani Bhardwaj
2015-10-14 16:09 ` Julia Lawall
0 siblings, 1 reply; 7+ messages in thread
From: Shivani Bhardwaj @ 2015-10-14 16:08 UTC (permalink / raw)
To: Julia Lawall; +Cc: outreachy-kernel
On Wed, Oct 14, 2015 at 7:56 PM, Julia Lawall <julia.lawall@lip6.fr> wrote:
>
>
> On Wed, 14 Oct 2015, Shivani Bhardwaj wrote:
>
>> The variable frame_authorized is declared and mentioned in the code but
>> is not used anywhere so, it should be removed.
>> Semantic patch used:
>> @@
>> type T;
>> identifier i;
>> constant C;
>> position p != e.p;
>> @@
>>
>> - T i@p;
>> <+... when != i
>> - i = C;
>> ...+>
>>
>> Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
>> ---
>> drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 3 ---
>> 1 file changed, 3 deletions(-)
>>
>> diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
>> index 4b5f32d..ab60c3f 100644
>> --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
>> +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
>> @@ -899,7 +899,6 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
>> struct net_device *wds = NULL;
>> struct sk_buff *skb2 = NULL;
>> struct net_device *wds = NULL;
>> - int frame_authorized = 0;
>> int from_assoc_ap = 0;
>> void *sta = NULL;
>> #endif
>> @@ -1106,10 +1105,8 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
>> switch (hostap_handle_sta_rx(ieee, dev, skb, rx_stats,
>> wds != NULL)) {
>> case AP_RX_CONTINUE_NOT_AUTHORIZED:
>> - frame_authorized = 0;
>> break;
>> case AP_RX_CONTINUE:
>> - frame_authorized = 1;
>> break;
>
> Should the cases be merged? I don't know what is the common strategy in
> the Linux kernel.
>
> julia
>
What do you suggest?
>> case AP_RX_DROP:
>> goto rx_dropped;
>> --
>> 2.1.0
>>
>> --
>> 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 post to this group, send email to outreachy-kernel@googlegroups.com.
>> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20151014142414.GA17736%40ubuntu.
>> For more options, visit https://groups.google.com/d/optout.
>>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Outreachy kernel] [PATCH] Staging: rtl8192u: ieee80211_rx: Remove unused code
2015-10-14 16:08 ` Shivani Bhardwaj
@ 2015-10-14 16:09 ` Julia Lawall
2015-10-14 16:10 ` Shivani Bhardwaj
0 siblings, 1 reply; 7+ messages in thread
From: Julia Lawall @ 2015-10-14 16:09 UTC (permalink / raw)
To: Shivani Bhardwaj; +Cc: outreachy-kernel
On Wed, 14 Oct 2015, Shivani Bhardwaj wrote:
> On Wed, Oct 14, 2015 at 7:56 PM, Julia Lawall <julia.lawall@lip6.fr> wrote:
> >
> >
> > On Wed, 14 Oct 2015, Shivani Bhardwaj wrote:
> >
> >> The variable frame_authorized is declared and mentioned in the code but
> >> is not used anywhere so, it should be removed.
> >> Semantic patch used:
> >> @@
> >> type T;
> >> identifier i;
> >> constant C;
> >> position p != e.p;
> >> @@
> >>
> >> - T i@p;
> >> <+... when != i
> >> - i = C;
> >> ...+>
> >>
> >> Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
> >> ---
> >> drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 3 ---
> >> 1 file changed, 3 deletions(-)
> >>
> >> diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
> >> index 4b5f32d..ab60c3f 100644
> >> --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
> >> +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
> >> @@ -899,7 +899,6 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
> >> struct net_device *wds = NULL;
> >> struct sk_buff *skb2 = NULL;
> >> struct net_device *wds = NULL;
> >> - int frame_authorized = 0;
> >> int from_assoc_ap = 0;
> >> void *sta = NULL;
> >> #endif
> >> @@ -1106,10 +1105,8 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
> >> switch (hostap_handle_sta_rx(ieee, dev, skb, rx_stats,
> >> wds != NULL)) {
> >> case AP_RX_CONTINUE_NOT_AUTHORIZED:
> >> - frame_authorized = 0;
> >> break;
> >> case AP_RX_CONTINUE:
> >> - frame_authorized = 1;
> >> break;
> >
> > Should the cases be merged? I don't know what is the common strategy in
> > the Linux kernel.
> >
> > julia
> >
>
> What do you suggest?
case AP_RX_CONTINUE_NOT_AUTHORIZED:
case AP_RX_CONTINUE:
break;
Normally, falling through from one case to the next is a possible source
of errors, but when there is nothing to do, perhaps the code becomes more
concise and clear.
julia
>
> >> case AP_RX_DROP:
> >> goto rx_dropped;
> >> --
> >> 2.1.0
> >>
> >> --
> >> 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 post to this group, send email to outreachy-kernel@googlegroups.com.
> >> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20151014142414.GA17736%40ubuntu.
> >> For more options, visit https://groups.google.com/d/optout.
> >>
>
> --
> 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 post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/CAKHNQQHjzrqSggo57khaaV%2BBsv28NKUawQcbbhEmnXVy_80OZA%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Outreachy kernel] [PATCH] Staging: rtl8192u: ieee80211_rx: Remove unused code
2015-10-14 16:09 ` Julia Lawall
@ 2015-10-14 16:10 ` Shivani Bhardwaj
2015-10-14 16:38 ` Shivani Bhardwaj
0 siblings, 1 reply; 7+ messages in thread
From: Shivani Bhardwaj @ 2015-10-14 16:10 UTC (permalink / raw)
To: Julia Lawall; +Cc: outreachy-kernel
On Wed, Oct 14, 2015 at 9:39 PM, Julia Lawall <julia.lawall@lip6.fr> wrote:
>
>
> On Wed, 14 Oct 2015, Shivani Bhardwaj wrote:
>
>> On Wed, Oct 14, 2015 at 7:56 PM, Julia Lawall <julia.lawall@lip6.fr> wrote:
>> >
>> >
>> > On Wed, 14 Oct 2015, Shivani Bhardwaj wrote:
>> >
>> >> The variable frame_authorized is declared and mentioned in the code but
>> >> is not used anywhere so, it should be removed.
>> >> Semantic patch used:
>> >> @@
>> >> type T;
>> >> identifier i;
>> >> constant C;
>> >> position p != e.p;
>> >> @@
>> >>
>> >> - T i@p;
>> >> <+... when != i
>> >> - i = C;
>> >> ...+>
>> >>
>> >> Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
>> >> ---
>> >> drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 3 ---
>> >> 1 file changed, 3 deletions(-)
>> >>
>> >> diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
>> >> index 4b5f32d..ab60c3f 100644
>> >> --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
>> >> +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
>> >> @@ -899,7 +899,6 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
>> >> struct net_device *wds = NULL;
>> >> struct sk_buff *skb2 = NULL;
>> >> struct net_device *wds = NULL;
>> >> - int frame_authorized = 0;
>> >> int from_assoc_ap = 0;
>> >> void *sta = NULL;
>> >> #endif
>> >> @@ -1106,10 +1105,8 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
>> >> switch (hostap_handle_sta_rx(ieee, dev, skb, rx_stats,
>> >> wds != NULL)) {
>> >> case AP_RX_CONTINUE_NOT_AUTHORIZED:
>> >> - frame_authorized = 0;
>> >> break;
>> >> case AP_RX_CONTINUE:
>> >> - frame_authorized = 1;
>> >> break;
>> >
>> > Should the cases be merged? I don't know what is the common strategy in
>> > the Linux kernel.
>> >
>> > julia
>> >
>>
>> What do you suggest?
>
> case AP_RX_CONTINUE_NOT_AUTHORIZED:
> case AP_RX_CONTINUE:
> break;
>
> Normally, falling through from one case to the next is a possible source
> of errors, but when there is nothing to do, perhaps the code becomes more
> concise and clear.
>
> julia
>
Fine. I'll do this.
Thank you. :)
>>
>> >> case AP_RX_DROP:
>> >> goto rx_dropped;
>> >> --
>> >> 2.1.0
>> >>
>> >> --
>> >> 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 post to this group, send email to outreachy-kernel@googlegroups.com.
>> >> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20151014142414.GA17736%40ubuntu.
>> >> For more options, visit https://groups.google.com/d/optout.
>> >>
>>
>> --
>> 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 post to this group, send email to outreachy-kernel@googlegroups.com.
>> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/CAKHNQQHjzrqSggo57khaaV%2BBsv28NKUawQcbbhEmnXVy_80OZA%40mail.gmail.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Outreachy kernel] [PATCH] Staging: rtl8192u: ieee80211_rx: Remove unused code
2015-10-14 16:10 ` Shivani Bhardwaj
@ 2015-10-14 16:38 ` Shivani Bhardwaj
2015-10-14 16:49 ` Julia Lawall
0 siblings, 1 reply; 7+ messages in thread
From: Shivani Bhardwaj @ 2015-10-14 16:38 UTC (permalink / raw)
To: Julia Lawall; +Cc: outreachy-kernel
On Wed, Oct 14, 2015 at 9:40 PM, Shivani Bhardwaj <shivanib134@gmail.com> wrote:
> On Wed, Oct 14, 2015 at 9:39 PM, Julia Lawall <julia.lawall@lip6.fr> wrote:
>>
>>
>> On Wed, 14 Oct 2015, Shivani Bhardwaj wrote:
>>
>>> On Wed, Oct 14, 2015 at 7:56 PM, Julia Lawall <julia.lawall@lip6.fr> wrote:
>>> >
>>> >
>>> > On Wed, 14 Oct 2015, Shivani Bhardwaj wrote:
>>> >
>>> >> The variable frame_authorized is declared and mentioned in the code but
>>> >> is not used anywhere so, it should be removed.
>>> >> Semantic patch used:
>>> >> @@
>>> >> type T;
>>> >> identifier i;
>>> >> constant C;
>>> >> position p != e.p;
>>> >> @@
>>> >>
>>> >> - T i@p;
>>> >> <+... when != i
>>> >> - i = C;
>>> >> ...+>
>>> >>
>>> >> Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
>>> >> ---
>>> >> drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 3 ---
>>> >> 1 file changed, 3 deletions(-)
>>> >>
>>> >> diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
>>> >> index 4b5f32d..ab60c3f 100644
>>> >> --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
>>> >> +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
>>> >> @@ -899,7 +899,6 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
>>> >> struct net_device *wds = NULL;
>>> >> struct sk_buff *skb2 = NULL;
>>> >> struct net_device *wds = NULL;
>>> >> - int frame_authorized = 0;
>>> >> int from_assoc_ap = 0;
>>> >> void *sta = NULL;
>>> >> #endif
>>> >> @@ -1106,10 +1105,8 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
>>> >> switch (hostap_handle_sta_rx(ieee, dev, skb, rx_stats,
>>> >> wds != NULL)) {
>>> >> case AP_RX_CONTINUE_NOT_AUTHORIZED:
>>> >> - frame_authorized = 0;
>>> >> break;
>>> >> case AP_RX_CONTINUE:
>>> >> - frame_authorized = 1;
>>> >> break;
>>> >
>>> > Should the cases be merged? I don't know what is the common strategy in
>>> > the Linux kernel.
>>> >
>>> > julia
>>> >
>>>
>>> What do you suggest?
>>
>> case AP_RX_CONTINUE_NOT_AUTHORIZED:
>> case AP_RX_CONTINUE:
>> break;
>>
>> Normally, falling through from one case to the next is a possible source
>> of errors, but when there is nothing to do, perhaps the code becomes more
>> concise and clear.
>>
>> julia
>>
Should I send this as a patch series? Or combining the cases will look
fine under the heading "removing extra code" with the other code?
>
> Fine. I'll do this.
> Thank you. :)
>
>>>
>>> >> case AP_RX_DROP:
>>> >> goto rx_dropped;
>>> >> --
>>> >> 2.1.0
>>> >>
>>> >> --
>>> >> 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 post to this group, send email to outreachy-kernel@googlegroups.com.
>>> >> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20151014142414.GA17736%40ubuntu.
>>> >> For more options, visit https://groups.google.com/d/optout.
>>> >>
>>>
>>> --
>>> 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 post to this group, send email to outreachy-kernel@googlegroups.com.
>>> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/CAKHNQQHjzrqSggo57khaaV%2BBsv28NKUawQcbbhEmnXVy_80OZA%40mail.gmail.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Outreachy kernel] [PATCH] Staging: rtl8192u: ieee80211_rx: Remove unused code
2015-10-14 16:38 ` Shivani Bhardwaj
@ 2015-10-14 16:49 ` Julia Lawall
0 siblings, 0 replies; 7+ messages in thread
From: Julia Lawall @ 2015-10-14 16:49 UTC (permalink / raw)
To: Shivani Bhardwaj; +Cc: outreachy-kernel
On Wed, 14 Oct 2015, Shivani Bhardwaj wrote:
> On Wed, Oct 14, 2015 at 9:40 PM, Shivani Bhardwaj <shivanib134@gmail.com> wrote:
> > On Wed, Oct 14, 2015 at 9:39 PM, Julia Lawall <julia.lawall@lip6.fr> wrote:
> >>
> >>
> >> On Wed, 14 Oct 2015, Shivani Bhardwaj wrote:
> >>
> >>> On Wed, Oct 14, 2015 at 7:56 PM, Julia Lawall <julia.lawall@lip6.fr> wrote:
> >>> >
> >>> >
> >>> > On Wed, 14 Oct 2015, Shivani Bhardwaj wrote:
> >>> >
> >>> >> The variable frame_authorized is declared and mentioned in the code but
> >>> >> is not used anywhere so, it should be removed.
> >>> >> Semantic patch used:
> >>> >> @@
> >>> >> type T;
> >>> >> identifier i;
> >>> >> constant C;
> >>> >> position p != e.p;
> >>> >> @@
> >>> >>
> >>> >> - T i@p;
> >>> >> <+... when != i
> >>> >> - i = C;
> >>> >> ...+>
> >>> >>
> >>> >> Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
> >>> >> ---
> >>> >> drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 3 ---
> >>> >> 1 file changed, 3 deletions(-)
> >>> >>
> >>> >> diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
> >>> >> index 4b5f32d..ab60c3f 100644
> >>> >> --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
> >>> >> +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
> >>> >> @@ -899,7 +899,6 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
> >>> >> struct net_device *wds = NULL;
> >>> >> struct sk_buff *skb2 = NULL;
> >>> >> struct net_device *wds = NULL;
> >>> >> - int frame_authorized = 0;
> >>> >> int from_assoc_ap = 0;
> >>> >> void *sta = NULL;
> >>> >> #endif
> >>> >> @@ -1106,10 +1105,8 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
> >>> >> switch (hostap_handle_sta_rx(ieee, dev, skb, rx_stats,
> >>> >> wds != NULL)) {
> >>> >> case AP_RX_CONTINUE_NOT_AUTHORIZED:
> >>> >> - frame_authorized = 0;
> >>> >> break;
> >>> >> case AP_RX_CONTINUE:
> >>> >> - frame_authorized = 1;
> >>> >> break;
> >>> >
> >>> > Should the cases be merged? I don't know what is the common strategy in
> >>> > the Linux kernel.
> >>> >
> >>> > julia
> >>> >
> >>>
> >>> What do you suggest?
> >>
> >> case AP_RX_CONTINUE_NOT_AUTHORIZED:
> >> case AP_RX_CONTINUE:
> >> break;
> >>
> >> Normally, falling through from one case to the next is a possible source
> >> of errors, but when there is nothing to do, perhaps the code becomes more
> >> concise and clear.
> >>
> >> julia
> >>
>
> Should I send this as a patch series? Or combining the cases will look
> fine under the heading "removing extra code" with the other code?
I think it could be done at once.
julia
>
> >
> > Fine. I'll do this.
> > Thank you. :)
> >
> >>>
> >>> >> case AP_RX_DROP:
> >>> >> goto rx_dropped;
> >>> >> --
> >>> >> 2.1.0
> >>> >>
> >>> >> --
> >>> >> 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 post to this group, send email to outreachy-kernel@googlegroups.com.
> >>> >> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20151014142414.GA17736%40ubuntu.
> >>> >> For more options, visit https://groups.google.com/d/optout.
> >>> >>
> >>>
> >>> --
> >>> 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 post to this group, send email to outreachy-kernel@googlegroups.com.
> >>> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/CAKHNQQHjzrqSggo57khaaV%2BBsv28NKUawQcbbhEmnXVy_80OZA%40mail.gmail.com.
> >>> For more options, visit https://groups.google.com/d/optout.
> >>>
>
> --
> 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 post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/CAKHNQQEQYMt3pHCOK9%3DwP_29hk1PD2%3Dh5PkJx4%3D9WcYeGUB2iA%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-10-14 16:49 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-14 14:24 [PATCH] Staging: rtl8192u: ieee80211_rx: Remove unused code Shivani Bhardwaj
2015-10-14 14:26 ` [Outreachy kernel] " Julia Lawall
2015-10-14 16:08 ` Shivani Bhardwaj
2015-10-14 16:09 ` Julia Lawall
2015-10-14 16:10 ` Shivani Bhardwaj
2015-10-14 16:38 ` Shivani Bhardwaj
2015-10-14 16:49 ` Julia Lawall
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.