* [PATCH] Staging: rtl8192e: rtllib_softmac: Remove useless cast
@ 2015-10-14 18:16 Shivani Bhardwaj
0 siblings, 0 replies; only message in thread
From: Shivani Bhardwaj @ 2015-10-14 18:16 UTC (permalink / raw)
To: outreachy-kernel
Explicit type conversion is not required to remove it.
Semantic patch used:
@@
type T;
T e;
identifier x;
@@
* T x = (T)e;
Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
---
drivers/staging/rtl8192e/rtllib_softmac.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
index 3bc4223..d0fedb0 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac.c
@@ -1520,8 +1520,7 @@ static void rtllib_associate_complete_wq(void *data)
container_of_work_rsl(data,
struct rtllib_device,
associate_complete_wq);
- struct rt_pwr_save_ctrl *pPSC = (struct rt_pwr_save_ctrl *)
- (&(ieee->PowerSaveControl));
+ struct rt_pwr_save_ctrl *pPSC = &(ieee->PowerSaveControl);
netdev_info(ieee->dev, "Associated successfully\n");
if (!ieee->is_silent_reset) {
netdev_info(ieee->dev, "normal associate\n");
@@ -1974,8 +1973,7 @@ static short rtllib_sta_ps_sleep(struct rtllib_device *ieee, u64 *time)
{
int timeout = ieee->ps_timeout;
u8 dtim;
- struct rt_pwr_save_ctrl *pPSC = (struct rt_pwr_save_ctrl *)
- (&(ieee->PowerSaveControl));
+ struct rt_pwr_save_ctrl *pPSC = &(ieee->PowerSaveControl);
if (ieee->LPSDelayCnt) {
ieee->LPSDelayCnt--;
--
2.1.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-10-14 18:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-14 18:16 [PATCH] Staging: rtl8192e: rtllib_softmac: Remove useless cast Shivani Bhardwaj
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.