Staging: rtl8192u: Remove useless type conversion
PATCH 1/1 Staging: rtl8192u: Remove useless type conversion
Some type conversions like casting a pointer to a pointer of same type, casting to the original type using addressof(&) operator etc. are not needed. Therefore, remove them. Done using coccinelle:
@@
type t;
t *p,a;
@@
(
- (t)(a)
+ a
|
- (t *)(p)
+ p
|
- (t *)(&a)
+ &a
)
--- drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c | 2 +- drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 6 +++--- drivers/staging/rtl8192u/r8192U_core.c | 3 +-- drivers/staging/rtl8192u/r8192U_dm.c | 6 +++--- 4 files changed, 8 insertions(+), 9 deletions(-)
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c +1 -1
@@ -806,7 +806,7 @@ static struct sk_buff *ieee80211_probe_resp(struct ieee80211_device *ieee, u8 *d *(tag++) =2 ;put_unaligned_le16 (ieee->current_network.atim_window, - (u8 *)tag); + tag); tag+=2 ; }
drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c +3 -3
@@ -354,7 +354,7 @@ int ieee80211_rx_ADDBAReq(struct ieee80211_device *ieee, struct sk_buff *skb) req = (struct rtl_80211_hdr_3addr *) skb->data; tag = (u8 *)req; - dst = (u8 *)(&req->addr2[0 ]); + dst = &req->addr2[0 ]; tag +=sizeof (struct rtl_80211_hdr_3addr ); pDialogToken = tag +2 ;//category+action pBaParamSet = (PBA_PARAM_SET )(tag +3 );//+DialogToken
@@ -452,7 +452,7 @@ int ieee80211_rx_ADDBARsp(struct ieee80211_device *ieee, struct sk_buff *skb) } rsp = (struct rtl_80211_hdr_3addr *)skb->data; tag = (u8 *)rsp; - dst = (u8 *)(&rsp->addr2[0 ]); + dst = &rsp->addr2[0 ]; tag +=sizeof (struct rtl_80211_hdr_3addr ); pDialogToken = tag +2 ; pStatusCode = (u16 *)(tag +3 );
@@ -590,7 +590,7 @@ int ieee80211_rx_DELBA(struct ieee80211_device *ieee, struct sk_buff *skb)IEEE80211_DEBUG_DATA (IEEE80211_DL_DATA |IEEE80211_DL_BA , skb->data, skb->len); delba = (struct rtl_80211_hdr_3addr *)skb->data; - dst = (u8 *)(&delba->addr2[0 ]); + dst = &delba->addr2[0 ]; pDelBaParamSet = (PDELBA_PARAM_SET )&delba->payload[2 ];if (pDelBaParamSet->field.Initiator ==1 )
drivers/staging/rtl8192u/r8192U_core.c +1 -2
@@ -5010,8 +5010,7 @@ static int rtl8192_usb_probe(struct usb_interface *intf, dev->netdev_ops = &rtl8192_netdev_ops; - dev->wireless_handlers = - (struct iw_handler_def *)&r8192_wx_handlers_def; + dev->wireless_handlers = &r8192_wx_handlers_def; dev->type =ARPHRD_ETHER ;
drivers/staging/rtl8192u/r8192U_dm.c +3 -3
@@ -150,7 +150,7 @@ void deinit_hal_dm(struct net_device *dev)#ifdef USB_RX_AGGREGATION_SUPPORT void dm_CheckRxAggregation (struct net_device *dev) { -struct r8192_priv *priv =ieee80211_priv ((struct net_device *)dev); +struct r8192_priv *priv =ieee80211_priv (dev);PRT_HIGH_THROUGHPUT pHTInfo = priv->ieee80211->pHTInfo;static unsigned long lastTxOkCnt;static unsigned long lastRxOkCnt;
@@ -2346,7 +2346,7 @@ dm_CheckEdcaTurbo_EXIT:static void dm_init_ctstoself (struct net_device *dev) { -struct r8192_priv *priv =ieee80211_priv ((struct net_device *)dev); +struct r8192_priv *priv =ieee80211_priv (dev); priv->ieee80211->bCTSToSelfEnable = true; priv->ieee80211->CTSToSelfTH = CTSToSelfTHVal;
@@ -2354,7 +2354,7 @@ static void dm_init_ctstoself(struct net_device *dev)static void dm_ctstoself (struct net_device *dev) { -struct r8192_priv *priv =ieee80211_priv ((struct net_device *)dev); +struct r8192_priv *priv =ieee80211_priv (dev);PRT_HIGH_THROUGHPUT pHTInfo = priv->ieee80211->pHTInfo;static unsigned long lastTxOkCnt;static unsigned long lastRxOkCnt;
Signature · 1 line
1.9.1
Quoted 7 lines · Bhumika Goyal
Some type conversions like casting a pointer to a pointer of same type, casting to the original type using
addressof(&)operator etc. are not needed. Therefore, remove them. Done using coccinelle:@@
type t;
t *p,a;
It makes no particular sense, but currently in Coccinelle, the * in the metavariable declaration applies to all of the declared variables.
To avoid this problem, could you make separate declarations for p and a, and try again?
thanks,
julia
Quoted 119 lines
@@
(
- (t)(a)
+ a
|
- (t *)(p)
+ p
|
- (t *)(&a)
+ &a
)Signed-off-by Bhumika Goyal <[email protected]>--- drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c | 2 +- drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 6 +++--- drivers/staging/rtl8192u/r8192U_core.c | 3 +-- drivers/staging/rtl8192u/r8192U_dm.c | 6 +++--- 4 files changed, 8 insertions(+), 9 deletions(-)drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c +1
-1@@ -806,7 +806,7 @@ static struct sk_buff *ieee80211_probe_resp(struct ieee80211_device *ieee, u8 *d *(tag++) =2 ;put_unaligned_le16 (ieee->current_network.atim_window, - (u8 *)tag); + tag); tag+=2 ; }drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c +3
-3@@ -354,7 +354,7 @@ int ieee80211_rx_ADDBAReq(struct ieee80211_device *ieee, struct sk_buff *skb) req = (struct rtl_80211_hdr_3addr *) skb->data; tag = (u8 *)req; - dst = (u8 *)(&req->addr2[0 ]); + dst = &req->addr2[0 ]; tag +=sizeof (struct rtl_80211_hdr_3addr ); pDialogToken = tag +2 ;//category+action pBaParamSet = (PBA_PARAM_SET )(tag +3 );//+DialogToken @@ -452,7 +452,7 @@ int ieee80211_rx_ADDBARsp(struct ieee80211_device *ieee, struct sk_buff *skb) } rsp = (struct rtl_80211_hdr_3addr *)skb->data; tag = (u8 *)rsp; - dst = (u8 *)(&rsp->addr2[0 ]); + dst = &rsp->addr2[0 ]; tag +=sizeof (struct rtl_80211_hdr_3addr ); pDialogToken = tag +2 ; pStatusCode = (u16 *)(tag +3 );@@ -590,7 +590,7 @@ int ieee80211_rx_DELBA(struct ieee80211_device *ieee, struct sk_buff *skb)IEEE80211_DEBUG_DATA (IEEE80211_DL_DATA |IEEE80211_DL_BA , skb->data, skb->len); delba = (struct rtl_80211_hdr_3addr *)skb->data; - dst = (u8 *)(&delba->addr2[0 ]); + dst = &delba->addr2[0 ]; pDelBaParamSet = (PDELBA_PARAM_SET )&delba->payload[2 ];if (pDelBaParamSet->field.Initiator ==1 )drivers/staging/rtl8192u/r8192U_core.c +1
-2@@ -5010,8 +5010,7 @@ static int rtl8192_usb_probe(struct usb_interface *intf, dev->netdev_ops = &rtl8192_netdev_ops; - dev->wireless_handlers = - (struct iw_handler_def *)&r8192_wx_handlers_def; + dev->wireless_handlers = &r8192_wx_handlers_def; dev->type =ARPHRD_ETHER ;drivers/staging/rtl8192u/r8192U_dm.c +3
-4@@ -150,7 +150,7 @@ void deinit_hal_dm(struct net_device *dev)#ifdef USB_RX_AGGREGATION_SUPPORT void dm_CheckRxAggregation (struct net_device *dev) { -struct r8192_priv *priv =ieee80211_priv ((struct net_device *)dev); +struct r8192_priv *priv =ieee80211_priv (dev);PRT_HIGH_THROUGHPUT pHTInfo = priv->ieee80211->pHTInfo;static unsigned long lastTxOkCnt;static unsigned long lastRxOkCnt;@@ -2346,7 +2346,7 @@ dm_CheckEdcaTurbo_EXIT:static void dm_init_ctstoself (struct net_device *dev) { -struct r8192_priv *priv =ieee80211_priv ((struct net_device *)dev); +struct r8192_priv *priv =ieee80211_priv (dev); priv->ieee80211->bCTSToSelfEnable = true; priv->ieee80211->CTSToSelfTH = CTSToSelfTHVal;@@ -2354,7 +2354,7 @@ static void dm_init_ctstoself(struct net_device *dev)static void dm_ctstoself (struct net_device *dev) { -struct r8192_priv *priv =ieee80211_priv ((struct net_device *)dev); +struct r8192_priv *priv =ieee80211_priv (dev);PRT_HIGH_THROUGHPUT pHTInfo = priv->ieee80211->pHTInfo;static unsigned long lastTxOkCnt;static unsigned long lastRxOkCnt; --1.9.1
--
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 [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1474199218-15749-1-git-send-email-bhumirks%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Quoted 12 lines · Julia Lawall
Quoted 7 lines · Bhumika Goyal
Some type conversions like casting a pointer to a pointer of same type, casting to the original type using
addressof(&)operator etc. are not needed. Therefore, remove them. Done using coccinelle:@@
type t;
t *p,a;
Quoted 6 lines
It makes no particular sense, but currently in Coccinelle, the * in the metavariable declaration applies to all of the declared variables.
To avoid this problem, could you make separate declarations for p and a, and try again?
Oh, I didn't know that. Thanks for telling. I will modify the script then.
Thanks,
Bhumika
Quoted 122 lines
thanks,
juliaQuoted 119 lines
@@
(
- (t)(a)
+ a
|
- (t *)(p)
+ p
|
- (t *)(&a)
+ &a
)Signed-off-by Bhumika Goyal <[email protected]>--- drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c | 2 +- drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 6 +++--- drivers/staging/rtl8192u/r8192U_core.c | 3 +-- drivers/staging/rtl8192u/r8192U_dm.c | 6 +++--- 4 files changed, 8 insertions(+), 9 deletions(-)drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c +1
-1@@ -806,7 +806,7 @@ static struct sk_buff *ieee80211_probe_resp(struct ieee80211_device *ieee, u8 *d *(tag++) =2 ;put_unaligned_le16 (ieee->current_network.atim_window, - (u8 *)tag); + tag); tag+=2 ; }drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c +3
-3@@ -354,7 +354,7 @@ int ieee80211_rx_ADDBAReq(struct ieee80211_device *ieee, struct sk_buff *skb) req = (struct rtl_80211_hdr_3addr *) skb->data; tag = (u8 *)req; - dst = (u8 *)(&req->addr2[0 ]); + dst = &req->addr2[0 ]; tag +=sizeof (struct rtl_80211_hdr_3addr ); pDialogToken = tag +2 ;//category+action pBaParamSet = (PBA_PARAM_SET )(tag +3 );//+DialogToken @@ -452,7 +452,7 @@ int ieee80211_rx_ADDBARsp(struct ieee80211_device *ieee, struct sk_buff *skb) } rsp = (struct rtl_80211_hdr_3addr *)skb->data; tag = (u8 *)rsp; - dst = (u8 *)(&rsp->addr2[0 ]); + dst = &rsp->addr2[0 ]; tag +=sizeof (struct rtl_80211_hdr_3addr ); pDialogToken = tag +2 ; pStatusCode = (u16 *)(tag +3 );@@ -590,7 +590,7 @@ int ieee80211_rx_DELBA(struct ieee80211_device *ieee, struct sk_buff *skb)IEEE80211_DEBUG_DATA (IEEE80211_DL_DATA |IEEE80211_DL_BA , skb->data, skb->len); delba = (struct rtl_80211_hdr_3addr *)skb->data; - dst = (u8 *)(&delba->addr2[0 ]); + dst = &delba->addr2[0 ]; pDelBaParamSet = (PDELBA_PARAM_SET )&delba->payload[2 ];if (pDelBaParamSet->field.Initiator ==1 )drivers/staging/rtl8192u/r8192U_core.c +1
-2@@ -5010,8 +5010,7 @@ static int rtl8192_usb_probe(struct usb_interface *intf, dev->netdev_ops = &rtl8192_netdev_ops; - dev->wireless_handlers = - (struct iw_handler_def *)&r8192_wx_handlers_def; + dev->wireless_handlers = &r8192_wx_handlers_def; dev->type =ARPHRD_ETHER ;drivers/staging/rtl8192u/r8192U_dm.c +3
-4@@ -150,7 +150,7 @@ void deinit_hal_dm(struct net_device *dev)#ifdef USB_RX_AGGREGATION_SUPPORT void dm_CheckRxAggregation (struct net_device *dev) { -struct r8192_priv *priv =ieee80211_priv ((struct net_device *)dev); +struct r8192_priv *priv =ieee80211_priv (dev);PRT_HIGH_THROUGHPUT pHTInfo = priv->ieee80211->pHTInfo;static unsigned long lastTxOkCnt;static unsigned long lastRxOkCnt;@@ -2346,7 +2346,7 @@ dm_CheckEdcaTurbo_EXIT:static void dm_init_ctstoself (struct net_device *dev) { -struct r8192_priv *priv =ieee80211_priv ((struct net_device *)dev); +struct r8192_priv *priv =ieee80211_priv (dev); priv->ieee80211->bCTSToSelfEnable = true; priv->ieee80211->CTSToSelfTH = CTSToSelfTHVal;@@ -2354,7 +2354,7 @@ static void dm_init_ctstoself(struct net_device *dev)static void dm_ctstoself (struct net_device *dev) { -struct r8192_priv *priv =ieee80211_priv ((struct net_device *)dev); +struct r8192_priv *priv =ieee80211_priv (dev);PRT_HIGH_THROUGHPUT pHTInfo = priv->ieee80211->pHTInfo;static unsigned long lastTxOkCnt;static unsigned long lastRxOkCnt; --1.9.1
--
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 [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1474199218-15749-1-git-send-email-bhumirks%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Quoted 13 lines · Bhumika Goyal
Quoted 12 lines · Julia Lawall
Quoted 7 lines · Bhumika Goyal
Some type conversions like casting a pointer to a pointer of same type, casting to the original type using
addressof(&)operator etc. are not needed. Therefore, remove them. Done using coccinelle:@@
type t;
t *p,a;
Quoted 7 lines
Quoted 6 lines
It makes no particular sense, but currently in Coccinelle, the * in the metavariable declaration applies to all of the declared variables.
To avoid this problem, could you make separate declarations for p and a, and try again?
Oh, I didn't know that. Thanks for telling. I will modify the script then.
You should actually run the script again, and not just change the commit message, because you may get different results.
julia
Quoted 134 lines
Thanks,
BhumikaQuoted 115 lines
thanks,
juliaQuoted 112 lines
@@
(
- (t)(a)
+ a
|
- (t *)(p)
+ p
|
- (t *)(&a)
+ &a
)Signed-off-by Bhumika Goyal <[email protected]>--- drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c | 2 +- drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 6 +++--- drivers/staging/rtl8192u/r8192U_core.c | 3 +-- drivers/staging/rtl8192u/r8192U_dm.c | 6 +++--- 4 files changed, 8 insertions(+), 9 deletions(-)drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c +1
-1@@ -806,7 +806,7 @@ static struct sk_buff *ieee80211_probe_resp(struct ieee80211_device *ieee, u8 *d *(tag++) =2 ;put_unaligned_le16 (ieee->current_network.atim_window, - (u8 *)tag); + tag); tag+=2 ; }drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c +3
-3@@ -354,7 +354,7 @@ int ieee80211_rx_ADDBAReq(struct ieee80211_device *ieee, struct sk_buff *skb) req = (struct rtl_80211_hdr_3addr *) skb->data; tag = (u8 *)req; - dst = (u8 *)(&req->addr2[0 ]); + dst = &req->addr2[0 ]; tag +=sizeof (struct rtl_80211_hdr_3addr ); pDialogToken = tag +2 ;//category+action pBaParamSet = (PBA_PARAM_SET )(tag +3 );//+DialogToken @@ -452,7 +452,7 @@ int ieee80211_rx_ADDBARsp(struct ieee80211_device *ieee, struct sk_buff *skb) } rsp = (struct rtl_80211_hdr_3addr *)skb->data; tag = (u8 *)rsp; - dst = (u8 *)(&rsp->addr2[0 ]); + dst = &rsp->addr2[0 ]; tag +=sizeof (struct rtl_80211_hdr_3addr ); pDialogToken = tag +2 ; pStatusCode = (u16 *)(tag +3 );@@ -590,7 +590,7 @@ int ieee80211_rx_DELBA(struct ieee80211_device *ieee, struct sk_buff *skb)IEEE80211_DEBUG_DATA (IEEE80211_DL_DATA |IEEE80211_DL_BA , skb->data, skb->len); delba = (struct rtl_80211_hdr_3addr *)skb->data; - dst = (u8 *)(&delba->addr2[0 ]); + dst = &delba->addr2[0 ]; pDelBaParamSet = (PDELBA_PARAM_SET )&delba->payload[2 ];if (pDelBaParamSet->field.Initiator ==1 )drivers/staging/rtl8192u/r8192U_core.c +1
-2@@ -5010,8 +5010,7 @@ static int rtl8192_usb_probe(struct usb_interface *intf, dev->netdev_ops = &rtl8192_netdev_ops; - dev->wireless_handlers = - (struct iw_handler_def *)&r8192_wx_handlers_def; + dev->wireless_handlers = &r8192_wx_handlers_def; dev->type =ARPHRD_ETHER ;drivers/staging/rtl8192u/r8192U_dm.c +3
-4@@ -150,7 +150,7 @@ void deinit_hal_dm(struct net_device *dev)#ifdef USB_RX_AGGREGATION_SUPPORT void dm_CheckRxAggregation (struct net_device *dev) { -struct r8192_priv *priv =ieee80211_priv ((struct net_device *)dev); +struct r8192_priv *priv =ieee80211_priv (dev);PRT_HIGH_THROUGHPUT pHTInfo = priv->ieee80211->pHTInfo;static unsigned long lastTxOkCnt;static unsigned long lastRxOkCnt;@@ -2346,7 +2346,7 @@ dm_CheckEdcaTurbo_EXIT:static void dm_init_ctstoself (struct net_device *dev) { -struct r8192_priv *priv =ieee80211_priv ((struct net_device *)dev); +struct r8192_priv *priv =ieee80211_priv (dev); priv->ieee80211->bCTSToSelfEnable = true; priv->ieee80211->CTSToSelfTH = CTSToSelfTHVal;@@ -2354,7 +2354,7 @@ static void dm_init_ctstoself(struct net_device *dev)static void dm_ctstoself (struct net_device *dev) { -struct r8192_priv *priv =ieee80211_priv ((struct net_device *)dev); +struct r8192_priv *priv =ieee80211_priv (dev);PRT_HIGH_THROUGHPUT pHTInfo = priv->ieee80211->pHTInfo;static unsigned long lastTxOkCnt;static unsigned long lastRxOkCnt; --1.9.1
Quoted 7 lines
Quoted 7 lines
--
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 [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1474199218-15749-1-git-send-email-bhumirks%40gmail.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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/CAOH%2B1jHDArZjjivS24GN%3D2ocUfvU92zC-P1WLfTJh%3Dgq12dCAg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Quoted 20 lines · Julia Lawall
Quoted 16 lines · Bhumika Goyal
Quoted 15 lines · Julia Lawall
Quoted 7 lines · Bhumika Goyal
Some type conversions like casting a pointer to a pointer of same type, casting to the original type using
addressof(&)operator etc. are not needed. Therefore, remove them. Done using coccinelle:@@
type t;
t *p,a;It makes no particular sense, but currently in Coccinelle, the * in the metavariable declaration applies to all of the declared variables.
Quoted 8 lines
Quoted 4 lines
Quoted 3 lines
To avoid this problem, could you make separate declarations for p and a, and try again?
Oh, I didn't know that. Thanks for telling. I will modify the script then.
You should actually run the script again, and not just change the commit message, because you may get different results.
Yes, I meant this only. I will run the script again and then commit a v2.
Thanks,
Bhumika
Quoted 136 lines
julia
Quoted 134 lines
Thanks,
BhumikaQuoted 115 lines
thanks,
juliaQuoted 112 lines
@@
(
- (t)(a)
+ a
|
- (t *)(p)
+ p
|
- (t *)(&a)
+ &a
)Signed-off-by Bhumika Goyal <[email protected]>--- drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c | 2 +- drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 6 +++--- drivers/staging/rtl8192u/r8192U_core.c | 3 +-- drivers/staging/rtl8192u/r8192U_dm.c | 6 +++--- 4 files changed, 8 insertions(+), 9 deletions(-)drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c +1
-1@@ -806,7 +806,7 @@ static struct sk_buff *ieee80211_probe_resp(struct ieee80211_device *ieee, u8 *d *(tag++) =2 ;put_unaligned_le16 (ieee->current_network.atim_window, - (u8 *)tag); + tag); tag+=2 ; }drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c +3
-3@@ -354,7 +354,7 @@ int ieee80211_rx_ADDBAReq(struct ieee80211_device *ieee, struct sk_buff *skb) req = (struct rtl_80211_hdr_3addr *) skb->data; tag = (u8 *)req; - dst = (u8 *)(&req->addr2[0 ]); + dst = &req->addr2[0 ]; tag +=sizeof (struct rtl_80211_hdr_3addr ); pDialogToken = tag +2 ;//category+action pBaParamSet = (PBA_PARAM_SET )(tag +3 );//+DialogToken @@ -452,7 +452,7 @@ int ieee80211_rx_ADDBARsp(struct ieee80211_device *ieee, struct sk_buff *skb) } rsp = (struct rtl_80211_hdr_3addr *)skb->data; tag = (u8 *)rsp; - dst = (u8 *)(&rsp->addr2[0 ]); + dst = &rsp->addr2[0 ]; tag +=sizeof (struct rtl_80211_hdr_3addr ); pDialogToken = tag +2 ; pStatusCode = (u16 *)(tag +3 );@@ -590,7 +590,7 @@ int ieee80211_rx_DELBA(struct ieee80211_device *ieee, struct sk_buff *skb)IEEE80211_DEBUG_DATA (IEEE80211_DL_DATA |IEEE80211_DL_BA , skb->data, skb->len); delba = (struct rtl_80211_hdr_3addr *)skb->data; - dst = (u8 *)(&delba->addr2[0 ]); + dst = &delba->addr2[0 ]; pDelBaParamSet = (PDELBA_PARAM_SET )&delba->payload[2 ];if (pDelBaParamSet->field.Initiator ==1 )drivers/staging/rtl8192u/r8192U_core.c +1
-2@@ -5010,8 +5010,7 @@ static int rtl8192_usb_probe(struct usb_interface *intf, dev->netdev_ops = &rtl8192_netdev_ops; - dev->wireless_handlers = - (struct iw_handler_def *)&r8192_wx_handlers_def; + dev->wireless_handlers = &r8192_wx_handlers_def; dev->type =ARPHRD_ETHER ;drivers/staging/rtl8192u/r8192U_dm.c +3
-4@@ -150,7 +150,7 @@ void deinit_hal_dm(struct net_device *dev)#ifdef USB_RX_AGGREGATION_SUPPORT void dm_CheckRxAggregation (struct net_device *dev) { -struct r8192_priv *priv =ieee80211_priv ((struct net_device *)dev); +struct r8192_priv *priv =ieee80211_priv (dev);PRT_HIGH_THROUGHPUT pHTInfo = priv->ieee80211->pHTInfo;static unsigned long lastTxOkCnt;static unsigned long lastRxOkCnt;@@ -2346,7 +2346,7 @@ dm_CheckEdcaTurbo_EXIT:static void dm_init_ctstoself (struct net_device *dev) { -struct r8192_priv *priv =ieee80211_priv ((struct net_device *)dev); +struct r8192_priv *priv =ieee80211_priv (dev); priv->ieee80211->bCTSToSelfEnable = true; priv->ieee80211->CTSToSelfTH = CTSToSelfTHVal;@@ -2354,7 +2354,7 @@ static void dm_init_ctstoself(struct net_device *dev)static void dm_ctstoself (struct net_device *dev) { -struct r8192_priv *priv =ieee80211_priv ((struct net_device *)dev); +struct r8192_priv *priv =ieee80211_priv (dev);PRT_HIGH_THROUGHPUT pHTInfo = priv->ieee80211->pHTInfo;static unsigned long lastTxOkCnt;static unsigned long lastRxOkCnt; --1.9.1
Quoted 7 lines
Quoted 7 lines
--
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 [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1474199218-15749-1-git-send-email-bhumirks%40gmail.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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/CAOH%2B1jHDArZjjivS24GN%3D2ocUfvU92zC-P1WLfTJh%3Dgq12dCAg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.