* [PATCH] staging: rtl8188eu: core: rtw_xmit: Move constant of the right side
@ 2016-09-28 20:33 Georgiana Rodica Chelu
2016-09-28 20:48 ` [Outreachy kernel] " Julia Lawall
0 siblings, 1 reply; 3+ messages in thread
From: Georgiana Rodica Chelu @ 2016-09-28 20:33 UTC (permalink / raw)
To: outreachy-kernel; +Cc: gregkh
Constants should be on the right side of comparisons.
Issue found by checkpatch.pl script.
Signed-off-by: Georgiana Rodica Chelu <georgiana.chelu93@gmail.com>
---
drivers/staging/rtl8188eu/core/rtw_xmit.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/rtl8188eu/core/rtw_xmit.c b/drivers/staging/rtl8188eu/core/rtw_xmit.c
index 1d2817b..1392899 100644
--- a/drivers/staging/rtl8188eu/core/rtw_xmit.c
+++ b/drivers/staging/rtl8188eu/core/rtw_xmit.c
@@ -451,14 +451,14 @@ static s32 update_attrib(struct adapter *padapter, struct sk_buff *pkt, struct p
pattrib->pktlen = pktfile.pkt_len;
- if (ETH_P_IP == pattrib->ether_type) {
+ if (pattrib->ether_type == ETH_P_IP) {
/* The following is for DHCP and ARP packet, we use cck1M to tx these packets and let LPS awake some time */
/* to prevent DHCP protocol fail */
u8 tmp[24];
_rtw_pktfile_read(&pktfile, &tmp[0], 24);
pattrib->dhcp_pkt = 0;
if (pktfile.pkt_len > 282) {/* MINIMUM_DHCP_PACKET_SIZE) { */
- if (ETH_P_IP == pattrib->ether_type) {/* IP header */
+ if (pattrib->ether_type == ETH_P_IP) {/* IP header */
if (((tmp[21] == 68) && (tmp[23] == 67)) ||
((tmp[21] == 67) && (tmp[23] == 68))) {
/* 68 : UDP BOOTP client */
@@ -469,7 +469,7 @@ static s32 update_attrib(struct adapter *padapter, struct sk_buff *pkt, struct p
}
}
}
- } else if (0x888e == pattrib->ether_type) {
+ } else if (pattrib->ether_type == 0x888e) {
DBG_88E_LEVEL(_drv_info_, "send eapol packet\n");
}
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Outreachy kernel] [PATCH] staging: rtl8188eu: core: rtw_xmit: Move constant of the right side
2016-09-28 20:33 [PATCH] staging: rtl8188eu: core: rtw_xmit: Move constant of the right side Georgiana Rodica Chelu
@ 2016-09-28 20:48 ` Julia Lawall
2016-09-28 20:54 ` Georgiana Chelu
0 siblings, 1 reply; 3+ messages in thread
From: Julia Lawall @ 2016-09-28 20:48 UTC (permalink / raw)
To: Georgiana Rodica Chelu; +Cc: outreachy-kernel, gregkh
On Wed, 28 Sep 2016, Georgiana Rodica Chelu wrote:
> Constants should be on the right side of comparisons.
>
> Issue found by checkpatch.pl script.
>
> Signed-off-by: Georgiana Rodica Chelu <georgiana.chelu93@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
I wonder if there is some more meaningful way to describe 0x888e.
julia
> ---
> drivers/staging/rtl8188eu/core/rtw_xmit.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/rtl8188eu/core/rtw_xmit.c b/drivers/staging/rtl8188eu/core/rtw_xmit.c
> index 1d2817b..1392899 100644
> --- a/drivers/staging/rtl8188eu/core/rtw_xmit.c
> +++ b/drivers/staging/rtl8188eu/core/rtw_xmit.c
> @@ -451,14 +451,14 @@ static s32 update_attrib(struct adapter *padapter, struct sk_buff *pkt, struct p
>
> pattrib->pktlen = pktfile.pkt_len;
>
> - if (ETH_P_IP == pattrib->ether_type) {
> + if (pattrib->ether_type == ETH_P_IP) {
> /* The following is for DHCP and ARP packet, we use cck1M to tx these packets and let LPS awake some time */
> /* to prevent DHCP protocol fail */
> u8 tmp[24];
> _rtw_pktfile_read(&pktfile, &tmp[0], 24);
> pattrib->dhcp_pkt = 0;
> if (pktfile.pkt_len > 282) {/* MINIMUM_DHCP_PACKET_SIZE) { */
> - if (ETH_P_IP == pattrib->ether_type) {/* IP header */
> + if (pattrib->ether_type == ETH_P_IP) {/* IP header */
> if (((tmp[21] == 68) && (tmp[23] == 67)) ||
> ((tmp[21] == 67) && (tmp[23] == 68))) {
> /* 68 : UDP BOOTP client */
> @@ -469,7 +469,7 @@ static s32 update_attrib(struct adapter *padapter, struct sk_buff *pkt, struct p
> }
> }
> }
> - } else if (0x888e == pattrib->ether_type) {
> + } else if (pattrib->ether_type == 0x888e) {
> DBG_88E_LEVEL(_drv_info_, "send eapol packet\n");
> }
>
> --
> 2.7.4
>
> --
> 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/20160928203302.GA19044%40fireworks.
> For more options, visit https://groups.google.com/d/optout.
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Outreachy kernel] [PATCH] staging: rtl8188eu: core: rtw_xmit: Move constant of the right side
2016-09-28 20:48 ` [Outreachy kernel] " Julia Lawall
@ 2016-09-28 20:54 ` Georgiana Chelu
0 siblings, 0 replies; 3+ messages in thread
From: Georgiana Chelu @ 2016-09-28 20:54 UTC (permalink / raw)
To: Julia Lawall; +Cc: outreachy-kernel, Greg Kroah-Hartman
[-- Attachment #1: Type: text/plain, Size: 2837 bytes --]
Yes, I am working on this :)
Georgiana
On 28 September 2016 at 23:48, Julia Lawall <julia.lawall@lip6.fr> wrote:
>
>
> On Wed, 28 Sep 2016, Georgiana Rodica Chelu wrote:
>
> > Constants should be on the right side of comparisons.
> >
> > Issue found by checkpatch.pl script.
> >
> > Signed-off-by: Georgiana Rodica Chelu <georgiana.chelu93@gmail.com>
>
> Acked-by: Julia Lawall <julia.lawall@lip6.fr>
>
> I wonder if there is some more meaningful way to describe 0x888e.
>
> julia
>
> > ---
> > drivers/staging/rtl8188eu/core/rtw_xmit.c | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/staging/rtl8188eu/core/rtw_xmit.c
> b/drivers/staging/rtl8188eu/core/rtw_xmit.c
> > index 1d2817b..1392899 100644
> > --- a/drivers/staging/rtl8188eu/core/rtw_xmit.c
> > +++ b/drivers/staging/rtl8188eu/core/rtw_xmit.c
> > @@ -451,14 +451,14 @@ static s32 update_attrib(struct adapter *padapter,
> struct sk_buff *pkt, struct p
> >
> > pattrib->pktlen = pktfile.pkt_len;
> >
> > - if (ETH_P_IP == pattrib->ether_type) {
> > + if (pattrib->ether_type == ETH_P_IP) {
> > /* The following is for DHCP and ARP packet, we use cck1M
> to tx these packets and let LPS awake some time */
> > /* to prevent DHCP protocol fail */
> > u8 tmp[24];
> > _rtw_pktfile_read(&pktfile, &tmp[0], 24);
> > pattrib->dhcp_pkt = 0;
> > if (pktfile.pkt_len > 282) {/* MINIMUM_DHCP_PACKET_SIZE) {
> */
> > - if (ETH_P_IP == pattrib->ether_type) {/* IP
> header */
> > + if (pattrib->ether_type == ETH_P_IP) {/* IP
> header */
> > if (((tmp[21] == 68) && (tmp[23] == 67)) ||
> > ((tmp[21] == 67) && (tmp[23] == 68))) {
> > /* 68 : UDP BOOTP client */
> > @@ -469,7 +469,7 @@ static s32 update_attrib(struct adapter *padapter,
> struct sk_buff *pkt, struct p
> > }
> > }
> > }
> > - } else if (0x888e == pattrib->ether_type) {
> > + } else if (pattrib->ether_type == 0x888e) {
> > DBG_88E_LEVEL(_drv_info_, "send eapol packet\n");
> > }
> >
> > --
> > 2.7.4
> >
> > --
> > 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/20160928203302.GA19044%40fireworks.
> > For more options, visit https://groups.google.com/d/optout.
> >
>
[-- Attachment #2: Type: text/html, Size: 4422 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-09-28 20:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-28 20:33 [PATCH] staging: rtl8188eu: core: rtw_xmit: Move constant of the right side Georgiana Rodica Chelu
2016-09-28 20:48 ` [Outreachy kernel] " Julia Lawall
2016-09-28 20:54 ` Georgiana Chelu
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.