* [PATCH] staging: rtl8192u: r8192U_core.c: Cleaning up unclear and confusing code
@ 2014-06-15 15:14 Rickard Strandqvist
2014-06-15 15:14 ` Rickard Strandqvist
0 siblings, 1 reply; 2+ messages in thread
From: Rickard Strandqvist @ 2014-06-15 15:14 UTC (permalink / raw)
To: Greg Kroah-Hartman, Peter P Waskiewicz Jr
Cc: Rickard Strandqvist, Ana Rey, Andrea Merello, Teodora Baluta,
Chi Pham, Himangi Saraogi, Xenia Ragiadakou, devel, linux-kernel
Removes confusing and unclear code.
Using memcpy to set a pointer, what is the point?
The use of &= instead of & fills no benefit in this case.
None of these is a direct error, but I think you should replace the confusing code.
Rickard Strandqvist (1):
staging: rtl8192u: r8192U_core.c: Cleaning up unclear and confusing code
drivers/staging/rtl8192u/r8192U_core.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
--
1.7.10.4
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] staging: rtl8192u: r8192U_core.c: Cleaning up unclear and confusing code
2014-06-15 15:14 [PATCH] staging: rtl8192u: r8192U_core.c: Cleaning up unclear and confusing code Rickard Strandqvist
@ 2014-06-15 15:14 ` Rickard Strandqvist
0 siblings, 0 replies; 2+ messages in thread
From: Rickard Strandqvist @ 2014-06-15 15:14 UTC (permalink / raw)
To: Greg Kroah-Hartman, Peter P Waskiewicz Jr
Cc: Rickard Strandqvist, Ana Rey, Andrea Merello, Teodora Baluta,
Chi Pham, Himangi Saraogi, Xenia Ragiadakou, devel, linux-kernel
Removes confusing and unclear code.
Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
---
drivers/staging/rtl8192u/r8192U_core.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index 1bb6143..fd8f37f 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -1245,12 +1245,11 @@ u8 DrvAggr_GetAggregatibleList(struct net_device *dev, struct sk_buff *skb,
static void rtl8192_tx_isr(struct urb *tx_urb)
{
struct sk_buff *skb = (struct sk_buff *)tx_urb->context;
- struct net_device *dev = NULL;
+ struct net_device *dev = (struct net_device *)(skb->cb);
struct r8192_priv *priv = NULL;
cb_desc *tcb_desc = (cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE);
u8 queue_index = tcb_desc->queue_index;
- memcpy(&dev, (struct net_device *)(skb->cb), sizeof(struct net_device *));
priv = ieee80211_priv(dev);
if (tcb_desc->queue_index != TXCMD_QUEUE) {
@@ -1408,7 +1407,7 @@ static void rtl8192_net_update(struct net_device *dev)
net = &priv->ieee80211->current_network;
rtl8192_config_rate(dev, &rate_config);
- priv->basic_rate = rate_config &= 0x15f;
+ priv->basic_rate = rate_config & 0x15f;
write_nic_dword(dev, BSSIDR, ((u32 *)net->bssid)[0]);
write_nic_word(dev, BSSIDR+4, ((u16 *)net->bssid)[2]);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-06-15 15:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-15 15:14 [PATCH] staging: rtl8192u: r8192U_core.c: Cleaning up unclear and confusing code Rickard Strandqvist
2014-06-15 15:14 ` Rickard Strandqvist
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.