staging: wilc1000: use the real data type
authorJohnny Kim <johnny.kim@atmel.com>
Thu, 20 Aug 2015 07:32:50 +0000 (16:32 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Sep 2015 01:24:30 +0000 (18:24 -0700)
This patch changes the type of gu8FlushedJoinReqDrvHandler with his real
data type becasue typecasting is not necessary. In result, typecasting
which is not necessary and some building warnings is removed.

Signed-off-by: Johnny Kim <johnny.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/host_interface.c

index d411847fcf70412ef2da5a2f313eb9d3b64fb728..83abe78dd3a4ae4b030ecbc2b7c9fccab2bf3e43 100644 (file)
@@ -578,7 +578,7 @@ u8 gu8Flushed11iMode;
 u8 gu8FlushedAuthType;
 u32 gu32FlushedJoinReqSize;
 u32 gu32FlushedInfoElemAsocSize;
-u32 gu8FlushedJoinReqDrvHandler;
+tstrWILC_WFIDrv *gu8FlushedJoinReqDrvHandler;
 #define REAL_JOIN_REQ 0
 #define FLUSHED_JOIN_REQ 1
 #define FLUSHED_BYTE_POS 79     /* Position the byte indicating flushing in the flushed request */
@@ -1940,7 +1940,7 @@ static s32 Handle_Connect(tstrWILC_WFIDrv *drvHandler, tstrHostIFconnectAttr *ps
        /*BugID_5137*/
        if (memcmp("DIRECT-", pstrHostIFconnectAttr->pu8ssid, 7)) {
                memcpy(gu8FlushedJoinReq, pu8CurrByte, gu32FlushedJoinReqSize);
-               gu8FlushedJoinReqDrvHandler = (u32)pstrWFIDrv;
+               gu8FlushedJoinReqDrvHandler = pstrWFIDrv;
        }
 
        PRINT_D(GENERIC_DBG, "send HOST_IF_WAITING_CONN_RESP\n");
@@ -2191,11 +2191,11 @@ static s32 Handle_ConnectTimeout(tstrWILC_WFIDrv *drvHandler)
        memset(u8ConnectedSSID, 0, ETH_ALEN);
        /*BugID_5213*/
        /*Freeing flushed join request params on connect timeout*/
-       if (gu8FlushedJoinReq != NULL && gu8FlushedJoinReqDrvHandler == (u32)drvHandler) {
+       if (gu8FlushedJoinReq != NULL && gu8FlushedJoinReqDrvHandler == drvHandler) {
                kfree(gu8FlushedJoinReq);
                gu8FlushedJoinReq = NULL;
        }
-       if (gu8FlushedInfoElemAsoc != NULL && gu8FlushedJoinReqDrvHandler == (u32)drvHandler) {
+       if (gu8FlushedInfoElemAsoc != NULL && gu8FlushedJoinReqDrvHandler == drvHandler) {
                kfree(gu8FlushedInfoElemAsoc);
                gu8FlushedInfoElemAsoc = NULL;
        }
@@ -2617,11 +2617,11 @@ static s32 Handle_RcvdGnrlAsyncInfo(tstrWILC_WFIDrv *drvHandler, tstrRcvdGnrlAsy
                        /*BugID_5213*/
                        /*Freeing flushed join request params on receiving*/
                        /*MAC_DISCONNECTED while connected*/
-                       if (gu8FlushedJoinReq != NULL && gu8FlushedJoinReqDrvHandler == (u32)drvHandler) {
+                       if (gu8FlushedJoinReq != NULL && gu8FlushedJoinReqDrvHandler == drvHandler) {
                                kfree(gu8FlushedJoinReq);
                                gu8FlushedJoinReq = NULL;
                        }
-                       if (gu8FlushedInfoElemAsoc != NULL && gu8FlushedJoinReqDrvHandler == (u32)drvHandler) {
+                       if (gu8FlushedInfoElemAsoc != NULL && gu8FlushedJoinReqDrvHandler == drvHandler) {
                                kfree(gu8FlushedInfoElemAsoc);
                                gu8FlushedInfoElemAsoc = NULL;
                        }
@@ -3117,11 +3117,11 @@ static void Handle_Disconnect(tstrWILC_WFIDrv *drvHandler)
 
 
                /*BugID_5137*/
-               if (gu8FlushedJoinReq != NULL && gu8FlushedJoinReqDrvHandler == (u32)drvHandler) {
+               if (gu8FlushedJoinReq != NULL && gu8FlushedJoinReqDrvHandler == drvHandler) {
                        kfree(gu8FlushedJoinReq);
                        gu8FlushedJoinReq = NULL;
                }
-               if (gu8FlushedInfoElemAsoc != NULL && gu8FlushedJoinReqDrvHandler == (u32)drvHandler) {
+               if (gu8FlushedInfoElemAsoc != NULL && gu8FlushedJoinReqDrvHandler == drvHandler) {
                        kfree(gu8FlushedInfoElemAsoc);
                        gu8FlushedInfoElemAsoc = NULL;
                }