diff options
author | Bhumika Goyal <bhumirks@gmail.com> | 2016-09-18 17:56:24 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-09-20 13:35:45 +0200 |
commit | efdcb35a82fdd6e91b890efd3d5a5d4045e64c08 (patch) | |
tree | 407b2cda9034cf0e42e5344c9a1b3bc90fbcd107 /drivers/staging/rtl8192u/r8192U_core.c | |
parent | 182eec0eb75fc17455ff4d77f5e37ae4f0c5ea1c (diff) |
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;
t a;
@@
(
- (t)(a)
+ a
|
- (t *)(p)
+ p
|
- (t *)(&a)
+ &a
)
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8192u/r8192U_core.c')
-rw-r--r-- | drivers/staging/rtl8192u/r8192U_core.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index cdb64e3e0d18..c66e7cf608c0 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -4472,10 +4472,10 @@ static void rtl8192_query_rxphystatus(struct r8192_priv *priv, */ pstats->SignalQuality = precord_stats->SignalQuality = - (u8)(evm & 0xff); + evm & 0xff; pstats->RxMIMOSignalQuality[i] = precord_stats->RxMIMOSignalQuality[i] = - (u8)(evm & 0xff); + evm & 0xff; } @@ -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; @@ -5219,7 +5218,8 @@ void setKey(struct net_device *dev, u8 EntryNo, u8 KeyIndex, u16 KeyType, } else { /* Key Material */ if (KeyContent) { - write_nic_dword(dev, WCAMI, (u32)(*(KeyContent + i - 2))); + write_nic_dword(dev, WCAMI, + *(KeyContent + i - 2)); write_nic_dword(dev, RWCAM, TargetCommand); } } |