All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/28] removing the compile warnings for 64-bit
@ 2015-07-31  7:38 Tony Cho
  2015-07-31  7:38 ` [PATCH 01/28] staging: wilc1000: change type of driver handler in host interface msg Tony Cho
                   ` (28 more replies)
  0 siblings, 29 replies; 35+ messages in thread
From: Tony Cho @ 2015-07-31  7:38 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, johnny.kim, chris.park, rachel.kim,
	austin.shin, tony.cho, glen.lee, leo.kim, jude.lee, robin.hwang,
	Nicolas.FERRE

Hi Greg,
This patch focuses on removing the compile warnings for 64bit incompatability.
Most warnings are due to senseless type castings from driver handler to u32 and
also to void pointers. They are removed by using the same handler with this
series of patch. All warnings disappear.

This patch is the first step to resolve many issues which the driver contains.
Please review and advise me.

Thanks,
Tony.

glen lee (28):
  staging: wilc1000: change type of driver handler in host interface msg
  staging: wilc1000: change void type of argument with WILC_WFIDrvHandle
  staging: wilc1000: move structure WILC_WFIDrvHandle into
    wilc_wlan_if.h
  staging: wilc1000: change type of argument 5 in SendConfigPkt
  staging: wilc1000: remove unnecessary type cast
  staging: wilc1000: chage driver handler variable in SendConfigPkt
  staging: wilc1000: remove unused variables
  staging: wilc1000: change drvHandler type in wlan_cfg_get
  staging: wilc1000: change drvHandler type in wlan_cfg_set
  staging: wilc1000: change driver handle variable
  staging: wilc1000: fix incompatible type in assignment warning
  staging: wilc1000: change type of driver handler in tstrInterfaceInfo
  staging: wilc1000: change type of argument in
    host_int_set_wfi_drv_handler
  staging: wilc1000: remove unnecessary type cast in
    host_int_set_wfi_drv_handler
  staging: wilc1000: fix cast from pointer to integer warning
  staging: wilc1000: change type of variable
  staging: wilc1000: fix comparison between different type warning
  staging: wilc1000: change pstrWFIDrv with drvHandler
  staging: wilc1000: change type of variable in tstrHostIfSetDrvHandler
  staging: wilc1000: remove unnecessary type case
  staging: wilc1000: remove unwanted type cast
  staging: wilc1000: fix passing argument from incompatible type warning
  staging: wilc1000: change type of parameter in wilc_wlan_cfg_commit
  staging: wilc1000: fix cast from pointer to integer warning
  staging: wilc1000: change cast type from pointer to uintptr_t
  staging: wilc1000: remove unused variable
  staging: wilc1000: fix casting build warning
  staging: wilc1000: change data type of variable

 drivers/staging/wilc1000/coreconfigurator.c       |   2 +-
 drivers/staging/wilc1000/coreconfigurator.h       |   2 +-
 drivers/staging/wilc1000/host_interface.c         | 232 ++++++++++------------
 drivers/staging/wilc1000/host_interface.h         |   9 +-
 drivers/staging/wilc1000/linux_wlan.c             |   8 +-
 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c |   4 +-
 drivers/staging/wilc1000/wilc_wfi_netdevice.h     |   2 +-
 drivers/staging/wilc1000/wilc_wlan.c              |   8 +-
 drivers/staging/wilc1000/wilc_wlan_if.h           |   8 +-
 9 files changed, 130 insertions(+), 145 deletions(-)

-- 
1.9.1


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH 01/28] staging: wilc1000: change type of driver handler in host interface msg
  2015-07-31  7:38 [PATCH 00/28] removing the compile warnings for 64-bit Tony Cho
@ 2015-07-31  7:38 ` Tony Cho
  2015-07-31 20:46   ` Greg KH
  2015-07-31  7:38 ` [PATCH 02/28] staging: wilc1000: change void type of argument with WILC_WFIDrvHandle Tony Cho
                   ` (27 subsequent siblings)
  28 siblings, 1 reply; 35+ messages in thread
From: Tony Cho @ 2015-07-31  7:38 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, johnny.kim, chris.park, rachel.kim,
	austin.shin, tony.cho, glen.lee, leo.kim, jude.lee, robin.hwang,
	Nicolas.FERRE

From: glen lee <glen.lee@atmel.com>

This patch changes void pointer type of drvHandler with WILC_WFIDrvHandle
type variable since the structure member drvHandler in tstrHostIFmsg is
explicitly used to pass driver pointer as handler.
The void pointer as argument is ambiguous for the functions to handle correctly.

After this patch, ATWILC_WFIDrvHandle type will be used as handler type to
interface with other functions which does not need to know all about wifi driver
structre tstrATWILC_WFIDrv.
As a consequence of this patch, several patches will be followed up to change
type of parameter which take drvHandler as argument.

Signed-off-by: glen lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
---
 drivers/staging/wilc1000/host_interface.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 02aaf39..fb4194a 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -467,7 +467,7 @@ typedef union _tuniHostIFmsgBody {
 typedef struct _tstrHostIFmsg {
 	u16 u16MsgId;                                           /*!< Message ID */
 	tuniHostIFmsgBody uniHostIFmsgBody;             /*!< Message body */
-	void *drvHandler;
+	WILC_WFIDrvHandle drvHandler;
 } tstrHostIFmsg;
 
 #ifdef CONNECT_DIRECT
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 02/28] staging: wilc1000: change void type of argument with WILC_WFIDrvHandle
  2015-07-31  7:38 [PATCH 00/28] removing the compile warnings for 64-bit Tony Cho
  2015-07-31  7:38 ` [PATCH 01/28] staging: wilc1000: change type of driver handler in host interface msg Tony Cho
@ 2015-07-31  7:38 ` Tony Cho
  2015-07-31 20:46   ` Greg KH
  2015-07-31  7:38 ` [PATCH 03/28] staging: wilc1000: move structure WILC_WFIDrvHandle into wilc_wlan_if.h Tony Cho
                   ` (26 subsequent siblings)
  28 siblings, 1 reply; 35+ messages in thread
From: Tony Cho @ 2015-07-31  7:38 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, johnny.kim, chris.park, rachel.kim,
	austin.shin, tony.cho, glen.lee, leo.kim, jude.lee, robin.hwang,
	Nicolas.FERRE

From: glen lee <glen.lee@atmel.com>

This patch changes void pointer type of parameter with WILC_WFIDrvHandle type
in all functions which take drvHandler in tstrHostIFmsg as a function argument
since the type of drvHandler in tstrHostIFmsg was changed with WILC_WFIDrvHandle.

Signed-off-by: glen lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
---
 drivers/staging/wilc1000/host_interface.c | 74 +++++++++++++++----------------
 drivers/staging/wilc1000/host_interface.h |  2 +-
 2 files changed, 38 insertions(+), 38 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index fb4194a..68762d2 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -602,7 +602,7 @@ extern int linux_wlan_get_num_conn_ifcs(void);
  *  @date
  *  @version	1.0
  */
-static s32 Handle_SetChannel(void *drvHandler, tstrHostIFSetChan *pstrHostIFSetChan)
+static s32 Handle_SetChannel(WILC_WFIDrvHandle drvHandler, tstrHostIFSetChan *pstrHostIFSetChan)
 {
 
 	s32 s32Error = WILC_SUCCESS;
@@ -682,7 +682,7 @@ static s32 Handle_SetWfiDrvHandler(tstrHostIfSetDrvHandler *pstrHostIfSetDrvHand
  *  @date
  *  @version	1.0
  */
-static s32 Handle_SetOperationMode(void *drvHandler, tstrHostIfSetOperationMode *pstrHostIfSetOperationMode)
+static s32 Handle_SetOperationMode(WILC_WFIDrvHandle drvHandler, tstrHostIfSetOperationMode *pstrHostIfSetOperationMode)
 {
 
 	s32 s32Error = WILC_SUCCESS;
@@ -727,7 +727,7 @@ static s32 Handle_SetOperationMode(void *drvHandler, tstrHostIfSetOperationMode
  *  @date
  *  @version	1.0
  */
-s32 Handle_set_IPAddress(void *drvHandler, u8 *pu8IPAddr, u8 idx)
+s32 Handle_set_IPAddress(WILC_WFIDrvHandle drvHandler, u8 *pu8IPAddr, u8 idx)
 {
 
 	s32 s32Error = WILC_SUCCESS;
@@ -779,7 +779,7 @@ s32 Handle_set_IPAddress(void *drvHandler, u8 *pu8IPAddr, u8 idx)
  *  @date
  *  @version	1.0
  */
-s32 Handle_get_IPAddress(void *drvHandler, u8 *pu8IPAddr, u8 idx)
+s32 Handle_get_IPAddress(WILC_WFIDrvHandle drvHandler, u8 *pu8IPAddr, u8 idx)
 {
 
 	s32 s32Error = WILC_SUCCESS;
@@ -832,7 +832,7 @@ s32 Handle_get_IPAddress(void *drvHandler, u8 *pu8IPAddr, u8 idx)
  *  @date		November 2013
  *  @version	7.0
  */
-static s32 Handle_SetMacAddress(void *drvHandler, tstrHostIfSetMacAddress *pstrHostIfSetMacAddress)
+static s32 Handle_SetMacAddress(WILC_WFIDrvHandle drvHandler, tstrHostIfSetMacAddress *pstrHostIfSetMacAddress)
 {
 
 	s32 s32Error = WILC_SUCCESS;
@@ -878,7 +878,7 @@ static s32 Handle_SetMacAddress(void *drvHandler, tstrHostIfSetMacAddress *pstrH
  *  @date		JAN 2013
  *  @version	8.0
  */
-static s32 Handle_GetMacAddress(void *drvHandler, tstrHostIfGetMacAddress *pstrHostIfGetMacAddress)
+static s32 Handle_GetMacAddress(WILC_WFIDrvHandle drvHandler, tstrHostIfGetMacAddress *pstrHostIfGetMacAddress)
 {
 
 	s32 s32Error = WILC_SUCCESS;
@@ -915,7 +915,7 @@ static s32 Handle_GetMacAddress(void *drvHandler, tstrHostIfGetMacAddress *pstrH
  *  @date
  *  @version	1.0
  */
-static s32 Handle_CfgParam(void *drvHandler, tstrHostIFCfgParamAttr *strHostIFCfgParamAttr)
+static s32 Handle_CfgParam(WILC_WFIDrvHandle drvHandler, tstrHostIFCfgParamAttr *strHostIFCfgParamAttr)
 {
 	s32 s32Error = WILC_SUCCESS;
 	tstrWID strWIDList[32];
@@ -1239,7 +1239,7 @@ static s32 Handle_wait_msg_q_empty(void)
  *  @date
  *  @version	1.0
  */
-static s32 Handle_Scan(void *drvHandler, tstrHostIFscanAttr *pstrHostIFscanAttr)
+static s32 Handle_Scan(WILC_WFIDrvHandle drvHandler, tstrHostIFscanAttr *pstrHostIFscanAttr)
 {
 	s32 s32Error = WILC_SUCCESS;
 	tstrWID strWIDList[5];
@@ -1410,7 +1410,7 @@ static s32 Handle_Scan(void *drvHandler, tstrHostIFscanAttr *pstrHostIFscanAttr)
  *  @date
  *  @version	1.0
  */
-static s32 Handle_ScanDone(void *drvHandler, tenuScanEvent enuEvent)
+static s32 Handle_ScanDone(WILC_WFIDrvHandle drvHandler, tenuScanEvent enuEvent)
 {
 	s32 s32Error = WILC_SUCCESS;
 
@@ -1470,7 +1470,7 @@ static s32 Handle_ScanDone(void *drvHandler, tenuScanEvent enuEvent)
  *  @version	1.0
  */
 u8 u8ConnectedSSID[6] = {0};
-static s32 Handle_Connect(void *drvHandler, tstrHostIFconnectAttr *pstrHostIFconnectAttr)
+static s32 Handle_Connect(WILC_WFIDrvHandle drvHandler, tstrHostIFconnectAttr *pstrHostIFconnectAttr)
 {
 	tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *) drvHandler;
 	s32 s32Error = WILC_SUCCESS;
@@ -2039,7 +2039,7 @@ static s32 Handle_Connect(void *drvHandler, tstrHostIFconnectAttr *pstrHostIFcon
  *  @version		8.0
  */
 
-static s32 Handle_FlushConnect(void *drvHandler)
+static s32 Handle_FlushConnect(WILC_WFIDrvHandle drvHandler)
 {
 	s32 s32Error = WILC_SUCCESS;
 	tstrWID strWIDList[5];
@@ -2106,7 +2106,7 @@ static s32 Handle_FlushConnect(void *drvHandler)
  *  @date
  *  @version	1.0
  */
-static s32 Handle_ConnectTimeout(void *drvHandler)
+static s32 Handle_ConnectTimeout(WILC_WFIDrvHandle drvHandler)
 {
 	s32 s32Error = WILC_SUCCESS;
 	tstrConnectInfo strConnectInfo;
@@ -2214,7 +2214,7 @@ static s32 Handle_ConnectTimeout(void *drvHandler)
  *  @date
  *  @version	1.0
  */
-static s32 Handle_RcvdNtwrkInfo(void *drvHandler, tstrRcvdNetworkInfo *pstrRcvdNetworkInfo)
+static s32 Handle_RcvdNtwrkInfo(WILC_WFIDrvHandle drvHandler, tstrRcvdNetworkInfo *pstrRcvdNetworkInfo)
 {
 	u32 i;
 	bool bNewNtwrkFound;
@@ -2336,7 +2336,7 @@ done:
  *  @date
  *  @version	1.0
  */
-static s32 Handle_RcvdGnrlAsyncInfo(void *drvHandler, tstrRcvdGnrlAsyncInfo *pstrRcvdGnrlAsyncInfo)
+static s32 Handle_RcvdGnrlAsyncInfo(WILC_WFIDrvHandle drvHandler, tstrRcvdGnrlAsyncInfo *pstrRcvdGnrlAsyncInfo)
 {
 	/* TODO: mostafa: till now, this function just handles only the received mac status msg, */
 	/*				 which carries only 1 WID which have WID ID = WID_STATUS */
@@ -2666,7 +2666,7 @@ static s32 Handle_RcvdGnrlAsyncInfo(void *drvHandler, tstrRcvdGnrlAsyncInfo *pst
  *  @date
  *  @version	1.0
  */
-static int Handle_Key(void *drvHandler, tstrHostIFkeyAttr *pstrHostIFkeyAttr)
+static int Handle_Key(WILC_WFIDrvHandle drvHandler, tstrHostIFkeyAttr *pstrHostIFkeyAttr)
 {
 	s32 s32Error = WILC_SUCCESS;
 	tstrWID strWID;
@@ -3029,7 +3029,7 @@ _WPAPtk_end_case_:
  *  @date
  *  @version	1.0
  */
-static void Handle_Disconnect(void *drvHandler)
+static void Handle_Disconnect(WILC_WFIDrvHandle drvHandler)
 {
 	tstrWID strWID;
 
@@ -3142,7 +3142,7 @@ static void Handle_Disconnect(void *drvHandler)
 }
 
 
-void resolve_disconnect_aberration(void *drvHandler)
+void resolve_disconnect_aberration(WILC_WFIDrvHandle drvHandler)
 {
 	tstrWILC_WFIDrv *pstrWFIDrv;
 
@@ -3154,7 +3154,7 @@ void resolve_disconnect_aberration(void *drvHandler)
 		host_int_disconnect((WILC_WFIDrvHandle)pstrWFIDrv, 1);
 	}
 }
-static s32 Switch_Log_Terminal(void *drvHandler)
+static s32 Switch_Log_Terminal(WILC_WFIDrvHandle drvHandler)
 {
 
 
@@ -3198,7 +3198,7 @@ static s32 Switch_Log_Terminal(void *drvHandler)
  *  @date
  *  @version	1.0
  */
-static s32 Handle_GetChnl(void *drvHandler)
+static s32 Handle_GetChnl(WILC_WFIDrvHandle drvHandler)
 {
 
 	s32 s32Error = WILC_SUCCESS;
@@ -3243,7 +3243,7 @@ static s32 Handle_GetChnl(void *drvHandler)
  *  @date
  *  @version	1.0
  */
-static void Handle_GetRssi(void *drvHandler)
+static void Handle_GetRssi(WILC_WFIDrvHandle drvHandler)
 {
 	s32 s32Error = WILC_SUCCESS;
 	tstrWID strWID;
@@ -3273,7 +3273,7 @@ static void Handle_GetRssi(void *drvHandler)
 }
 
 
-static void Handle_GetLinkspeed(void *drvHandler)
+static void Handle_GetLinkspeed(WILC_WFIDrvHandle drvHandler)
 {
 	s32 s32Error = WILC_SUCCESS;
 	tstrWID strWID;
@@ -3303,7 +3303,7 @@ static void Handle_GetLinkspeed(void *drvHandler)
 
 }
 
-s32 Handle_GetStatistics(void *drvHandler, tstrStatistics *pstrStatistics)
+s32 Handle_GetStatistics(WILC_WFIDrvHandle drvHandler, tstrStatistics *pstrStatistics)
 {
 	tstrWID strWIDList[5];
 	uint32_t u32WidsCount = 0, s32Error = 0;
@@ -3364,7 +3364,7 @@ s32 Handle_GetStatistics(void *drvHandler, tstrStatistics *pstrStatistics)
  *  @date
  *  @version	1.0
  */
-static s32 Handle_Get_InActiveTime(void *drvHandler, tstrHostIfStaInactiveT *strHostIfStaInactiveT)
+static s32 Handle_Get_InActiveTime(WILC_WFIDrvHandle drvHandler, tstrHostIfStaInactiveT *strHostIfStaInactiveT)
 {
 
 	s32 s32Error = WILC_SUCCESS;
@@ -3433,7 +3433,7 @@ static s32 Handle_Get_InActiveTime(void *drvHandler, tstrHostIfStaInactiveT *str
  *  @date
  *  @version	1.0
  */
-static void Handle_AddBeacon(void *drvHandler, tstrHostIFSetBeacon *pstrSetBeaconParam)
+static void Handle_AddBeacon(WILC_WFIDrvHandle drvHandler, tstrHostIFSetBeacon *pstrSetBeaconParam)
 {
 	s32 s32Error = WILC_SUCCESS;
 	tstrWID strWID;
@@ -3505,7 +3505,7 @@ static void Handle_AddBeacon(void *drvHandler, tstrHostIFSetBeacon *pstrSetBeaco
  *  @date
  *  @version	1.0
  */
-static void Handle_DelBeacon(void *drvHandler, tstrHostIFDelBeacon *pstrDelBeacon)
+static void Handle_DelBeacon(WILC_WFIDrvHandle drvHandler, tstrHostIFDelBeacon *pstrDelBeacon)
 {
 	s32 s32Error = WILC_SUCCESS;
 	tstrWID strWID;
@@ -3602,7 +3602,7 @@ static u32 WILC_HostIf_PackStaParam(u8 *pu8Buffer, tstrWILC_AddStaParam *pstrSta
  *  @date
  *  @version	1.0
  */
-static void Handle_AddStation(void *drvHandler, tstrWILC_AddStaParam *pstrStationParam)
+static void Handle_AddStation(WILC_WFIDrvHandle drvHandler, tstrWILC_AddStaParam *pstrStationParam)
 {
 	s32 s32Error = WILC_SUCCESS;
 	tstrWID strWID;
@@ -3645,7 +3645,7 @@ static void Handle_AddStation(void *drvHandler, tstrWILC_AddStaParam *pstrStatio
  *  @date
  *  @version	1.0
  */
-static void Handle_DelAllSta(void *drvHandler, tstrHostIFDelAllSta *pstrDelAllStaParam)
+static void Handle_DelAllSta(WILC_WFIDrvHandle drvHandler, tstrHostIFDelAllSta *pstrDelAllStaParam)
 {
 	s32 s32Error = WILC_SUCCESS;
 
@@ -3704,7 +3704,7 @@ static void Handle_DelAllSta(void *drvHandler, tstrHostIFDelAllSta *pstrDelAllSt
  *  @date
  *  @version	1.0
  */
-static void Handle_DelStation(void *drvHandler, tstrHostIFDelSta *pstrDelStaParam)
+static void Handle_DelStation(WILC_WFIDrvHandle drvHandler, tstrHostIFDelSta *pstrDelStaParam)
 {
 	s32 s32Error = WILC_SUCCESS;
 	tstrWID strWID;
@@ -3749,7 +3749,7 @@ static void Handle_DelStation(void *drvHandler, tstrHostIFDelSta *pstrDelStaPara
  *  @date
  *  @version	1.0
  */
-static void Handle_EditStation(void *drvHandler, tstrWILC_AddStaParam *pstrStationParam)
+static void Handle_EditStation(WILC_WFIDrvHandle drvHandler, tstrWILC_AddStaParam *pstrStationParam)
 {
 	s32 s32Error = WILC_SUCCESS;
 	tstrWID strWID;
@@ -3794,7 +3794,7 @@ static void Handle_EditStation(void *drvHandler, tstrWILC_AddStaParam *pstrStati
  *  @date
  *  @version	1.0
  */
-static int Handle_RemainOnChan(void *drvHandler, tstrHostIfRemainOnChan *pstrHostIfRemainOnChan)
+static int Handle_RemainOnChan(WILC_WFIDrvHandle drvHandler, tstrHostIfRemainOnChan *pstrHostIfRemainOnChan)
 {
 	s32 s32Error = WILC_SUCCESS;
 	u8 u8remain_on_chan_flag;
@@ -3873,7 +3873,7 @@ static int Handle_RemainOnChan(void *drvHandler, tstrHostIfRemainOnChan *pstrHos
  *  @date
  *  @version	1.0
  */
-static int Handle_RegisterFrame(void *drvHandler, tstrHostIfRegisterFrame *pstrHostIfRegisterFrame)
+static int Handle_RegisterFrame(WILC_WFIDrvHandle drvHandler, tstrHostIfRegisterFrame *pstrHostIfRegisterFrame)
 {
 	s32 s32Error = WILC_SUCCESS;
 	tstrWID strWID;
@@ -3925,7 +3925,7 @@ static int Handle_RegisterFrame(void *drvHandler, tstrHostIfRegisterFrame *pstrH
  *  @version		1.0
  */
 #define FALSE_FRMWR_CHANNEL 100
-static u32 Handle_ListenStateExpired(void *drvHandler, tstrHostIfRemainOnChan *pstrHostIfRemainOnChan)
+static u32 Handle_ListenStateExpired(WILC_WFIDrvHandle drvHandler, tstrHostIfRemainOnChan *pstrHostIfRemainOnChan)
 {
 	u8 u8remain_on_chan_flag;
 	tstrWID strWID;
@@ -4016,7 +4016,7 @@ static void ListenTimerCB(void *pvArg)
  *  @date
  *  @version	1.0
  */
-static void Handle_PowerManagement(void *drvHandler, tstrHostIfPowerMgmtParam *strPowerMgmtParam)
+static void Handle_PowerManagement(WILC_WFIDrvHandle drvHandler, tstrHostIfPowerMgmtParam *strPowerMgmtParam)
 {
 	s32 s32Error = WILC_SUCCESS;
 	tstrWID strWID;
@@ -4058,7 +4058,7 @@ static void Handle_PowerManagement(void *drvHandler, tstrHostIfPowerMgmtParam *s
  *  @date
  *  @version	1.0
  */
-static void Handle_SetMulticastFilter(void *drvHandler, tstrHostIFSetMulti *strHostIfSetMulti)
+static void Handle_SetMulticastFilter(WILC_WFIDrvHandle drvHandler, tstrHostIFSetMulti *strHostIfSetMulti)
 {
 	s32 s32Error = WILC_SUCCESS;
 	tstrWID strWID;
@@ -4112,7 +4112,7 @@ static void Handle_SetMulticastFilter(void *drvHandler, tstrHostIFSetMulti *strH
  *  @date			Feb. 2014
  *  @version		9.0
  */
-static s32 Handle_AddBASession(void *drvHandler, tstrHostIfBASessionInfo *strHostIfBASessionInfo)
+static s32 Handle_AddBASession(WILC_WFIDrvHandle drvHandler, tstrHostIfBASessionInfo *strHostIfBASessionInfo)
 {
 	s32 s32Error = WILC_SUCCESS;
 	tstrWID strWID;
@@ -4200,7 +4200,7 @@ static s32 Handle_AddBASession(void *drvHandler, tstrHostIfBASessionInfo *strHos
  *  @date			Feb. 2013
  *  @version		9.0
  */
-static s32 Handle_DelBASession(void *drvHandler, tstrHostIfBASessionInfo *strHostIfBASessionInfo)
+static s32 Handle_DelBASession(WILC_WFIDrvHandle drvHandler, tstrHostIfBASessionInfo *strHostIfBASessionInfo)
 {
 	s32 s32Error = WILC_SUCCESS;
 	tstrWID strWID;
@@ -4270,7 +4270,7 @@ static s32 Handle_DelBASession(void *drvHandler, tstrHostIfBASessionInfo *strHos
  *  @date			Feb. 2013
  *  @version		9.0
  */
-static s32 Handle_DelAllRxBASessions(void *drvHandler, tstrHostIfBASessionInfo *strHostIfBASessionInfo)
+static s32 Handle_DelAllRxBASessions(WILC_WFIDrvHandle drvHandler, tstrHostIfBASessionInfo *strHostIfBASessionInfo)
 {
 	s32 s32Error = WILC_SUCCESS;
 	tstrWID strWID;
diff --git a/drivers/staging/wilc1000/host_interface.h b/drivers/staging/wilc1000/host_interface.h
index cdfb43a..7699650 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -1262,7 +1262,7 @@ s32 host_int_frame_register(WILC_WFIDrvHandle hWFIDrv, u16 u16FrameType, bool bR
 s32 host_int_set_wfi_drv_handler(u32 u32address);
 s32 host_int_set_operation_mode(WILC_WFIDrvHandle hWFIDrv, u32 u32mode);
 
-static s32 Handle_ScanDone(void *drvHandler, tenuScanEvent enuEvent);
+static s32 Handle_ScanDone(WILC_WFIDrvHandle drvHandler, tenuScanEvent enuEvent);
 
 static int host_int_addBASession(WILC_WFIDrvHandle hWFIDrv, char *pBSSID, char TID, short int BufferSize,
 				 short int SessionTimeout, void *drvHandler);
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 03/28] staging: wilc1000: move structure WILC_WFIDrvHandle into wilc_wlan_if.h
  2015-07-31  7:38 [PATCH 00/28] removing the compile warnings for 64-bit Tony Cho
  2015-07-31  7:38 ` [PATCH 01/28] staging: wilc1000: change type of driver handler in host interface msg Tony Cho
  2015-07-31  7:38 ` [PATCH 02/28] staging: wilc1000: change void type of argument with WILC_WFIDrvHandle Tony Cho
@ 2015-07-31  7:38 ` Tony Cho
  2015-07-31  7:38 ` [PATCH 04/28] staging: wilc1000: change type of argument 5 in SendConfigPkt Tony Cho
                   ` (25 subsequent siblings)
  28 siblings, 0 replies; 35+ messages in thread
From: Tony Cho @ 2015-07-31  7:38 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, johnny.kim, chris.park, rachel.kim,
	austin.shin, tony.cho, glen.lee, leo.kim, jude.lee, robin.hwang,
	Nicolas.FERRE

From: glen lee <glen.lee@atmel.com>

This patch moves the structure WILC_WFIDrvHandle into wilc_wlan_if.h

As all the functions which take drive handler as argument will use WILC_WFIDrvHandle
type instead of u32 type that makes compile warning due to type difference,
move it into wilc_wlan_if which is common wilc header file.

Signed-off-by: glen lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
---
 drivers/staging/wilc1000/host_interface.h | 3 ---
 drivers/staging/wilc1000/wilc_wlan_if.h   | 4 ++++
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.h b/drivers/staging/wilc1000/host_interface.h
index 7699650..617f105 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -212,9 +212,6 @@ typedef void (*tWILCpfRemainOnChanReady)(void *); /*Remain on channel callback f
 #endif
 
 /* typedef u32 WILC_WFIDrvHandle; */
-typedef struct {
-	s32 s32Dummy;
-} *WILC_WFIDrvHandle;
 
 /*!
  *  @struct             tstrRcvdNetworkInfo
diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h b/drivers/staging/wilc1000/wilc_wlan_if.h
index 8735a6a..ba22d30 100644
--- a/drivers/staging/wilc1000/wilc_wlan_if.h
+++ b/drivers/staging/wilc1000/wilc_wlan_if.h
@@ -63,6 +63,10 @@
  ********************************************/
 
 typedef struct {
+	s32 s32Dummy;
+} *WILC_WFIDrvHandle;
+
+typedef struct {
 	uint32_t read_write: 1;
 	uint32_t function: 3;
 	uint32_t raw: 1;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 04/28] staging: wilc1000: change type of argument 5 in SendConfigPkt
  2015-07-31  7:38 [PATCH 00/28] removing the compile warnings for 64-bit Tony Cho
                   ` (2 preceding siblings ...)
  2015-07-31  7:38 ` [PATCH 03/28] staging: wilc1000: move structure WILC_WFIDrvHandle into wilc_wlan_if.h Tony Cho
@ 2015-07-31  7:38 ` Tony Cho
  2015-07-31  7:38 ` [PATCH 05/28] staging: wilc1000: remove unnecessary type cast Tony Cho
                   ` (24 subsequent siblings)
  28 siblings, 0 replies; 35+ messages in thread
From: Tony Cho @ 2015-07-31  7:38 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, johnny.kim, chris.park, rachel.kim,
	austin.shin, tony.cho, glen.lee, leo.kim, jude.lee, robin.hwang,
	Nicolas.FERRE

From: glen lee <glen.lee@atmel.com>

This patch changes drvHandler of u32 type with WILC_WFIDrvHandle type since
SendConfigPkt function gets WILC_WFIDrvHandle type driver Handler pointer as
argument which makes compile warning.

As the type of parameter changed, associate code will be changed in the next
patches.

Signed-off-by: glen lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
---
 drivers/staging/wilc1000/coreconfigurator.c | 2 +-
 drivers/staging/wilc1000/coreconfigurator.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c
index 342a336..e1928cc 100644
--- a/drivers/staging/wilc1000/coreconfigurator.c
+++ b/drivers/staging/wilc1000/coreconfigurator.c
@@ -1986,7 +1986,7 @@ extern wilc_wlan_oup_t *gpstrWlanOps;
  *  @version	1.0
  */
 s32 SendConfigPkt(u8 u8Mode, tstrWID *pstrWIDs,
-			  u32 u32WIDsCount, bool bRespRequired, u32 drvHandler)
+			  u32 u32WIDsCount, bool bRespRequired, WILC_WFIDrvHandle drvHandler)
 {
 	s32 counter = 0, ret = 0;
 	if (gpstrWlanOps == NULL) {
diff --git a/drivers/staging/wilc1000/coreconfigurator.h b/drivers/staging/wilc1000/coreconfigurator.h
index 56ff2ba..98b5c49 100644
--- a/drivers/staging/wilc1000/coreconfigurator.h
+++ b/drivers/staging/wilc1000/coreconfigurator.h
@@ -167,7 +167,7 @@ extern s32 CoreConfiguratorInit(void);
 extern s32 CoreConfiguratorDeInit(void);
 
 extern s32 SendConfigPkt(u8 u8Mode, tstrWID *pstrWIDs,
-			 u32 u32WIDsCount, bool bRespRequired, u32 drvHandler);
+			 u32 u32WIDsCount, bool bRespRequired, WILC_WFIDrvHandle drvHandler);
 extern s32 ParseNetworkInfo(u8 *pu8MsgBuffer, tstrNetworkInfo **ppstrNetworkInfo);
 extern s32 DeallocateNetworkInfo(tstrNetworkInfo *pstrNetworkInfo);
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 05/28] staging: wilc1000: remove unnecessary type cast
  2015-07-31  7:38 [PATCH 00/28] removing the compile warnings for 64-bit Tony Cho
                   ` (3 preceding siblings ...)
  2015-07-31  7:38 ` [PATCH 04/28] staging: wilc1000: change type of argument 5 in SendConfigPkt Tony Cho
@ 2015-07-31  7:38 ` Tony Cho
  2015-07-31  7:38 ` [PATCH 06/28] staging: wilc1000: chage driver handler variable in SendConfigPkt Tony Cho
                   ` (23 subsequent siblings)
  28 siblings, 0 replies; 35+ messages in thread
From: Tony Cho @ 2015-07-31  7:38 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, johnny.kim, chris.park, rachel.kim,
	austin.shin, tony.cho, glen.lee, leo.kim, jude.lee, robin.hwang,
	Nicolas.FERRE

From: glen lee <glen.lee@atmel.com>

This patch removes unnecessary type cast since the u32 type of argument 5 in
SendConfigPkt was changed with WILC_WFIDrvHandle. Therefore, No need to cast u32.

Type cast (u32) cause build warning like below.
drivers/staging/wilc1000/host_interface.c:622:54: warning: cast from pointer to
integer of different size [-Wpointer-to-int-cast]
  s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv);

Signed-off-by: glen lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
---
 drivers/staging/wilc1000/host_interface.c | 100 +++++++++++++++---------------
 1 file changed, 50 insertions(+), 50 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 68762d2..265ff68 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -617,7 +617,7 @@ static s32 Handle_SetChannel(WILC_WFIDrvHandle drvHandler, tstrHostIFSetChan *ps
 
 	PRINT_D(HOSTINF_DBG, "Setting channel\n");
 	/*Sending Cfg*/
-	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv);
+	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv);
 	if (s32Error) {
 		PRINT_ER("Failed to set channel\n");
 		WILC_ERRORREPORT(s32Error, WILC_INVALID_STATE);
@@ -654,7 +654,7 @@ static s32 Handle_SetWfiDrvHandler(tstrHostIfSetDrvHandler *pstrHostIfSetDrvHand
 
 	/*Sending Cfg*/
 
-	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv);
+	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv);
 
 
 	if ((pstrHostIfSetDrvHandler->u32Address) == (u32)NULL)
@@ -699,7 +699,7 @@ static s32 Handle_SetOperationMode(WILC_WFIDrvHandle drvHandler, tstrHostIfSetOp
 	/*Sending Cfg*/
 	PRINT_INFO(HOSTINF_DBG, "pstrWFIDrv= %p\n", pstrWFIDrv);
 
-	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv);
+	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv);
 
 
 	if ((pstrHostIfSetOperationMode->u32Mode) == (u32)NULL)
@@ -748,7 +748,7 @@ s32 Handle_set_IPAddress(WILC_WFIDrvHandle drvHandler, u8 *pu8IPAddr, u8 idx)
 	strWID.ps8WidVal = (u8 *)pu8IPAddr;
 	strWID.s32ValueSize = IP_ALEN;
 
-	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv);
+	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv);
 
 
 
@@ -792,7 +792,7 @@ s32 Handle_get_IPAddress(WILC_WFIDrvHandle drvHandler, u8 *pu8IPAddr, u8 idx)
 	strWID.ps8WidVal = (u8 *)WILC_MALLOC(IP_ALEN);
 	strWID.s32ValueSize = IP_ALEN;
 
-	s32Error = SendConfigPkt(GET_CFG, &strWID, 1, true, (u32)pstrWFIDrv);
+	s32Error = SendConfigPkt(GET_CFG, &strWID, 1, true, pstrWFIDrv);
 
 	PRINT_INFO(HOSTINF_DBG, "%pI4\n", strWID.ps8WidVal);
 
@@ -853,7 +853,7 @@ static s32 Handle_SetMacAddress(WILC_WFIDrvHandle drvHandler, tstrHostIfSetMacAd
 	strWID.s32ValueSize = ETH_ALEN;
 	PRINT_D(GENERIC_DBG, "mac addr = :%x:%x:%x:%x:%x:%x\n", strWID.ps8WidVal[0], strWID.ps8WidVal[1], strWID.ps8WidVal[2], strWID.ps8WidVal[3], strWID.ps8WidVal[4], strWID.ps8WidVal[5]);
 	/*Sending Cfg*/
-	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv);
+	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv);
 	if (s32Error) {
 		PRINT_ER("Failed to set mac address\n");
 		WILC_ERRORREPORT(s32Error, WILC_FAIL);
@@ -891,7 +891,7 @@ static s32 Handle_GetMacAddress(WILC_WFIDrvHandle drvHandler, tstrHostIfGetMacAd
 	strWID.s32ValueSize = ETH_ALEN;
 
 	/*Sending Cfg*/
-	s32Error = SendConfigPkt(GET_CFG, &strWID, 1, false, (u32)drvHandler);
+	s32Error = SendConfigPkt(GET_CFG, &strWID, 1, false, drvHandler);
 	if (s32Error) {
 		PRINT_ER("Failed to get mac address\n");
 		WILC_ERRORREPORT(s32Error, WILC_FAIL);
@@ -1199,7 +1199,7 @@ static s32 Handle_CfgParam(WILC_WFIDrvHandle drvHandler, tstrHostIFCfgParamAttr
 		}
 		u8WidCnt++;
 	}
-	s32Error = SendConfigPkt(SET_CFG, strWIDList, u8WidCnt, false, (u32)pstrWFIDrv);
+	s32Error = SendConfigPkt(SET_CFG, strWIDList, u8WidCnt, false, pstrWFIDrv);
 
 	if (s32Error)
 		PRINT_ER("Error in setting CFG params\n");
@@ -1357,7 +1357,7 @@ static s32 Handle_Scan(WILC_WFIDrvHandle drvHandler, tstrHostIFscanAttr *pstrHos
 		gbScanWhileConnected = false;
 	}
 
-	s32Error = SendConfigPkt(SET_CFG, strWIDList, u32WidsCount, false, (u32)pstrWFIDrv);
+	s32Error = SendConfigPkt(SET_CFG, strWIDList, u32WidsCount, false, pstrWFIDrv);
 
 	if (s32Error) {
 		PRINT_ER("Failed to send scan paramters config packet\n");
@@ -1434,7 +1434,7 @@ static s32 Handle_ScanDone(WILC_WFIDrvHandle drvHandler, tenuScanEvent enuEvent)
 		strWID.s32ValueSize = sizeof(char);
 
 		/*Sending Cfg*/
-		s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv);
+		s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv);
 		if (s32Error != WILC_SUCCESS) {
 			PRINT_ER("Failed to set abort running scan\n");
 			WILC_ERRORREPORT(s32Error, WILC_FAIL);
@@ -1631,7 +1631,7 @@ static s32 Handle_Connect(WILC_WFIDrvHandle drvHandler, tstrHostIFconnectAttr *p
 		gu32WidConnRstHack = 0;
 		/* ////////////////////// */
 
-		s32Error = SendConfigPkt(SET_CFG, strWIDList, u32WidsCount, false, (u32)pstrWFIDrv);
+		s32Error = SendConfigPkt(SET_CFG, strWIDList, u32WidsCount, false, pstrWFIDrv);
 		if (s32Error) {
 			PRINT_ER("Handle_Connect()] failed to send config packet\n");
 			WILC_ERRORREPORT(s32Error, WILC_INVALID_STATE);
@@ -1954,7 +1954,7 @@ static s32 Handle_Connect(WILC_WFIDrvHandle drvHandler, tstrHostIFconnectAttr *p
 		PRINT_D(GENERIC_DBG, "save bssid = %x:%x:%x:%x:%x:%x\n", (u8ConnectedSSID[0]), (u8ConnectedSSID[1]), (u8ConnectedSSID[2]), (u8ConnectedSSID[3]), (u8ConnectedSSID[4]), (u8ConnectedSSID[5]));
 	}
 
-	s32Error = SendConfigPkt(SET_CFG, strWIDList, u32WidsCount, false, (u32)pstrWFIDrv);
+	s32Error = SendConfigPkt(SET_CFG, strWIDList, u32WidsCount, false, pstrWFIDrv);
 	if (s32Error) {
 		PRINT_ER("Handle_Connect()] failed to send config packet\n");
 		WILC_ERRORREPORT(s32Error, WILC_INVALID_STATE);
@@ -2168,7 +2168,7 @@ static s32 Handle_ConnectTimeout(WILC_WFIDrvHandle drvHandler)
 
 	PRINT_D(HOSTINF_DBG, "Sending disconnect request\n");
 
-	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, false, (u32)pstrWFIDrv);
+	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, false, pstrWFIDrv);
 	if (s32Error)
 		PRINT_ER("Failed to send dissconect config packet\n");
 
@@ -2727,7 +2727,7 @@ static int Handle_Key(WILC_WFIDrvHandle drvHandler, tstrHostIFkeyAttr *pstrHostI
 			strWIDList[3].ps8WidVal = (s8 *)pu8keybuf;
 
 
-			s32Error = SendConfigPkt(SET_CFG, strWIDList, 4, true, (u32)pstrWFIDrv);
+			s32Error = SendConfigPkt(SET_CFG, strWIDList, 4, true, pstrWFIDrv);
 			WILC_FREE(pu8keybuf);
 
 
@@ -2755,7 +2755,7 @@ static int Handle_Key(WILC_WFIDrvHandle drvHandler, tstrHostIFkeyAttr *pstrHostI
 			strWID.ps8WidVal	= (s8 *)pu8keybuf;
 			strWID.s32ValueSize = pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwepAttr.u8WepKeylen + 2;
 
-			s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv);
+			s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv);
 			WILC_FREE(pu8keybuf);
 		} else if (pstrHostIFkeyAttr->u8KeyAction & REMOVEKEY)	  {
 
@@ -2767,7 +2767,7 @@ static int Handle_Key(WILC_WFIDrvHandle drvHandler, tstrHostIFkeyAttr *pstrHostI
 			strWID.ps8WidVal = s8idxarray;
 			strWID.s32ValueSize = 1;
 
-			s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv);
+			s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv);
 		} else {
 			strWID.u16WIDid	= (u16)WID_KEY_ID;
 			strWID.enuWIDtype	= WID_CHAR;
@@ -2776,7 +2776,7 @@ static int Handle_Key(WILC_WFIDrvHandle drvHandler, tstrHostIFkeyAttr *pstrHostI
 
 			PRINT_D(HOSTINF_DBG, "Setting default key index\n");
 
-			s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv);
+			s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv);
 		}
 		up(&(pstrWFIDrv->hSemTestKeyBlock));
 		break;
@@ -2822,7 +2822,7 @@ static int Handle_Key(WILC_WFIDrvHandle drvHandler, tstrHostIFkeyAttr *pstrHostI
 			strWIDList[1].ps8WidVal	= (s8 *)pu8keybuf;
 			strWIDList[1].s32ValueSize = RX_MIC_KEY_MSG_LEN;
 
-			s32Error = SendConfigPkt(SET_CFG, strWIDList, 2, true, (u32)pstrWFIDrv);
+			s32Error = SendConfigPkt(SET_CFG, strWIDList, 2, true, pstrWFIDrv);
 
 			WILC_FREE(pu8keybuf);
 
@@ -2869,7 +2869,7 @@ static int Handle_Key(WILC_WFIDrvHandle drvHandler, tstrHostIFkeyAttr *pstrHostI
 			strWID.ps8WidVal	= (s8 *)pu8keybuf;
 			strWID.s32ValueSize = RX_MIC_KEY_MSG_LEN;
 
-			s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv);
+			s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv);
 
 			WILC_FREE(pu8keybuf);
 
@@ -2926,7 +2926,7 @@ _WPARxGtk_end_case_:
 			strWIDList[1].ps8WidVal	= (s8 *)pu8keybuf;
 			strWIDList[1].s32ValueSize = PTK_KEY_MSG_LEN + 1;
 
-			s32Error = SendConfigPkt(SET_CFG, strWIDList, 2, true, (u32)pstrWFIDrv);
+			s32Error = SendConfigPkt(SET_CFG, strWIDList, 2, true, pstrWFIDrv);
 			WILC_FREE(pu8keybuf);
 
 			/* ////////////////////////// */
@@ -2967,7 +2967,7 @@ _WPARxGtk_end_case_:
 			strWID.ps8WidVal	= (s8 *)pu8keybuf;
 			strWID.s32ValueSize = PTK_KEY_MSG_LEN;
 
-			s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv);
+			s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv);
 			WILC_FREE(pu8keybuf);
 
 			/* ////////////////////////// */
@@ -3006,7 +3006,7 @@ _WPAPtk_end_case_:
 		strWID.ps8WidVal = (s8 *)pu8keybuf;
 		strWID.s32ValueSize = (pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFpmkidAttr.numpmkid * PMKSA_KEY_LEN) + 1;
 
-		s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv);
+		s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv);
 
 		WILC_FREE(pu8keybuf);
 		break;
@@ -3055,7 +3055,7 @@ static void Handle_Disconnect(WILC_WFIDrvHandle drvHandler)
 
 	WILC_memset(u8ConnectedSSID, 0, ETH_ALEN);
 
-	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, false, (u32)pstrWFIDrv);
+	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, false, pstrWFIDrv);
 
 	if (s32Error) {
 		PRINT_ER("Failed to send dissconect config packet\n");
@@ -3168,7 +3168,7 @@ static s32 Switch_Log_Terminal(WILC_WFIDrvHandle drvHandler)
 	strWID.ps8WidVal = &dummy;
 	strWID.s32ValueSize = sizeof(char);
 
-	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv);
+	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv);
 
 
 	if (s32Error) {
@@ -3213,7 +3213,7 @@ static s32 Handle_GetChnl(WILC_WFIDrvHandle drvHandler)
 
 	PRINT_D(HOSTINF_DBG, "Getting channel value\n");
 
-	s32Error = SendConfigPkt(GET_CFG, &strWID, 1, true, (u32)pstrWFIDrv);
+	s32Error = SendConfigPkt(GET_CFG, &strWID, 1, true, pstrWFIDrv);
 	/*get the value by searching the local copy*/
 	if (s32Error) {
 		PRINT_ER("Failed to get channel number\n");
@@ -3257,7 +3257,7 @@ static void Handle_GetRssi(WILC_WFIDrvHandle drvHandler)
 	/*Sending Cfg*/
 	PRINT_D(HOSTINF_DBG, "Getting RSSI value\n");
 
-	s32Error = SendConfigPkt(GET_CFG, &strWID, 1, true, (u32)pstrWFIDrv);
+	s32Error = SendConfigPkt(GET_CFG, &strWID, 1, true, pstrWFIDrv);
 	if (s32Error) {
 		PRINT_ER("Failed to get RSSI value\n");
 		WILC_ERRORREPORT(s32Error, WILC_FAIL);
@@ -3288,7 +3288,7 @@ static void Handle_GetLinkspeed(WILC_WFIDrvHandle drvHandler)
 	/*Sending Cfg*/
 	PRINT_D(HOSTINF_DBG, "Getting LINKSPEED value\n");
 
-	s32Error = SendConfigPkt(GET_CFG, &strWID, 1, true, (u32)pstrWFIDrv);
+	s32Error = SendConfigPkt(GET_CFG, &strWID, 1, true, pstrWFIDrv);
 	if (s32Error) {
 		PRINT_ER("Failed to get LINKSPEED value\n");
 		WILC_ERRORREPORT(s32Error, WILC_FAIL);
@@ -3338,7 +3338,7 @@ s32 Handle_GetStatistics(WILC_WFIDrvHandle drvHandler, tstrStatistics *pstrStati
 	strWIDList[u32WidsCount].ps8WidVal = (s8 *)(&(pstrStatistics->u32TxFailureCount));
 	u32WidsCount++;
 
-	s32Error = SendConfigPkt(GET_CFG, strWIDList, u32WidsCount, false, (u32)drvHandler);
+	s32Error = SendConfigPkt(GET_CFG, strWIDList, u32WidsCount, false, drvHandler);
 
 	if (s32Error) {
 		PRINT_ER("Failed to send scan paramters config packet\n");
@@ -3386,7 +3386,7 @@ static s32 Handle_Get_InActiveTime(WILC_WFIDrvHandle drvHandler, tstrHostIfStaIn
 	PRINT_D(CFG80211_DBG, "SETING STA inactive time\n");
 
 
-	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv);
+	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv);
 	/*get the value by searching the local copy*/
 	if (s32Error) {
 		PRINT_ER("Failed to SET incative time\n");
@@ -3400,7 +3400,7 @@ static s32 Handle_Get_InActiveTime(WILC_WFIDrvHandle drvHandler, tstrHostIfStaIn
 	strWID.s32ValueSize = sizeof(u32);
 
 
-	s32Error = SendConfigPkt(GET_CFG, &strWID, 1, true, (u32)pstrWFIDrv);
+	s32Error = SendConfigPkt(GET_CFG, &strWID, 1, true, pstrWFIDrv);
 	/*get the value by searching the local copy*/
 	if (s32Error) {
 		PRINT_ER("Failed to get incative time\n");
@@ -3481,7 +3481,7 @@ static void Handle_AddBeacon(WILC_WFIDrvHandle drvHandler, tstrHostIFSetBeacon *
 
 
 	/*Sending Cfg*/
-	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, false, (u32)pstrWFIDrv);
+	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, false, pstrWFIDrv);
 	if (s32Error) {
 		PRINT_ER("Failed to send add beacon config packet\n");
 		WILC_ERRORREPORT(s32Error, WILC_FAIL);
@@ -3526,7 +3526,7 @@ static void Handle_DelBeacon(WILC_WFIDrvHandle drvHandler, tstrHostIFDelBeacon *
 	/* TODO: build del beacon message*/
 
 	/*Sending Cfg*/
-	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, false, (u32)pstrWFIDrv);
+	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, false, pstrWFIDrv);
 	if (s32Error) {
 
 		PRINT_ER("Failed to send delete beacon config packet\n");
@@ -3622,7 +3622,7 @@ static void Handle_AddStation(WILC_WFIDrvHandle drvHandler, tstrWILC_AddStaParam
 	pu8CurrByte += WILC_HostIf_PackStaParam(pu8CurrByte, pstrStationParam);
 
 	/*Sending Cfg*/
-	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, false, (u32)pstrWFIDrv);
+	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, false, pstrWFIDrv);
 	if (s32Error != WILC_SUCCESS) {
 
 		PRINT_ER("Failed to send add station config packet\n");
@@ -3679,7 +3679,7 @@ static void Handle_DelAllSta(WILC_WFIDrvHandle drvHandler, tstrHostIFDelAllSta *
 	}
 
 	/*Sending Cfg*/
-	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv);
+	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv);
 	if (s32Error) {
 
 		PRINT_ER("Failed to send add station config packet\n");
@@ -3726,7 +3726,7 @@ static void Handle_DelStation(WILC_WFIDrvHandle drvHandler, tstrHostIFDelSta *ps
 	WILC_memcpy(pu8CurrByte, pstrDelStaParam->au8MacAddr, ETH_ALEN);
 
 	/*Sending Cfg*/
-	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, false, (u32)pstrWFIDrv);
+	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, false, pstrWFIDrv);
 	if (s32Error) {
 
 		PRINT_ER("Failed to send add station config packet\n");
@@ -3769,7 +3769,7 @@ static void Handle_EditStation(WILC_WFIDrvHandle drvHandler, tstrWILC_AddStaPara
 	pu8CurrByte += WILC_HostIf_PackStaParam(pu8CurrByte, pstrStationParam);
 
 	/*Sending Cfg*/
-	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, false, (u32)pstrWFIDrv);
+	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, false, pstrWFIDrv);
 	if (s32Error) {
 
 		PRINT_ER("Failed to send edit station config packet\n");
@@ -3845,7 +3845,7 @@ static int Handle_RemainOnChan(WILC_WFIDrvHandle drvHandler, tstrHostIfRemainOnC
 	strWID.ps8WidVal[1] = (s8)pstrHostIfRemainOnChan->u16Channel;
 
 	/*Sending Cfg*/
-	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv);
+	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv);
 	if (s32Error != WILC_SUCCESS)
 		PRINT_ER("Failed to set remain on channel\n");
 
@@ -3900,7 +3900,7 @@ static int Handle_RegisterFrame(WILC_WFIDrvHandle drvHandler, tstrHostIfRegister
 
 
 	/*Sending Cfg*/
-	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv);
+	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv);
 	if (s32Error) {
 		PRINT_ER("Failed to frame register config packet\n");
 		WILC_ERRORREPORT(s32Error, WILC_INVALID_STATE);
@@ -3951,7 +3951,7 @@ static u32 Handle_ListenStateExpired(WILC_WFIDrvHandle drvHandler, tstrHostIfRem
 		strWID.ps8WidVal[1] = FALSE_FRMWR_CHANNEL;
 
 		/*Sending Cfg*/
-		s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv);
+		s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv);
 		if (s32Error != WILC_SUCCESS) {
 			PRINT_ER("Failed to set remain on channel\n");
 			goto _done_;
@@ -4037,7 +4037,7 @@ static void Handle_PowerManagement(WILC_WFIDrvHandle drvHandler, tstrHostIfPower
 	PRINT_D(HOSTINF_DBG, "Handling Power Management\n");
 
 	/*Sending Cfg*/
-	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv);
+	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv);
 	if (s32Error) {
 		PRINT_ER("Failed to send power management config packet\n");
 		WILC_ERRORREPORT(s32Error, WILC_INVALID_STATE);
@@ -4088,7 +4088,7 @@ static void Handle_SetMulticastFilter(WILC_WFIDrvHandle drvHandler, tstrHostIFSe
 		memcpy(pu8CurrByte, gau8MulticastMacAddrList, ((strHostIfSetMulti->u32count) * ETH_ALEN));
 
 	/*Sending Cfg*/
-	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, false, (u32)drvHandler);
+	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, false, drvHandler);
 	if (s32Error) {
 		PRINT_ER("Failed to send setup multicast config packet\n");
 		WILC_ERRORREPORT(s32Error, WILC_FAIL);
@@ -4156,7 +4156,7 @@ static s32 Handle_AddBASession(WILC_WFIDrvHandle drvHandler, tstrHostIfBASession
 	/* Group Buffer Timeout */
 	*ptr++ = 0;
 
-	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv);
+	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv);
 	if (s32Error)
 		PRINT_D(HOSTINF_DBG, "Couldn't open BA Session\n");
 
@@ -4180,7 +4180,7 @@ static s32 Handle_AddBASession(WILC_WFIDrvHandle drvHandler, tstrHostIfBASession
 	*ptr++ = ((strHostIfBASessionInfo->u16SessionTimeout >> 16) & 0xFF);
 	/*Ack-Policy */
 	*ptr++ = 3;
-	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv);
+	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv);
 
 	if (strWID.ps8WidVal != NULL)
 		WILC_FREE(strWID.ps8WidVal);
@@ -4230,7 +4230,7 @@ static s32 Handle_DelBASession(WILC_WFIDrvHandle drvHandler, tstrHostIfBASession
 	/* Delba Reason */
 	*ptr++ = 32; /* Unspecific QOS reason */
 
-	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv);
+	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv);
 	if (s32Error)
 		PRINT_D(HOSTINF_DBG, "Couldn't delete BA Session\n");
 
@@ -4248,7 +4248,7 @@ static s32 Handle_DelBASession(WILC_WFIDrvHandle drvHandler, tstrHostIfBASession
 	/* TID*/
 	*ptr++ = strHostIfBASessionInfo->u8Ted;
 
-	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv);
+	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv);
 
 	if (strWID.ps8WidVal != NULL)
 		WILC_FREE(strWID.ps8WidVal);
@@ -4299,7 +4299,7 @@ static s32 Handle_DelAllRxBASessions(WILC_WFIDrvHandle drvHandler, tstrHostIfBAS
 	/* Delba Reason */
 	*ptr++ = 32; /* Unspecific QOS reason */
 
-	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv);
+	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv);
 	if (s32Error)
 		PRINT_D(HOSTINF_DBG, "Couldn't delete BA Session\n");
 
@@ -5327,7 +5327,7 @@ s32 host_int_get_site_survey_results(WILC_WFIDrvHandle hWFIDrv,
 	astrWIDList[1].ps8WidVal = ppu8RcvdSiteSurveyResults[1];
 	astrWIDList[1].s32ValueSize = u32MaxSiteSrvyFragLen;
 
-	s32Error = SendConfigPkt(GET_CFG, astrWIDList, 2, true, (u32)pstrWFIDrv);
+	s32Error = SendConfigPkt(GET_CFG, astrWIDList, 2, true, pstrWFIDrv);
 
 	/*get the value by searching the local copy*/
 	if (s32Error) {
@@ -5693,7 +5693,7 @@ s32 host_int_get_assoc_res_info(WILC_WFIDrvHandle hWFIDrv, u8 *pu8AssocRespInfo,
 
 
 	/* Sending Configuration packet */
-	s32Error = SendConfigPkt(GET_CFG, &strWID, 1, true, (u32)pstrWFIDrv);
+	s32Error = SendConfigPkt(GET_CFG, &strWID, 1, true, pstrWFIDrv);
 	if (s32Error) {
 		PRINT_ER("Failed to send association response config packet\n");
 		*pu32RcvdAssocRespInfoLen = 0;
@@ -5939,7 +5939,7 @@ s32 host_int_test_set_int_wid(WILC_WFIDrvHandle hWFIDrv, u32 u32TestMemAddr)
 	strWID.s32ValueSize = sizeof(u32);
 
 	/*Sending Cfg*/
-	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, (u32)pstrWFIDrv);
+	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv);
 	if (s32Error) {
 		PRINT_ER("Test Function: Failed to set wid value\n");
 		WILC_ERRORREPORT(s32Error, WILC_INVALID_STATE);
@@ -6031,7 +6031,7 @@ s32 host_int_test_get_int_wid(WILC_WFIDrvHandle hWFIDrv, u32 *pu32TestMemAddr)
 	strWID.ps8WidVal = (s8 *)pu32TestMemAddr;
 	strWID.s32ValueSize = sizeof(u32);
 
-	s32Error = SendConfigPkt(GET_CFG, &strWID, 1, true, (u32)pstrWFIDrv);
+	s32Error = SendConfigPkt(GET_CFG, &strWID, 1, true, pstrWFIDrv);
 	/*get the value by searching the local copy*/
 	if (s32Error) {
 		PRINT_ER("Test Function: Failed to get wid value\n");
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 06/28] staging: wilc1000: chage driver handler variable in SendConfigPkt
  2015-07-31  7:38 [PATCH 00/28] removing the compile warnings for 64-bit Tony Cho
                   ` (4 preceding siblings ...)
  2015-07-31  7:38 ` [PATCH 05/28] staging: wilc1000: remove unnecessary type cast Tony Cho
@ 2015-07-31  7:38 ` Tony Cho
  2015-07-31  7:38 ` [PATCH 07/28] staging: wilc1000: remove unused variables Tony Cho
                   ` (22 subsequent siblings)
  28 siblings, 0 replies; 35+ messages in thread
From: Tony Cho @ 2015-07-31  7:38 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, johnny.kim, chris.park, rachel.kim,
	austin.shin, tony.cho, glen.lee, leo.kim, jude.lee, robin.hwang,
	Nicolas.FERRE

From: glen lee <glen.lee@atmel.com>

This patch changes pstrWFIDrv with WILC_WFIDrvHandle type variable as a argument
of SendConfigPkt in all associate code because the type of argument 5 in
SendConfigPkt was changed with WILC_WFIDrvHandle type.

Signed-off-by: glen lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
---
 drivers/staging/wilc1000/host_interface.c | 92 +++++++++++++++----------------
 1 file changed, 46 insertions(+), 46 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 265ff68..c8ebf51 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -617,7 +617,7 @@ static s32 Handle_SetChannel(WILC_WFIDrvHandle drvHandler, tstrHostIFSetChan *ps
 
 	PRINT_D(HOSTINF_DBG, "Setting channel\n");
 	/*Sending Cfg*/
-	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv);
+	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, drvHandler);
 	if (s32Error) {
 		PRINT_ER("Failed to set channel\n");
 		WILC_ERRORREPORT(s32Error, WILC_INVALID_STATE);
@@ -699,7 +699,7 @@ static s32 Handle_SetOperationMode(WILC_WFIDrvHandle drvHandler, tstrHostIfSetOp
 	/*Sending Cfg*/
 	PRINT_INFO(HOSTINF_DBG, "pstrWFIDrv= %p\n", pstrWFIDrv);
 
-	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv);
+	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, drvHandler);
 
 
 	if ((pstrHostIfSetOperationMode->u32Mode) == (u32)NULL)
@@ -748,7 +748,7 @@ s32 Handle_set_IPAddress(WILC_WFIDrvHandle drvHandler, u8 *pu8IPAddr, u8 idx)
 	strWID.ps8WidVal = (u8 *)pu8IPAddr;
 	strWID.s32ValueSize = IP_ALEN;
 
-	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv);
+	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, drvHandler);
 
 
 
@@ -792,7 +792,7 @@ s32 Handle_get_IPAddress(WILC_WFIDrvHandle drvHandler, u8 *pu8IPAddr, u8 idx)
 	strWID.ps8WidVal = (u8 *)WILC_MALLOC(IP_ALEN);
 	strWID.s32ValueSize = IP_ALEN;
 
-	s32Error = SendConfigPkt(GET_CFG, &strWID, 1, true, pstrWFIDrv);
+	s32Error = SendConfigPkt(GET_CFG, &strWID, 1, true, drvHandler);
 
 	PRINT_INFO(HOSTINF_DBG, "%pI4\n", strWID.ps8WidVal);
 
@@ -853,7 +853,7 @@ static s32 Handle_SetMacAddress(WILC_WFIDrvHandle drvHandler, tstrHostIfSetMacAd
 	strWID.s32ValueSize = ETH_ALEN;
 	PRINT_D(GENERIC_DBG, "mac addr = :%x:%x:%x:%x:%x:%x\n", strWID.ps8WidVal[0], strWID.ps8WidVal[1], strWID.ps8WidVal[2], strWID.ps8WidVal[3], strWID.ps8WidVal[4], strWID.ps8WidVal[5]);
 	/*Sending Cfg*/
-	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv);
+	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, drvHandler);
 	if (s32Error) {
 		PRINT_ER("Failed to set mac address\n");
 		WILC_ERRORREPORT(s32Error, WILC_FAIL);
@@ -1199,7 +1199,7 @@ static s32 Handle_CfgParam(WILC_WFIDrvHandle drvHandler, tstrHostIFCfgParamAttr
 		}
 		u8WidCnt++;
 	}
-	s32Error = SendConfigPkt(SET_CFG, strWIDList, u8WidCnt, false, pstrWFIDrv);
+	s32Error = SendConfigPkt(SET_CFG, strWIDList, u8WidCnt, false, drvHandler);
 
 	if (s32Error)
 		PRINT_ER("Error in setting CFG params\n");
@@ -1357,7 +1357,7 @@ static s32 Handle_Scan(WILC_WFIDrvHandle drvHandler, tstrHostIFscanAttr *pstrHos
 		gbScanWhileConnected = false;
 	}
 
-	s32Error = SendConfigPkt(SET_CFG, strWIDList, u32WidsCount, false, pstrWFIDrv);
+	s32Error = SendConfigPkt(SET_CFG, strWIDList, u32WidsCount, false, drvHandler);
 
 	if (s32Error) {
 		PRINT_ER("Failed to send scan paramters config packet\n");
@@ -1434,7 +1434,7 @@ static s32 Handle_ScanDone(WILC_WFIDrvHandle drvHandler, tenuScanEvent enuEvent)
 		strWID.s32ValueSize = sizeof(char);
 
 		/*Sending Cfg*/
-		s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv);
+		s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, drvHandler);
 		if (s32Error != WILC_SUCCESS) {
 			PRINT_ER("Failed to set abort running scan\n");
 			WILC_ERRORREPORT(s32Error, WILC_FAIL);
@@ -1631,7 +1631,7 @@ static s32 Handle_Connect(WILC_WFIDrvHandle drvHandler, tstrHostIFconnectAttr *p
 		gu32WidConnRstHack = 0;
 		/* ////////////////////// */
 
-		s32Error = SendConfigPkt(SET_CFG, strWIDList, u32WidsCount, false, pstrWFIDrv);
+		s32Error = SendConfigPkt(SET_CFG, strWIDList, u32WidsCount, false, drvHandler);
 		if (s32Error) {
 			PRINT_ER("Handle_Connect()] failed to send config packet\n");
 			WILC_ERRORREPORT(s32Error, WILC_INVALID_STATE);
@@ -1954,7 +1954,7 @@ static s32 Handle_Connect(WILC_WFIDrvHandle drvHandler, tstrHostIFconnectAttr *p
 		PRINT_D(GENERIC_DBG, "save bssid = %x:%x:%x:%x:%x:%x\n", (u8ConnectedSSID[0]), (u8ConnectedSSID[1]), (u8ConnectedSSID[2]), (u8ConnectedSSID[3]), (u8ConnectedSSID[4]), (u8ConnectedSSID[5]));
 	}
 
-	s32Error = SendConfigPkt(SET_CFG, strWIDList, u32WidsCount, false, pstrWFIDrv);
+	s32Error = SendConfigPkt(SET_CFG, strWIDList, u32WidsCount, false, drvHandler);
 	if (s32Error) {
 		PRINT_ER("Handle_Connect()] failed to send config packet\n");
 		WILC_ERRORREPORT(s32Error, WILC_INVALID_STATE);
@@ -2168,7 +2168,7 @@ static s32 Handle_ConnectTimeout(WILC_WFIDrvHandle drvHandler)
 
 	PRINT_D(HOSTINF_DBG, "Sending disconnect request\n");
 
-	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, false, pstrWFIDrv);
+	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, false, drvHandler);
 	if (s32Error)
 		PRINT_ER("Failed to send dissconect config packet\n");
 
@@ -2727,7 +2727,7 @@ static int Handle_Key(WILC_WFIDrvHandle drvHandler, tstrHostIFkeyAttr *pstrHostI
 			strWIDList[3].ps8WidVal = (s8 *)pu8keybuf;
 
 
-			s32Error = SendConfigPkt(SET_CFG, strWIDList, 4, true, pstrWFIDrv);
+			s32Error = SendConfigPkt(SET_CFG, strWIDList, 4, true, drvHandler);
 			WILC_FREE(pu8keybuf);
 
 
@@ -2755,7 +2755,7 @@ static int Handle_Key(WILC_WFIDrvHandle drvHandler, tstrHostIFkeyAttr *pstrHostI
 			strWID.ps8WidVal	= (s8 *)pu8keybuf;
 			strWID.s32ValueSize = pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFwepAttr.u8WepKeylen + 2;
 
-			s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv);
+			s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, drvHandler);
 			WILC_FREE(pu8keybuf);
 		} else if (pstrHostIFkeyAttr->u8KeyAction & REMOVEKEY)	  {
 
@@ -2767,7 +2767,7 @@ static int Handle_Key(WILC_WFIDrvHandle drvHandler, tstrHostIFkeyAttr *pstrHostI
 			strWID.ps8WidVal = s8idxarray;
 			strWID.s32ValueSize = 1;
 
-			s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv);
+			s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, drvHandler);
 		} else {
 			strWID.u16WIDid	= (u16)WID_KEY_ID;
 			strWID.enuWIDtype	= WID_CHAR;
@@ -2776,7 +2776,7 @@ static int Handle_Key(WILC_WFIDrvHandle drvHandler, tstrHostIFkeyAttr *pstrHostI
 
 			PRINT_D(HOSTINF_DBG, "Setting default key index\n");
 
-			s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv);
+			s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, drvHandler);
 		}
 		up(&(pstrWFIDrv->hSemTestKeyBlock));
 		break;
@@ -2822,7 +2822,7 @@ static int Handle_Key(WILC_WFIDrvHandle drvHandler, tstrHostIFkeyAttr *pstrHostI
 			strWIDList[1].ps8WidVal	= (s8 *)pu8keybuf;
 			strWIDList[1].s32ValueSize = RX_MIC_KEY_MSG_LEN;
 
-			s32Error = SendConfigPkt(SET_CFG, strWIDList, 2, true, pstrWFIDrv);
+			s32Error = SendConfigPkt(SET_CFG, strWIDList, 2, true, drvHandler);
 
 			WILC_FREE(pu8keybuf);
 
@@ -2869,7 +2869,7 @@ static int Handle_Key(WILC_WFIDrvHandle drvHandler, tstrHostIFkeyAttr *pstrHostI
 			strWID.ps8WidVal	= (s8 *)pu8keybuf;
 			strWID.s32ValueSize = RX_MIC_KEY_MSG_LEN;
 
-			s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv);
+			s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, drvHandler);
 
 			WILC_FREE(pu8keybuf);
 
@@ -2926,7 +2926,7 @@ _WPARxGtk_end_case_:
 			strWIDList[1].ps8WidVal	= (s8 *)pu8keybuf;
 			strWIDList[1].s32ValueSize = PTK_KEY_MSG_LEN + 1;
 
-			s32Error = SendConfigPkt(SET_CFG, strWIDList, 2, true, pstrWFIDrv);
+			s32Error = SendConfigPkt(SET_CFG, strWIDList, 2, true, drvHandler);
 			WILC_FREE(pu8keybuf);
 
 			/* ////////////////////////// */
@@ -2967,7 +2967,7 @@ _WPARxGtk_end_case_:
 			strWID.ps8WidVal	= (s8 *)pu8keybuf;
 			strWID.s32ValueSize = PTK_KEY_MSG_LEN;
 
-			s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv);
+			s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, drvHandler);
 			WILC_FREE(pu8keybuf);
 
 			/* ////////////////////////// */
@@ -3006,7 +3006,7 @@ _WPAPtk_end_case_:
 		strWID.ps8WidVal = (s8 *)pu8keybuf;
 		strWID.s32ValueSize = (pstrHostIFkeyAttr->uniHostIFkeyAttr.strHostIFpmkidAttr.numpmkid * PMKSA_KEY_LEN) + 1;
 
-		s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv);
+		s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, drvHandler);
 
 		WILC_FREE(pu8keybuf);
 		break;
@@ -3055,7 +3055,7 @@ static void Handle_Disconnect(WILC_WFIDrvHandle drvHandler)
 
 	WILC_memset(u8ConnectedSSID, 0, ETH_ALEN);
 
-	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, false, pstrWFIDrv);
+	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, false, drvHandler);
 
 	if (s32Error) {
 		PRINT_ER("Failed to send dissconect config packet\n");
@@ -3168,7 +3168,7 @@ static s32 Switch_Log_Terminal(WILC_WFIDrvHandle drvHandler)
 	strWID.ps8WidVal = &dummy;
 	strWID.s32ValueSize = sizeof(char);
 
-	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv);
+	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, drvHandler);
 
 
 	if (s32Error) {
@@ -3213,7 +3213,7 @@ static s32 Handle_GetChnl(WILC_WFIDrvHandle drvHandler)
 
 	PRINT_D(HOSTINF_DBG, "Getting channel value\n");
 
-	s32Error = SendConfigPkt(GET_CFG, &strWID, 1, true, pstrWFIDrv);
+	s32Error = SendConfigPkt(GET_CFG, &strWID, 1, true, drvHandler);
 	/*get the value by searching the local copy*/
 	if (s32Error) {
 		PRINT_ER("Failed to get channel number\n");
@@ -3257,7 +3257,7 @@ static void Handle_GetRssi(WILC_WFIDrvHandle drvHandler)
 	/*Sending Cfg*/
 	PRINT_D(HOSTINF_DBG, "Getting RSSI value\n");
 
-	s32Error = SendConfigPkt(GET_CFG, &strWID, 1, true, pstrWFIDrv);
+	s32Error = SendConfigPkt(GET_CFG, &strWID, 1, true, drvHandler);
 	if (s32Error) {
 		PRINT_ER("Failed to get RSSI value\n");
 		WILC_ERRORREPORT(s32Error, WILC_FAIL);
@@ -3288,7 +3288,7 @@ static void Handle_GetLinkspeed(WILC_WFIDrvHandle drvHandler)
 	/*Sending Cfg*/
 	PRINT_D(HOSTINF_DBG, "Getting LINKSPEED value\n");
 
-	s32Error = SendConfigPkt(GET_CFG, &strWID, 1, true, pstrWFIDrv);
+	s32Error = SendConfigPkt(GET_CFG, &strWID, 1, true, drvHandler);
 	if (s32Error) {
 		PRINT_ER("Failed to get LINKSPEED value\n");
 		WILC_ERRORREPORT(s32Error, WILC_FAIL);
@@ -3386,7 +3386,7 @@ static s32 Handle_Get_InActiveTime(WILC_WFIDrvHandle drvHandler, tstrHostIfStaIn
 	PRINT_D(CFG80211_DBG, "SETING STA inactive time\n");
 
 
-	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv);
+	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, drvHandler);
 	/*get the value by searching the local copy*/
 	if (s32Error) {
 		PRINT_ER("Failed to SET incative time\n");
@@ -3400,7 +3400,7 @@ static s32 Handle_Get_InActiveTime(WILC_WFIDrvHandle drvHandler, tstrHostIfStaIn
 	strWID.s32ValueSize = sizeof(u32);
 
 
-	s32Error = SendConfigPkt(GET_CFG, &strWID, 1, true, pstrWFIDrv);
+	s32Error = SendConfigPkt(GET_CFG, &strWID, 1, true, drvHandler);
 	/*get the value by searching the local copy*/
 	if (s32Error) {
 		PRINT_ER("Failed to get incative time\n");
@@ -3481,7 +3481,7 @@ static void Handle_AddBeacon(WILC_WFIDrvHandle drvHandler, tstrHostIFSetBeacon *
 
 
 	/*Sending Cfg*/
-	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, false, pstrWFIDrv);
+	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, false, drvHandler);
 	if (s32Error) {
 		PRINT_ER("Failed to send add beacon config packet\n");
 		WILC_ERRORREPORT(s32Error, WILC_FAIL);
@@ -3526,7 +3526,7 @@ static void Handle_DelBeacon(WILC_WFIDrvHandle drvHandler, tstrHostIFDelBeacon *
 	/* TODO: build del beacon message*/
 
 	/*Sending Cfg*/
-	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, false, pstrWFIDrv);
+	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, false, drvHandler);
 	if (s32Error) {
 
 		PRINT_ER("Failed to send delete beacon config packet\n");
@@ -3622,7 +3622,7 @@ static void Handle_AddStation(WILC_WFIDrvHandle drvHandler, tstrWILC_AddStaParam
 	pu8CurrByte += WILC_HostIf_PackStaParam(pu8CurrByte, pstrStationParam);
 
 	/*Sending Cfg*/
-	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, false, pstrWFIDrv);
+	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, false, drvHandler);
 	if (s32Error != WILC_SUCCESS) {
 
 		PRINT_ER("Failed to send add station config packet\n");
@@ -3679,7 +3679,7 @@ static void Handle_DelAllSta(WILC_WFIDrvHandle drvHandler, tstrHostIFDelAllSta *
 	}
 
 	/*Sending Cfg*/
-	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv);
+	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, drvHandler);
 	if (s32Error) {
 
 		PRINT_ER("Failed to send add station config packet\n");
@@ -3726,7 +3726,7 @@ static void Handle_DelStation(WILC_WFIDrvHandle drvHandler, tstrHostIFDelSta *ps
 	WILC_memcpy(pu8CurrByte, pstrDelStaParam->au8MacAddr, ETH_ALEN);
 
 	/*Sending Cfg*/
-	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, false, pstrWFIDrv);
+	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, false, drvHandler);
 	if (s32Error) {
 
 		PRINT_ER("Failed to send add station config packet\n");
@@ -3769,7 +3769,7 @@ static void Handle_EditStation(WILC_WFIDrvHandle drvHandler, tstrWILC_AddStaPara
 	pu8CurrByte += WILC_HostIf_PackStaParam(pu8CurrByte, pstrStationParam);
 
 	/*Sending Cfg*/
-	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, false, pstrWFIDrv);
+	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, false, drvHandler);
 	if (s32Error) {
 
 		PRINT_ER("Failed to send edit station config packet\n");
@@ -3845,7 +3845,7 @@ static int Handle_RemainOnChan(WILC_WFIDrvHandle drvHandler, tstrHostIfRemainOnC
 	strWID.ps8WidVal[1] = (s8)pstrHostIfRemainOnChan->u16Channel;
 
 	/*Sending Cfg*/
-	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv);
+	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, drvHandler);
 	if (s32Error != WILC_SUCCESS)
 		PRINT_ER("Failed to set remain on channel\n");
 
@@ -3900,7 +3900,7 @@ static int Handle_RegisterFrame(WILC_WFIDrvHandle drvHandler, tstrHostIfRegister
 
 
 	/*Sending Cfg*/
-	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv);
+	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, drvHandler);
 	if (s32Error) {
 		PRINT_ER("Failed to frame register config packet\n");
 		WILC_ERRORREPORT(s32Error, WILC_INVALID_STATE);
@@ -3951,7 +3951,7 @@ static u32 Handle_ListenStateExpired(WILC_WFIDrvHandle drvHandler, tstrHostIfRem
 		strWID.ps8WidVal[1] = FALSE_FRMWR_CHANNEL;
 
 		/*Sending Cfg*/
-		s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv);
+		s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, drvHandler);
 		if (s32Error != WILC_SUCCESS) {
 			PRINT_ER("Failed to set remain on channel\n");
 			goto _done_;
@@ -4037,7 +4037,7 @@ static void Handle_PowerManagement(WILC_WFIDrvHandle drvHandler, tstrHostIfPower
 	PRINT_D(HOSTINF_DBG, "Handling Power Management\n");
 
 	/*Sending Cfg*/
-	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv);
+	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, drvHandler);
 	if (s32Error) {
 		PRINT_ER("Failed to send power management config packet\n");
 		WILC_ERRORREPORT(s32Error, WILC_INVALID_STATE);
@@ -4156,7 +4156,7 @@ static s32 Handle_AddBASession(WILC_WFIDrvHandle drvHandler, tstrHostIfBASession
 	/* Group Buffer Timeout */
 	*ptr++ = 0;
 
-	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv);
+	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, drvHandler);
 	if (s32Error)
 		PRINT_D(HOSTINF_DBG, "Couldn't open BA Session\n");
 
@@ -4180,7 +4180,7 @@ static s32 Handle_AddBASession(WILC_WFIDrvHandle drvHandler, tstrHostIfBASession
 	*ptr++ = ((strHostIfBASessionInfo->u16SessionTimeout >> 16) & 0xFF);
 	/*Ack-Policy */
 	*ptr++ = 3;
-	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv);
+	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, drvHandler);
 
 	if (strWID.ps8WidVal != NULL)
 		WILC_FREE(strWID.ps8WidVal);
@@ -4230,7 +4230,7 @@ static s32 Handle_DelBASession(WILC_WFIDrvHandle drvHandler, tstrHostIfBASession
 	/* Delba Reason */
 	*ptr++ = 32; /* Unspecific QOS reason */
 
-	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv);
+	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, drvHandler);
 	if (s32Error)
 		PRINT_D(HOSTINF_DBG, "Couldn't delete BA Session\n");
 
@@ -4248,7 +4248,7 @@ static s32 Handle_DelBASession(WILC_WFIDrvHandle drvHandler, tstrHostIfBASession
 	/* TID*/
 	*ptr++ = strHostIfBASessionInfo->u8Ted;
 
-	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv);
+	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, drvHandler);
 
 	if (strWID.ps8WidVal != NULL)
 		WILC_FREE(strWID.ps8WidVal);
@@ -4299,7 +4299,7 @@ static s32 Handle_DelAllRxBASessions(WILC_WFIDrvHandle drvHandler, tstrHostIfBAS
 	/* Delba Reason */
 	*ptr++ = 32; /* Unspecific QOS reason */
 
-	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv);
+	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, drvHandler);
 	if (s32Error)
 		PRINT_D(HOSTINF_DBG, "Couldn't delete BA Session\n");
 
@@ -5327,7 +5327,7 @@ s32 host_int_get_site_survey_results(WILC_WFIDrvHandle hWFIDrv,
 	astrWIDList[1].ps8WidVal = ppu8RcvdSiteSurveyResults[1];
 	astrWIDList[1].s32ValueSize = u32MaxSiteSrvyFragLen;
 
-	s32Error = SendConfigPkt(GET_CFG, astrWIDList, 2, true, pstrWFIDrv);
+	s32Error = SendConfigPkt(GET_CFG, astrWIDList, 2, true, drvHandler);
 
 	/*get the value by searching the local copy*/
 	if (s32Error) {
@@ -5693,7 +5693,7 @@ s32 host_int_get_assoc_res_info(WILC_WFIDrvHandle hWFIDrv, u8 *pu8AssocRespInfo,
 
 
 	/* Sending Configuration packet */
-	s32Error = SendConfigPkt(GET_CFG, &strWID, 1, true, pstrWFIDrv);
+	s32Error = SendConfigPkt(GET_CFG, &strWID, 1, true, hWFIDrv);
 	if (s32Error) {
 		PRINT_ER("Failed to send association response config packet\n");
 		*pu32RcvdAssocRespInfoLen = 0;
@@ -5939,7 +5939,7 @@ s32 host_int_test_set_int_wid(WILC_WFIDrvHandle hWFIDrv, u32 u32TestMemAddr)
 	strWID.s32ValueSize = sizeof(u32);
 
 	/*Sending Cfg*/
-	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv);
+	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, hWFIDrv);
 	if (s32Error) {
 		PRINT_ER("Test Function: Failed to set wid value\n");
 		WILC_ERRORREPORT(s32Error, WILC_INVALID_STATE);
@@ -6031,7 +6031,7 @@ s32 host_int_test_get_int_wid(WILC_WFIDrvHandle hWFIDrv, u32 *pu32TestMemAddr)
 	strWID.ps8WidVal = (s8 *)pu32TestMemAddr;
 	strWID.s32ValueSize = sizeof(u32);
 
-	s32Error = SendConfigPkt(GET_CFG, &strWID, 1, true, pstrWFIDrv);
+	s32Error = SendConfigPkt(GET_CFG, &strWID, 1, true, hWFIDrv);
 	/*get the value by searching the local copy*/
 	if (s32Error) {
 		PRINT_ER("Test Function: Failed to get wid value\n");
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 07/28] staging: wilc1000: remove unused variables
  2015-07-31  7:38 [PATCH 00/28] removing the compile warnings for 64-bit Tony Cho
                   ` (5 preceding siblings ...)
  2015-07-31  7:38 ` [PATCH 06/28] staging: wilc1000: chage driver handler variable in SendConfigPkt Tony Cho
@ 2015-07-31  7:38 ` Tony Cho
  2015-07-31  7:38 ` [PATCH 08/28] staging: wilc1000: change drvHandler type in wlan_cfg_get Tony Cho
                   ` (21 subsequent siblings)
  28 siblings, 0 replies; 35+ messages in thread
From: Tony Cho @ 2015-07-31  7:38 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, johnny.kim, chris.park, rachel.kim,
	austin.shin, tony.cho, glen.lee, leo.kim, jude.lee, robin.hwang,
	Nicolas.FERRE

From: glen lee <glen.lee@atmel.com>

This patch removes unused variable pstrWFIDrv.

Signed-off-by: glen lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
---
 drivers/staging/wilc1000/host_interface.c | 15 ---------------
 1 file changed, 15 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index c8ebf51..66565f6 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -607,7 +607,6 @@ static s32 Handle_SetChannel(WILC_WFIDrvHandle drvHandler, tstrHostIFSetChan *ps
 
 	s32 s32Error = WILC_SUCCESS;
 	tstrWID	strWID;
-	tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
 
 	/*prepare configuration packet*/
 	strWID.u16WIDid = (u16)WID_CURRENT_CHANNEL;
@@ -733,7 +732,6 @@ s32 Handle_set_IPAddress(WILC_WFIDrvHandle drvHandler, u8 *pu8IPAddr, u8 idx)
 	s32 s32Error = WILC_SUCCESS;
 	tstrWID strWID;
 	char firmwareIPAddress[4] = {0};
-	tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
 
 	if (pu8IPAddr[0] < 192)
 		pu8IPAddr[0] = 0;
@@ -837,7 +835,6 @@ static s32 Handle_SetMacAddress(WILC_WFIDrvHandle drvHandler, tstrHostIfSetMacAd
 
 	s32 s32Error = WILC_SUCCESS;
 	tstrWID	strWID;
-	tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
 	u8 *mac_buf = (u8 *)WILC_MALLOC(ETH_ALEN);
 
 	if (mac_buf == NULL) {
@@ -3161,7 +3158,6 @@ static s32 Switch_Log_Terminal(WILC_WFIDrvHandle drvHandler)
 	s32 s32Error = WILC_SUCCESS;
 	tstrWID strWID;
 	static char dummy = 9;
-	tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
 
 	strWID.u16WIDid = (u16)WID_LOGTerminal_Switch;
 	strWID.enuWIDtype = WID_CHAR;
@@ -3438,7 +3434,6 @@ static void Handle_AddBeacon(WILC_WFIDrvHandle drvHandler, tstrHostIFSetBeacon *
 	s32 s32Error = WILC_SUCCESS;
 	tstrWID strWID;
 	u8 *pu8CurrByte;
-	tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
 
 	PRINT_D(HOSTINF_DBG, "Adding BEACON\n");
 
@@ -3510,7 +3505,6 @@ static void Handle_DelBeacon(WILC_WFIDrvHandle drvHandler, tstrHostIFDelBeacon *
 	s32 s32Error = WILC_SUCCESS;
 	tstrWID strWID;
 	u8 *pu8CurrByte;
-	tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
 
 	strWID.u16WIDid = (u16)WID_DEL_BEACON;
 	strWID.enuWIDtype = WID_CHAR;
@@ -3607,7 +3601,6 @@ static void Handle_AddStation(WILC_WFIDrvHandle drvHandler, tstrWILC_AddStaParam
 	s32 s32Error = WILC_SUCCESS;
 	tstrWID strWID;
 	u8 *pu8CurrByte;
-	tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
 
 	PRINT_D(HOSTINF_DBG, "Handling add station\n");
 	strWID.u16WIDid = (u16)WID_ADD_STA;
@@ -3651,7 +3644,6 @@ static void Handle_DelAllSta(WILC_WFIDrvHandle drvHandler, tstrHostIFDelAllSta *
 
 	tstrWID strWID;
 	u8 *pu8CurrByte;
-	tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
 	u8 i;
 	u8 au8Zero_Buff[6] = {0};
 
@@ -3709,7 +3701,6 @@ static void Handle_DelStation(WILC_WFIDrvHandle drvHandler, tstrHostIFDelSta *ps
 	s32 s32Error = WILC_SUCCESS;
 	tstrWID strWID;
 	u8 *pu8CurrByte;
-	tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
 
 	strWID.u16WIDid = (u16)WID_REMOVE_STA;
 	strWID.enuWIDtype = WID_BIN;
@@ -3754,7 +3745,6 @@ static void Handle_EditStation(WILC_WFIDrvHandle drvHandler, tstrWILC_AddStaPara
 	s32 s32Error = WILC_SUCCESS;
 	tstrWID strWID;
 	u8 *pu8CurrByte;
-	tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
 
 	strWID.u16WIDid = (u16)WID_EDIT_STA;
 	strWID.enuWIDtype = WID_BIN;
@@ -3878,7 +3868,6 @@ static int Handle_RegisterFrame(WILC_WFIDrvHandle drvHandler, tstrHostIfRegister
 	s32 s32Error = WILC_SUCCESS;
 	tstrWID strWID;
 	u8 *pu8CurrByte;
-	tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
 
 	PRINT_D(HOSTINF_DBG, "Handling frame register Flag : %d FrameType: %d\n", pstrHostIfRegisterFrame->bReg, pstrHostIfRegisterFrame->u16FrameType);
 
@@ -4021,7 +4010,6 @@ static void Handle_PowerManagement(WILC_WFIDrvHandle drvHandler, tstrHostIfPower
 	s32 s32Error = WILC_SUCCESS;
 	tstrWID strWID;
 	s8 s8PowerMode;
-	tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
 
 	strWID.u16WIDid = (u16)WID_POWER_MANAGEMENT;
 
@@ -4118,7 +4106,6 @@ static s32 Handle_AddBASession(WILC_WFIDrvHandle drvHandler, tstrHostIfBASession
 	tstrWID strWID;
 	int AddbaTimeout = 100;
 	char *ptr = NULL;
-	tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
 
 	PRINT_D(HOSTINF_DBG, "Opening Block Ack session with\nBSSID = %.2x:%.2x:%.2x\nTID=%d\nBufferSize == %d\nSessionTimeOut = %d\n",
 		strHostIfBASessionInfo->au8Bssid[0],
@@ -4205,7 +4192,6 @@ static s32 Handle_DelBASession(WILC_WFIDrvHandle drvHandler, tstrHostIfBASession
 	s32 s32Error = WILC_SUCCESS;
 	tstrWID strWID;
 	char *ptr = NULL;
-	tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
 
 	PRINT_D(GENERIC_DBG, "Delete Block Ack session with\nBSSID = %.2x:%.2x:%.2x\nTID=%d\n",
 		strHostIfBASessionInfo->au8Bssid[0],
@@ -4275,7 +4261,6 @@ static s32 Handle_DelAllRxBASessions(WILC_WFIDrvHandle drvHandler, tstrHostIfBAS
 	s32 s32Error = WILC_SUCCESS;
 	tstrWID strWID;
 	char *ptr = NULL;
-	tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
 
 	PRINT_D(GENERIC_DBG, "Delete Block Ack session with\nBSSID = %.2x:%.2x:%.2x\nTID=%d\n",
 		strHostIfBASessionInfo->au8Bssid[0],
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 08/28] staging: wilc1000: change drvHandler type in wlan_cfg_get
  2015-07-31  7:38 [PATCH 00/28] removing the compile warnings for 64-bit Tony Cho
                   ` (6 preceding siblings ...)
  2015-07-31  7:38 ` [PATCH 07/28] staging: wilc1000: remove unused variables Tony Cho
@ 2015-07-31  7:38 ` Tony Cho
  2015-07-31  7:38 ` [PATCH 09/28] staging: wilc1000: change drvHandler type in wlan_cfg_set Tony Cho
                   ` (20 subsequent siblings)
  28 siblings, 0 replies; 35+ messages in thread
From: Tony Cho @ 2015-07-31  7:38 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, johnny.kim, chris.park, rachel.kim,
	austin.shin, tony.cho, glen.lee, leo.kim, jude.lee, robin.hwang,
	Nicolas.FERRE

From: glen lee <glen.lee@atmel.com>

This patch changes drvHandler of uint32_t type with WILC_WFIDrvHandle type in
wlan_cfg_get and wilc_wlan_cfg_get.

The type of drvHandler which wlan_cfg_get take as argument was changed to WILC_WFIDrvHandle.
So the type needs to be changed to match parameter type.

Signed-off-by: glen lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
---
 drivers/staging/wilc1000/wilc_wlan.c    | 2 +-
 drivers/staging/wilc1000/wilc_wlan_if.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c
index def72fd..273073f 100644
--- a/drivers/staging/wilc1000/wilc_wlan.c
+++ b/drivers/staging/wilc1000/wilc_wlan.c
@@ -1938,7 +1938,7 @@ static int wilc_wlan_cfg_set(int start, uint32_t wid, uint8_t *buffer, uint32_t
 
 	return ret_size;
 }
-static int wilc_wlan_cfg_get(int start, uint32_t wid, int commit, uint32_t drvHandler)
+static int wilc_wlan_cfg_get(int start, uint32_t wid, int commit, WILC_WFIDrvHandle drvHandler)
 {
 	wilc_wlan_dev_t *p = (wilc_wlan_dev_t *)&g_wlan;
 	uint32_t offset;
diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h b/drivers/staging/wilc1000/wilc_wlan_if.h
index ba22d30..6d2d588 100644
--- a/drivers/staging/wilc1000/wilc_wlan_if.h
+++ b/drivers/staging/wilc1000/wilc_wlan_if.h
@@ -198,7 +198,7 @@ typedef struct {
 	void (*wlan_handle_rx_isr)(void);
 	void (*wlan_cleanup)(void);
 	int (*wlan_cfg_set)(int, uint32_t, uint8_t *, uint32_t, int, uint32_t);
-	int (*wlan_cfg_get)(int, uint32_t, int, uint32_t);
+	int (*wlan_cfg_get)(int, uint32_t, int, WILC_WFIDrvHandle);
 	int (*wlan_cfg_get_value)(uint32_t, uint8_t *, uint32_t);
 	/*Bug3959: transmitting mgmt frames received from host*/
 	#if defined(WILC_AP_EXTERNAL_MLME) || defined(WILC_P2P)
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 09/28] staging: wilc1000: change drvHandler type in wlan_cfg_set
  2015-07-31  7:38 [PATCH 00/28] removing the compile warnings for 64-bit Tony Cho
                   ` (7 preceding siblings ...)
  2015-07-31  7:38 ` [PATCH 08/28] staging: wilc1000: change drvHandler type in wlan_cfg_get Tony Cho
@ 2015-07-31  7:38 ` Tony Cho
  2015-07-31  7:38 ` [PATCH 10/28] staging: wilc1000: change driver handle variable Tony Cho
                   ` (19 subsequent siblings)
  28 siblings, 0 replies; 35+ messages in thread
From: Tony Cho @ 2015-07-31  7:38 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, johnny.kim, chris.park, rachel.kim,
	austin.shin, tony.cho, glen.lee, leo.kim, jude.lee, robin.hwang,
	Nicolas.FERRE

From: glen lee <glen.lee@atmel.com>

This patch changes drvHandler of uint32_t type with WILC_WFIDrvHandle type in
wlan_cfg_set and wilc_wlan_cfg_set.

The type of drvHandler which wlan_cfg_set take as argument was changed to WILC_WFIDrvHandle.
So the type needs to be changed to match parameter type.

Signed-off-by: glen lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
---
 drivers/staging/wilc1000/wilc_wlan.c    | 2 +-
 drivers/staging/wilc1000/wilc_wlan_if.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c
index 273073f..d5fc54b 100644
--- a/drivers/staging/wilc1000/wilc_wlan.c
+++ b/drivers/staging/wilc1000/wilc_wlan.c
@@ -1899,7 +1899,7 @@ static int wilc_wlan_cfg_commit(int type, uint32_t drvHandler)
 	return 0;
 }
 
-static int wilc_wlan_cfg_set(int start, uint32_t wid, uint8_t *buffer, uint32_t buffer_size, int commit, uint32_t drvHandler)
+static int wilc_wlan_cfg_set(int start, uint32_t wid, uint8_t *buffer, uint32_t buffer_size, int commit, WILC_WFIDrvHandle drvHandler)
 {
 	wilc_wlan_dev_t *p = (wilc_wlan_dev_t *)&g_wlan;
 	uint32_t offset;
diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h b/drivers/staging/wilc1000/wilc_wlan_if.h
index 6d2d588..d9d592aa 100644
--- a/drivers/staging/wilc1000/wilc_wlan_if.h
+++ b/drivers/staging/wilc1000/wilc_wlan_if.h
@@ -197,7 +197,7 @@ typedef struct {
 	void (*wlan_handle_rx_que)(void);
 	void (*wlan_handle_rx_isr)(void);
 	void (*wlan_cleanup)(void);
-	int (*wlan_cfg_set)(int, uint32_t, uint8_t *, uint32_t, int, uint32_t);
+	int (*wlan_cfg_set)(int, uint32_t, uint8_t *, uint32_t, int, WILC_WFIDrvHandle);
 	int (*wlan_cfg_get)(int, uint32_t, int, WILC_WFIDrvHandle);
 	int (*wlan_cfg_get_value)(uint32_t, uint8_t *, uint32_t);
 	/*Bug3959: transmitting mgmt frames received from host*/
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 10/28] staging: wilc1000: change driver handle variable
  2015-07-31  7:38 [PATCH 00/28] removing the compile warnings for 64-bit Tony Cho
                   ` (8 preceding siblings ...)
  2015-07-31  7:38 ` [PATCH 09/28] staging: wilc1000: change drvHandler type in wlan_cfg_set Tony Cho
@ 2015-07-31  7:38 ` Tony Cho
  2015-07-31  7:38 ` [PATCH 11/28] staging: wilc1000: fix incompatible type in assignment warning Tony Cho
                   ` (18 subsequent siblings)
  28 siblings, 0 replies; 35+ messages in thread
From: Tony Cho @ 2015-07-31  7:38 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, johnny.kim, chris.park, rachel.kim,
	austin.shin, tony.cho, glen.lee, leo.kim, jude.lee, robin.hwang,
	Nicolas.FERRE

From: glen lee <glen.lee@atmel.com>

This patch change (u32)pstrWFIDrv with priv->hWILCWFIDrv as a argument
of wlan_cfg_set since the parameter drvHandler of uint32_t type in wlan_cfg_set
was changed with WILC_WFIDrvHandle.

Signed-off-by: glen lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
---
 drivers/staging/wilc1000/linux_wlan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c
index 3e55a8a..a808722 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -1295,7 +1295,7 @@ static int linux_wlan_init_test_config(struct net_device *dev, linux_wlan_t *p_n
 		goto _fail_;
 
 	c_val[0] = 1; /* Enable N with immediate block ack. */
-	if (!g_linux_wlan->oup.wlan_cfg_set(0, WID_11N_IMMEDIATE_BA_ENABLED, c_val, 1, 1, (u32)pstrWFIDrv))
+	if (!g_linux_wlan->oup.wlan_cfg_set(0, WID_11N_IMMEDIATE_BA_ENABLED, c_val, 1, 1, priv->hWILCWFIDrv))
 		goto _fail_;
 
 	return 0;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 11/28] staging: wilc1000: fix incompatible type in assignment warning
  2015-07-31  7:38 [PATCH 00/28] removing the compile warnings for 64-bit Tony Cho
                   ` (9 preceding siblings ...)
  2015-07-31  7:38 ` [PATCH 10/28] staging: wilc1000: change driver handle variable Tony Cho
@ 2015-07-31  7:38 ` Tony Cho
  2015-07-31  7:38 ` [PATCH 12/28] staging: wilc1000: change type of driver handler in tstrInterfaceInfo Tony Cho
                   ` (17 subsequent siblings)
  28 siblings, 0 replies; 35+ messages in thread
From: Tony Cho @ 2015-07-31  7:38 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, johnny.kim, chris.park, rachel.kim,
	austin.shin, tony.cho, glen.lee, leo.kim, jude.lee, robin.hwang,
	Nicolas.FERRE

From: glen lee <glen.lee@atmel.com>

Cast type to WILC_WFIDrvHandle before assignment from incompatible pointer type
to fix the following warning.

drivers/staging/wilc1000/host_interface.c:6916:27: warning: assignment from
incompatible pointer type [enabled by default]
   strHostIFmsg.drvHandler = pstrWFIDrv;

Signed-off-by: glen lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
---
 drivers/staging/wilc1000/host_interface.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 66565f6..e9cd77d 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3981,7 +3981,7 @@ static void ListenTimerCB(void *pvArg)
 	/* prepare the Timer Callback message */
 	WILC_memset(&strHostIFmsg, 0, sizeof(tstrHostIFmsg));
 	strHostIFmsg.u16MsgId = HOST_IF_MSG_LISTEN_TIMER_FIRED;
-	strHostIFmsg.drvHandler = pstrWFIDrv;
+	strHostIFmsg.drvHandler = (WILC_WFIDrvHandle)pstrWFIDrv;
 	strHostIFmsg.uniHostIFmsgBody.strHostIfRemainOnChan.u32ListenSessionID = pstrWFIDrv->strHostIfRemainOnChan.u32ListenSessionID;
 
 	/* send the message */
@@ -6425,7 +6425,7 @@ void GetPeriodicRSSI(void *pvArg)
 		WILC_memset(&strHostIFmsg, 0, sizeof(tstrHostIFmsg));
 
 		strHostIFmsg.u16MsgId = HOST_IF_MSG_GET_RSSI;
-		strHostIFmsg.drvHandler = pstrWFIDrv;
+		strHostIFmsg.drvHandler = (WILC_WFIDrvHandle)pstrWFIDrv;
 
 		/* send the message */
 		s32Error =	WILC_MsgQueueSend(&gMsgQHostIF, &strHostIFmsg, sizeof(tstrHostIFmsg), NULL);
@@ -6779,7 +6779,7 @@ void NetworkInfoReceived(u8 *pu8Buffer, u32 u32Length)
 	WILC_memset(&strHostIFmsg, 0, sizeof(tstrHostIFmsg));
 
 	strHostIFmsg.u16MsgId = HOST_IF_MSG_RCVD_NTWRK_INFO;
-	strHostIFmsg.drvHandler = pstrWFIDrv;
+	strHostIFmsg.drvHandler = (WILC_WFIDrvHandle)pstrWFIDrv;
 
 	strHostIFmsg.uniHostIFmsgBody.strRcvdNetworkInfo.u32Length = u32Length;
 	strHostIFmsg.uniHostIFmsgBody.strRcvdNetworkInfo.pu8Buffer = (u8 *)WILC_MALLOC(u32Length); /* will be deallocated by the receiving thread */
@@ -6841,7 +6841,7 @@ void GnrlAsyncInfoReceived(u8 *pu8Buffer, u32 u32Length)
 
 
 	strHostIFmsg.u16MsgId = HOST_IF_MSG_RCVD_GNRL_ASYNC_INFO;
-	strHostIFmsg.drvHandler = pstrWFIDrv;
+	strHostIFmsg.drvHandler = (WILC_WFIDrvHandle)pstrWFIDrv;
 
 
 	strHostIFmsg.uniHostIFmsgBody.strRcvdGnrlAsyncInfo.u32Length = u32Length;
@@ -6890,7 +6890,7 @@ void host_int_ScanCompleteReceived(u8 *pu8Buffer, u32 u32Length)
 		WILC_memset(&strHostIFmsg, 0, sizeof(tstrHostIFmsg));
 
 		strHostIFmsg.u16MsgId = HOST_IF_MSG_RCVD_SCAN_COMPLETE;
-		strHostIFmsg.drvHandler = pstrWFIDrv;
+		strHostIFmsg.drvHandler = (WILC_WFIDrvHandle)pstrWFIDrv;
 
 
 		/* will be deallocated by the receiving thread */
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 12/28] staging: wilc1000: change type of driver handler in tstrInterfaceInfo
  2015-07-31  7:38 [PATCH 00/28] removing the compile warnings for 64-bit Tony Cho
                   ` (10 preceding siblings ...)
  2015-07-31  7:38 ` [PATCH 11/28] staging: wilc1000: fix incompatible type in assignment warning Tony Cho
@ 2015-07-31  7:38 ` Tony Cho
  2015-07-31  7:38 ` [PATCH 13/28] staging: wilc1000: change type of argument in host_int_set_wfi_drv_handler Tony Cho
                   ` (16 subsequent siblings)
  28 siblings, 0 replies; 35+ messages in thread
From: Tony Cho @ 2015-07-31  7:38 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, johnny.kim, chris.park, rachel.kim,
	austin.shin, tony.cho, glen.lee, leo.kim, jude.lee, robin.hwang,
	Nicolas.FERRE

From: glen lee <glen.lee@atmel.com>

This patch changes drvHandler of uint32_t type with WILC_WFIDrvHandle type
since drvHandler is used to pass WILC_WFIDrvHandle type to other functions.

Signed-off-by: glen lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
---
 drivers/staging/wilc1000/wilc_wfi_netdevice.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wilc1000/wilc_wfi_netdevice.h b/drivers/staging/wilc1000/wilc_wfi_netdevice.h
index 0dfe108..e581b09 100644
--- a/drivers/staging/wilc1000/wilc_wfi_netdevice.h
+++ b/drivers/staging/wilc1000/wilc_wfi_netdevice.h
@@ -176,7 +176,7 @@ typedef struct {
 typedef struct {
 	uint8_t aSrcAddress[ETH_ALEN];
 	uint8_t aBSSID[ETH_ALEN];
-	uint32_t drvHandler;
+	WILC_WFIDrvHandle drvHandler;
 	struct net_device *wilc_netdev;
 } tstrInterfaceInfo;
 typedef struct {
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 13/28] staging: wilc1000: change type of argument in host_int_set_wfi_drv_handler
  2015-07-31  7:38 [PATCH 00/28] removing the compile warnings for 64-bit Tony Cho
                   ` (11 preceding siblings ...)
  2015-07-31  7:38 ` [PATCH 12/28] staging: wilc1000: change type of driver handler in tstrInterfaceInfo Tony Cho
@ 2015-07-31  7:38 ` Tony Cho
  2015-07-31  7:38 ` [PATCH 14/28] staging: wilc1000: remove unnecessary type cast " Tony Cho
                   ` (15 subsequent siblings)
  28 siblings, 0 replies; 35+ messages in thread
From: Tony Cho @ 2015-07-31  7:38 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, johnny.kim, chris.park, rachel.kim,
	austin.shin, tony.cho, glen.lee, leo.kim, jude.lee, robin.hwang,
	Nicolas.FERRE

From: glen lee <glen.lee@atmel.com>

The parameter of u32 type is incompatible with the argument of WILC_WFIDrvHandle
type which host_int_set_wfi_drv_handler takes always as input.
Therefore, this patch changes parameter of u32 type with WILC_WFIDrvHandle type
in the function host_int_set_wfi_drv_handler.

Signed-off-by: glen lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
---
 drivers/staging/wilc1000/host_interface.c | 2 +-
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index e9cd77d..38d047d 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -5792,7 +5792,7 @@ s32 host_int_wait_msg_queue_idle(void)
 
 }
 
-s32 host_int_set_wfi_drv_handler(u32 u32address)
+s32 host_int_set_wfi_drv_handler(WILC_WFIDrvHandle u32address)
 {
 	s32 s32Error = WILC_SUCCESS;
 
diff --git a/drivers/staging/wilc1000/host_interface.h b/drivers/staging/wilc1000/host_interface.h
index 617f105..2ced05f 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -1256,7 +1256,7 @@ s32 host_int_frame_register(WILC_WFIDrvHandle hWFIDrv, u16 u16FrameType, bool bR
  *  @date
  *  @version	1.0
  */
-s32 host_int_set_wfi_drv_handler(u32 u32address);
+s32 host_int_set_wfi_drv_handler(WILC_WFIDrvHandle u32address);
 s32 host_int_set_operation_mode(WILC_WFIDrvHandle hWFIDrv, u32 u32mode);
 
 static s32 Handle_ScanDone(WILC_WFIDrvHandle drvHandler, tenuScanEvent enuEvent);
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 14/28] staging: wilc1000: remove unnecessary type cast in host_int_set_wfi_drv_handler
  2015-07-31  7:38 [PATCH 00/28] removing the compile warnings for 64-bit Tony Cho
                   ` (12 preceding siblings ...)
  2015-07-31  7:38 ` [PATCH 13/28] staging: wilc1000: change type of argument in host_int_set_wfi_drv_handler Tony Cho
@ 2015-07-31  7:38 ` Tony Cho
  2015-07-31  7:38 ` [PATCH 15/28] staging: wilc1000: fix cast from pointer to integer warning Tony Cho
                   ` (14 subsequent siblings)
  28 siblings, 0 replies; 35+ messages in thread
From: Tony Cho @ 2015-07-31  7:38 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, johnny.kim, chris.park, rachel.kim,
	austin.shin, tony.cho, glen.lee, leo.kim, jude.lee, robin.hwang,
	Nicolas.FERRE

From: glen lee <glen.lee@atmel.com>

This patch removes unnecessary type cast since the u32 type parameter in
host_int_set_wfi_drv_handler was changed with WILC_WFIDrvHandle.
Therefore, No need to cast u32.

Signed-off-by: glen lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
---
 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index c2ef46f..d077aed 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -736,7 +736,7 @@ static int WILC_WFI_CfgScan(struct wiphy *wiphy, struct cfg80211_scan_request *r
 
 	priv->u32RcvdChCount = 0;
 
-	host_int_set_wfi_drv_handler((u32)priv->hWILCWFIDrv);
+	host_int_set_wfi_drv_handler(priv->hWILCWFIDrv);
 
 
 	reset_shadow_found(priv);
@@ -831,7 +831,7 @@ static int WILC_WFI_CfgConnect(struct wiphy *wiphy, struct net_device *dev,
 	priv = wiphy_priv(wiphy);
 	pstrWFIDrv = (tstrWILC_WFIDrv *)(priv->hWILCWFIDrv);
 
-	host_int_set_wfi_drv_handler((u32)priv->hWILCWFIDrv);
+	host_int_set_wfi_drv_handler(priv->hWILCWFIDrv);
 
 	PRINT_D(CFG80211_DBG, "Connecting to SSID [%s] on netdev [%p] host if [%p]\n", sme->ssid, dev, priv->hWILCWFIDrv);
 	#ifdef WILC_P2P
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 15/28] staging: wilc1000: fix cast from pointer to integer warning
  2015-07-31  7:38 [PATCH 00/28] removing the compile warnings for 64-bit Tony Cho
                   ` (13 preceding siblings ...)
  2015-07-31  7:38 ` [PATCH 14/28] staging: wilc1000: remove unnecessary type cast " Tony Cho
@ 2015-07-31  7:38 ` Tony Cho
  2015-07-31  7:38 ` [PATCH 16/28] staging: wilc1000: change type of variable Tony Cho
                   ` (13 subsequent siblings)
  28 siblings, 0 replies; 35+ messages in thread
From: Tony Cho @ 2015-07-31  7:38 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, johnny.kim, chris.park, rachel.kim,
	austin.shin, tony.cho, glen.lee, leo.kim, jude.lee, robin.hwang,
	Nicolas.FERRE

From: glen lee <glen.lee@atmel.com>

This patch removes unnecessary type cast because drvHandler type was change with
WILC_WFIDrvHandle.

drivers/staging/wilc1000/linux_wlan.c:2014:51: warning: cast from pointer to
integer of different size [-Wpointer-to-int-cast]
    g_linux_wlan->strInterfaceInfo[i].drvHandler = (u32)priv->hWILCWFIDrv;

Signed-off-by: glen lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
---
 drivers/staging/wilc1000/linux_wlan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c
index a808722..5dcb30c 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -2011,7 +2011,7 @@ int mac_open(struct net_device *ndev)
 	for (i = 0; i < g_linux_wlan->u8NoIfcs; i++) {
 		if (ndev == g_linux_wlan->strInterfaceInfo[i].wilc_netdev) {
 			memcpy(g_linux_wlan->strInterfaceInfo[i].aSrcAddress, mac_add, ETH_ALEN);
-			g_linux_wlan->strInterfaceInfo[i].drvHandler = (u32)priv->hWILCWFIDrv;
+			g_linux_wlan->strInterfaceInfo[i].drvHandler = priv->hWILCWFIDrv;
 			break;
 		}
 	}
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 16/28] staging: wilc1000: change type of variable
  2015-07-31  7:38 [PATCH 00/28] removing the compile warnings for 64-bit Tony Cho
                   ` (14 preceding siblings ...)
  2015-07-31  7:38 ` [PATCH 15/28] staging: wilc1000: fix cast from pointer to integer warning Tony Cho
@ 2015-07-31  7:38 ` Tony Cho
  2015-07-31  7:38 ` [PATCH 17/28] staging: wilc1000: fix comparison between different type warning Tony Cho
                   ` (12 subsequent siblings)
  28 siblings, 0 replies; 35+ messages in thread
From: Tony Cho @ 2015-07-31  7:38 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, johnny.kim, chris.park, rachel.kim,
	austin.shin, tony.cho, glen.lee, leo.kim, jude.lee, robin.hwang,
	Nicolas.FERRE

From: glen lee <glen.lee@atmel.com>

This patch changes gu8FlushedJoinReqDrvHandler of u32 type with WILC_WFIDrvHandle type.
gu8FlushedJoinReqDrvHandler is used to hold driver handler for comparison but the
type mismatches with it.

Signed-off-by: glen lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
---
 drivers/staging/wilc1000/host_interface.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 38d047d..d5bd23d 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -579,7 +579,7 @@ u8 gu8Flushed11iMode;
 u8 gu8FlushedAuthType;
 u32 gu32FlushedJoinReqSize;
 u32 gu32FlushedInfoElemAsocSize;
-u32 gu8FlushedJoinReqDrvHandler;
+WILC_WFIDrvHandle 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 */
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 17/28] staging: wilc1000: fix comparison between different type warning
  2015-07-31  7:38 [PATCH 00/28] removing the compile warnings for 64-bit Tony Cho
                   ` (15 preceding siblings ...)
  2015-07-31  7:38 ` [PATCH 16/28] staging: wilc1000: change type of variable Tony Cho
@ 2015-07-31  7:38 ` Tony Cho
  2015-07-31  7:38 ` [PATCH 18/28] staging: wilc1000: change pstrWFIDrv with drvHandler Tony Cho
                   ` (11 subsequent siblings)
  28 siblings, 0 replies; 35+ messages in thread
From: Tony Cho @ 2015-07-31  7:38 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, johnny.kim, chris.park, rachel.kim,
	austin.shin, tony.cho, glen.lee, leo.kim, jude.lee, robin.hwang,
	Nicolas.FERRE

From: glen lee <glen.lee@atmel.com>

This patch removes casting (u32) which makes compile warnings.
The type of gu8FlushedJoinReqDrvHandler was changed with WILC_WFIDrvHandle same as
drvHandler.

drivers/staging/wilc1000/host_interface.c:2197:68: warning: comparison between
pointer and integer [enabled by default]
  if (gu8FlushedInfoElemAsoc != NULL && gu8FlushedJoinReqDrvHandler == (u32)drvHandler) {

Signed-off-by: glen lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
---
 drivers/staging/wilc1000/host_interface.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index d5bd23d..7962f06 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -2190,11 +2190,11 @@ static s32 Handle_ConnectTimeout(WILC_WFIDrvHandle drvHandler)
 	WILC_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) {
 		WILC_FREE(gu8FlushedJoinReq);
 		gu8FlushedJoinReq = NULL;
 	}
-	if (gu8FlushedInfoElemAsoc != NULL && gu8FlushedJoinReqDrvHandler == (u32)drvHandler) {
+	if (gu8FlushedInfoElemAsoc != NULL && gu8FlushedJoinReqDrvHandler == drvHandler) {
 		WILC_FREE(gu8FlushedInfoElemAsoc);
 		gu8FlushedInfoElemAsoc = NULL;
 	}
@@ -2615,11 +2615,11 @@ static s32 Handle_RcvdGnrlAsyncInfo(WILC_WFIDrvHandle drvHandler, tstrRcvdGnrlAs
 			/*BugID_5213*/
 			/*Freeing flushed join request params on receiving*/
 			/*MAC_DISCONNECTED while connected*/
-			if (gu8FlushedJoinReq != NULL && gu8FlushedJoinReqDrvHandler == (u32)drvHandler) {
+			if (gu8FlushedJoinReq != NULL && gu8FlushedJoinReqDrvHandler == drvHandler) {
 				WILC_FREE(gu8FlushedJoinReq);
 				gu8FlushedJoinReq = NULL;
 			}
-			if (gu8FlushedInfoElemAsoc != NULL && gu8FlushedJoinReqDrvHandler == (u32)drvHandler) {
+			if (gu8FlushedInfoElemAsoc != NULL && gu8FlushedJoinReqDrvHandler == drvHandler) {
 				WILC_FREE(gu8FlushedInfoElemAsoc);
 				gu8FlushedInfoElemAsoc = NULL;
 			}
@@ -3116,11 +3116,11 @@ static void Handle_Disconnect(WILC_WFIDrvHandle drvHandler)
 
 
 		/*BugID_5137*/
-		if (gu8FlushedJoinReq != NULL && gu8FlushedJoinReqDrvHandler == (u32)drvHandler) {
+		if (gu8FlushedJoinReq != NULL && gu8FlushedJoinReqDrvHandler == drvHandler) {
 			WILC_FREE(gu8FlushedJoinReq);
 			gu8FlushedJoinReq = NULL;
 		}
-		if (gu8FlushedInfoElemAsoc != NULL && gu8FlushedJoinReqDrvHandler == (u32)drvHandler) {
+		if (gu8FlushedInfoElemAsoc != NULL && gu8FlushedJoinReqDrvHandler == drvHandler) {
 			WILC_FREE(gu8FlushedInfoElemAsoc);
 			gu8FlushedInfoElemAsoc = NULL;
 		}
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 18/28] staging: wilc1000: change pstrWFIDrv with drvHandler
  2015-07-31  7:38 [PATCH 00/28] removing the compile warnings for 64-bit Tony Cho
                   ` (16 preceding siblings ...)
  2015-07-31  7:38 ` [PATCH 17/28] staging: wilc1000: fix comparison between different type warning Tony Cho
@ 2015-07-31  7:38 ` Tony Cho
  2015-07-31  7:38 ` [PATCH 19/28] staging: wilc1000: change type of variable in tstrHostIfSetDrvHandler Tony Cho
                   ` (10 subsequent siblings)
  28 siblings, 0 replies; 35+ messages in thread
From: Tony Cho @ 2015-07-31  7:38 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, johnny.kim, chris.park, rachel.kim,
	austin.shin, tony.cho, glen.lee, leo.kim, jude.lee, robin.hwang,
	Nicolas.FERRE

From: glen lee <glen.lee@atmel.com>

As type of gu8FlushedJoinReqDrvHandler was changed with WILC_WFIDrvHandle,
change right value with drvHandler to match type.

Signed-off-by: glen lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
---
 drivers/staging/wilc1000/host_interface.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 7962f06..fae7fd5 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -1939,7 +1939,7 @@ static s32 Handle_Connect(WILC_WFIDrvHandle drvHandler, tstrHostIFconnectAttr *p
 	/*BugID_5137*/
 	if (WILC_memcmp("DIRECT-", pstrHostIFconnectAttr->pu8ssid, 7)) {
 		memcpy(gu8FlushedJoinReq, pu8CurrByte, gu32FlushedJoinReqSize);
-		gu8FlushedJoinReqDrvHandler = (u32)pstrWFIDrv;
+		gu8FlushedJoinReqDrvHandler = drvHandler;
 	}
 
 	PRINT_D(GENERIC_DBG, "send HOST_IF_WAITING_CONN_RESP\n");
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 19/28] staging: wilc1000: change type of variable in tstrHostIfSetDrvHandler
  2015-07-31  7:38 [PATCH 00/28] removing the compile warnings for 64-bit Tony Cho
                   ` (17 preceding siblings ...)
  2015-07-31  7:38 ` [PATCH 18/28] staging: wilc1000: change pstrWFIDrv with drvHandler Tony Cho
@ 2015-07-31  7:38 ` Tony Cho
  2015-07-31  7:38 ` [PATCH 20/28] staging: wilc1000: remove unnecessary type case Tony Cho
                   ` (9 subsequent siblings)
  28 siblings, 0 replies; 35+ messages in thread
From: Tony Cho @ 2015-07-31  7:38 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, johnny.kim, chris.park, rachel.kim,
	austin.shin, tony.cho, glen.lee, leo.kim, jude.lee, robin.hwang,
	Nicolas.FERRE

From: glen lee <glen.lee@atmel.com>

This patch changes u32Address of u32 type with WILC_WFIDrvHandle type in
the structure tstrHostIfSetDrvHandler because u32Address is used to hold
driver handler.

Signed-off-by: glen lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
---
 drivers/staging/wilc1000/host_interface.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wilc1000/host_interface.h b/drivers/staging/wilc1000/host_interface.h
index 2ced05f..fffbcca 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -269,7 +269,7 @@ typedef struct {
 } tstrWILC_UsrConnReq;
 
 typedef struct {
-	u32 u32Address;
+	WILC_WFIDrvHandle u32Address;
 } tstrHostIfSetDrvHandler;
 
 typedef struct {
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 20/28] staging: wilc1000: remove unnecessary type case
  2015-07-31  7:38 [PATCH 00/28] removing the compile warnings for 64-bit Tony Cho
                   ` (18 preceding siblings ...)
  2015-07-31  7:38 ` [PATCH 19/28] staging: wilc1000: change type of variable in tstrHostIfSetDrvHandler Tony Cho
@ 2015-07-31  7:38 ` Tony Cho
  2015-07-31  7:38 ` [PATCH 21/28] staging: wilc1000: remove unwanted type cast Tony Cho
                   ` (8 subsequent siblings)
  28 siblings, 0 replies; 35+ messages in thread
From: Tony Cho @ 2015-07-31  7:38 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, johnny.kim, chris.park, rachel.kim,
	austin.shin, tony.cho, glen.lee, leo.kim, jude.lee, robin.hwang,
	Nicolas.FERRE

From: glen lee <glen.lee@atmel.com>

This patch removes (u32) type cast which makes build warning since
the u32Address of u32 type was changed with WILC_WFIDrvHandle.

Signed-off-by: glen lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
---
 drivers/staging/wilc1000/host_interface.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index fae7fd5..bc9195f 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -656,7 +656,7 @@ static s32 Handle_SetWfiDrvHandler(tstrHostIfSetDrvHandler *pstrHostIfSetDrvHand
 	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv);
 
 
-	if ((pstrHostIfSetDrvHandler->u32Address) == (u32)NULL)
+	if ((pstrHostIfSetDrvHandler->u32Address) == NULL)
 		up(&hSemDeinitDrvHandle);
 
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 21/28] staging: wilc1000: remove unwanted type cast
  2015-07-31  7:38 [PATCH 00/28] removing the compile warnings for 64-bit Tony Cho
                   ` (19 preceding siblings ...)
  2015-07-31  7:38 ` [PATCH 20/28] staging: wilc1000: remove unnecessary type case Tony Cho
@ 2015-07-31  7:38 ` Tony Cho
  2015-07-31  7:38 ` [PATCH 22/28] staging: wilc1000: fix passing argument from incompatible type warning Tony Cho
                   ` (7 subsequent siblings)
  28 siblings, 0 replies; 35+ messages in thread
From: Tony Cho @ 2015-07-31  7:38 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, johnny.kim, chris.park, rachel.kim,
	austin.shin, tony.cho, glen.lee, leo.kim, jude.lee, robin.hwang,
	Nicolas.FERRE

From: glen lee <glen.lee@atmel.com>

This patch removes (u32) type cast which makes build warning because
the parameter of u32 type in the function host_int_set_wfi_drv_handler was
changed with WILC_WFIDrvHandle. Not necessary to cast type.

Signed-off-by: glen lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
---
 drivers/staging/wilc1000/host_interface.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index bc9195f..ab2e082 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -6687,7 +6687,7 @@ s32 host_int_deinit(WILC_WFIDrvHandle hWFIDrv)
 	WILC_TimerDestroy(&(pstrWFIDrv->hRemainOnChannel), NULL);
 	#endif
 
-	host_int_set_wfi_drv_handler((u32)NULL);
+	host_int_set_wfi_drv_handler(NULL);
 	down(&hSemDeinitDrvHandle);
 
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 22/28] staging: wilc1000: fix passing argument from incompatible type warning
  2015-07-31  7:38 [PATCH 00/28] removing the compile warnings for 64-bit Tony Cho
                   ` (20 preceding siblings ...)
  2015-07-31  7:38 ` [PATCH 21/28] staging: wilc1000: remove unwanted type cast Tony Cho
@ 2015-07-31  7:38 ` Tony Cho
  2015-07-31  7:38 ` [PATCH 23/28] staging: wilc1000: change type of parameter in wilc_wlan_cfg_commit Tony Cho
                   ` (6 subsequent siblings)
  28 siblings, 0 replies; 35+ messages in thread
From: Tony Cho @ 2015-07-31  7:38 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, johnny.kim, chris.park, rachel.kim,
	austin.shin, tony.cho, glen.lee, leo.kim, jude.lee, robin.hwang,
	Nicolas.FERRE

From: glen lee <glen.lee@atmel.com>

This patch changes pstrWFIDrv with pstrHostIfSetDrvHandler->u32Address which
is WILC_WFIDrvHandle type.
The type of parameter 5 in SendConfigPkt and u32Address in tstrHostIfSetDrvHandler
was changed with WILC_WFIDrvHandle so the SendConfigPkt needs to take
pstrHostIfSetDrvHandler->u32Address as argument as it is.

Signed-off-by: glen lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
---
 drivers/staging/wilc1000/host_interface.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index ab2e082..953df71 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -653,7 +653,7 @@ static s32 Handle_SetWfiDrvHandler(tstrHostIfSetDrvHandler *pstrHostIfSetDrvHand
 
 	/*Sending Cfg*/
 
-	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrWFIDrv);
+	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, pstrHostIfSetDrvHandler->u32Address);
 
 
 	if ((pstrHostIfSetDrvHandler->u32Address) == NULL)
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 23/28] staging: wilc1000: change type of parameter in wilc_wlan_cfg_commit
  2015-07-31  7:38 [PATCH 00/28] removing the compile warnings for 64-bit Tony Cho
                   ` (21 preceding siblings ...)
  2015-07-31  7:38 ` [PATCH 22/28] staging: wilc1000: fix passing argument from incompatible type warning Tony Cho
@ 2015-07-31  7:38 ` Tony Cho
  2015-07-31  7:38 ` [PATCH 24/28] staging: wilc1000: fix cast from pointer to integer warning Tony Cho
                   ` (5 subsequent siblings)
  28 siblings, 0 replies; 35+ messages in thread
From: Tony Cho @ 2015-07-31  7:38 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, johnny.kim, chris.park, rachel.kim,
	austin.shin, tony.cho, glen.lee, leo.kim, jude.lee, robin.hwang,
	Nicolas.FERRE

From: glen lee <glen.lee@atmel.com>

This patch changes drvHandler of uinit32_t type with WILC_WFIDrvHandle type to match
driver handle type since wilc_wlan_cfg_commit gets drvHandler of WILC_WFIDrvHandle
type as argument now.

Signed-off-by: glen lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
---
 drivers/staging/wilc1000/wilc_wlan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c
index d5fc54b..f5075b26 100644
--- a/drivers/staging/wilc1000/wilc_wlan.c
+++ b/drivers/staging/wilc1000/wilc_wlan.c
@@ -1862,7 +1862,7 @@ static void wilc_wlan_cleanup(void)
 
 }
 
-static int wilc_wlan_cfg_commit(int type, uint32_t drvHandler)
+static int wilc_wlan_cfg_commit(int type, WILC_WFIDrvHandle drvHandler)
 {
 	wilc_wlan_dev_t *p = (wilc_wlan_dev_t *)&g_wlan;
 	wilc_cfg_frame_t *cfg = &p->cfg_frame;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 24/28] staging: wilc1000: fix cast from pointer to integer warning
  2015-07-31  7:38 [PATCH 00/28] removing the compile warnings for 64-bit Tony Cho
                   ` (22 preceding siblings ...)
  2015-07-31  7:38 ` [PATCH 23/28] staging: wilc1000: change type of parameter in wilc_wlan_cfg_commit Tony Cho
@ 2015-07-31  7:38 ` Tony Cho
  2015-07-31 20:51   ` Greg KH
  2015-07-31  7:38 ` [PATCH 25/28] staging: wilc1000: change cast type from pointer to uintptr_t Tony Cho
                   ` (4 subsequent siblings)
  28 siblings, 1 reply; 35+ messages in thread
From: Tony Cho @ 2015-07-31  7:38 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, johnny.kim, chris.park, rachel.kim,
	austin.shin, tony.cho, glen.lee, leo.kim, jude.lee, robin.hwang,
	Nicolas.FERRE

From: glen lee <glen.lee@atmel.com>

To use a pointer as as integer in arithmetic operation, cast type to uintptr_t
as the data type.
This patch changes casting (unsigned int) with (uintptr_t) to do arithmetic operation

Here is build warning.
drivers/staging/wilc1000/linux_wlan.c:2385:20: warning: cast from pointer to
integer of different size [-Wpointer-to-int-cast]
   skb_reserve(skb, (unsigned int)skb->data & 0x3);

Signed-off-by: glen lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
---
 drivers/staging/wilc1000/linux_wlan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c
index 5dcb30c..ec80849 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -2382,7 +2382,7 @@ void frmw_to_linux(uint8_t *buff, uint32_t size, uint32_t pkt_offset)
 			return;
 		}
 
-		skb_reserve(skb, (unsigned int)skb->data & 0x3);
+		skb_reserve(skb, (uintptr_t)skb->data & 0x3);
 
 		if (g_linux_wlan == NULL || wilc_netdev == NULL)
 			PRINT_ER("wilc_netdev in g_linux_wlan is NULL");
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 25/28] staging: wilc1000: change cast type from pointer to uintptr_t
  2015-07-31  7:38 [PATCH 00/28] removing the compile warnings for 64-bit Tony Cho
                   ` (23 preceding siblings ...)
  2015-07-31  7:38 ` [PATCH 24/28] staging: wilc1000: fix cast from pointer to integer warning Tony Cho
@ 2015-07-31  7:38 ` Tony Cho
  2015-07-31 20:50   ` Greg KH
  2015-07-31  7:38 ` [PATCH 26/28] staging: wilc1000: remove unused variable Tony Cho
                   ` (3 subsequent siblings)
  28 siblings, 1 reply; 35+ messages in thread
From: Tony Cho @ 2015-07-31  7:38 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, johnny.kim, chris.park, rachel.kim,
	austin.shin, tony.cho, glen.lee, leo.kim, jude.lee, robin.hwang,
	Nicolas.FERRE

From: glen lee <glen.lee@atmel.com>

To use drvHandler as integer operation, cast type to uintptr_t.

Here is the build warning.
drivers/staging/wilc1000/wilc_wlan.c:1871:23: warning: cast from pointer to
integer of different size [-Wpointer-to-int-cast]
  int driver_handler = (u32)drvHandler;

Signed-off-by: glen lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
---
 drivers/staging/wilc1000/linux_wlan.c | 2 +-
 drivers/staging/wilc1000/wilc_wlan.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c
index ec80849..14c2071 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -1056,7 +1056,7 @@ static int linux_wlan_init_test_config(struct net_device *dev, linux_wlan_t *p_n
 		goto _fail_;
 	}
 
-	*(int *)c_val = (u32)pstrWFIDrv;
+	*(int *)c_val = (uintptr_t)pstrWFIDrv;
 
 	if (!g_linux_wlan->oup.wlan_cfg_set(1, WID_SET_DRV_HANDLER, c_val, 4, 0, 0))
 		goto _fail_;
diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c
index f5075b26..2cc23d5 100644
--- a/drivers/staging/wilc1000/wilc_wlan.c
+++ b/drivers/staging/wilc1000/wilc_wlan.c
@@ -1868,7 +1868,7 @@ static int wilc_wlan_cfg_commit(int type, WILC_WFIDrvHandle drvHandler)
 	wilc_cfg_frame_t *cfg = &p->cfg_frame;
 	int total_len = p->cfg_frame_offset + 4 + DRIVER_HANDLER_SIZE;
 	int seq_no = p->cfg_seq_no % 256;
-	int driver_handler = (u32)drvHandler;
+	int driver_handler = (uintptr_t)drvHandler;
 
 
 	/**
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 26/28] staging: wilc1000: remove unused variable
  2015-07-31  7:38 [PATCH 00/28] removing the compile warnings for 64-bit Tony Cho
                   ` (24 preceding siblings ...)
  2015-07-31  7:38 ` [PATCH 25/28] staging: wilc1000: change cast type from pointer to uintptr_t Tony Cho
@ 2015-07-31  7:38 ` Tony Cho
  2015-07-31  7:38 ` [PATCH 27/28] staging: wilc1000: fix casting build warning Tony Cho
                   ` (2 subsequent siblings)
  28 siblings, 0 replies; 35+ messages in thread
From: Tony Cho @ 2015-07-31  7:38 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, johnny.kim, chris.park, rachel.kim,
	austin.shin, tony.cho, glen.lee, leo.kim, jude.lee, robin.hwang,
	Nicolas.FERRE

From: glen lee <glen.lee@atmel.com>

This patch removes unused variable pstrWFIDrv.

Signed-off-by: glen lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
---
 drivers/staging/wilc1000/host_interface.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 953df71..c5db385 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -642,7 +642,6 @@ static s32 Handle_SetWfiDrvHandler(tstrHostIfSetDrvHandler *pstrHostIfSetDrvHand
 
 	s32 s32Error = WILC_SUCCESS;
 	tstrWID	strWID;
-	tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)((pstrHostIfSetDrvHandler->u32Address));
 
 
 	/*prepare configuration packet*/
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 27/28] staging: wilc1000: fix casting build warning
  2015-07-31  7:38 [PATCH 00/28] removing the compile warnings for 64-bit Tony Cho
                   ` (25 preceding siblings ...)
  2015-07-31  7:38 ` [PATCH 26/28] staging: wilc1000: remove unused variable Tony Cho
@ 2015-07-31  7:38 ` Tony Cho
  2015-07-31  7:38 ` [PATCH 28/28] staging: wilc1000: change data type of variable Tony Cho
  2015-07-31 12:49 ` [PATCH 00/28] removing the compile warnings for 64-bit Sudip Mukherjee
  28 siblings, 0 replies; 35+ messages in thread
From: Tony Cho @ 2015-07-31  7:38 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, johnny.kim, chris.park, rachel.kim,
	austin.shin, tony.cho, glen.lee, leo.kim, jude.lee, robin.hwang,
	Nicolas.FERRE

From: glen lee <glen.lee@atmel.com>

u32Mode type is u32 and it indicates integer type operation mode.
So change (32)NULL with 0.

drivers/staging/wilc1000/host_interface.c:704:47: warning: cast from pointer
to integer of different size [-Wpointer-to-int-cast]
  if ((pstrHostIfSetOperationMode->u32Mode) == (u32)NULL)

Signed-off-by: glen lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
---
 drivers/staging/wilc1000/host_interface.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index c5db385..b36f98c 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -700,7 +700,7 @@ static s32 Handle_SetOperationMode(WILC_WFIDrvHandle drvHandler, tstrHostIfSetOp
 	s32Error = SendConfigPkt(SET_CFG, &strWID, 1, true, drvHandler);
 
 
-	if ((pstrHostIfSetOperationMode->u32Mode) == (u32)NULL)
+	if ((pstrHostIfSetOperationMode->u32Mode) == 0)
 		up(&hSemDeinitDrvHandle);
 
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 28/28] staging: wilc1000: change data type of variable
  2015-07-31  7:38 [PATCH 00/28] removing the compile warnings for 64-bit Tony Cho
                   ` (26 preceding siblings ...)
  2015-07-31  7:38 ` [PATCH 27/28] staging: wilc1000: fix casting build warning Tony Cho
@ 2015-07-31  7:38 ` Tony Cho
  2015-07-31 20:48   ` Greg KH
  2015-07-31 12:49 ` [PATCH 00/28] removing the compile warnings for 64-bit Sudip Mukherjee
  28 siblings, 1 reply; 35+ messages in thread
From: Tony Cho @ 2015-07-31  7:38 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, johnny.kim, chris.park, rachel.kim,
	austin.shin, tony.cho, glen.lee, leo.kim, jude.lee, robin.hwang,
	Nicolas.FERRE

From: glen lee <glen.lee@atmel.com>

drvHandler of u32 type is used to handle integer type pointer operation which
cause build warnings.
To use integer type varialbe as pointer, drvHandler data type need to be changed
with uintptr_t type.

drivers/staging/wilc1000/host_interface.c: In function ‘NetworkInfoReceived’:
drivers/staging/wilc1000/host_interface.c:6767:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
               ^
drivers/staging/wilc1000/host_interface.c: In function ‘GnrlAsyncInfoReceived’:
drivers/staging/wilc1000/host_interface.c:6819:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
               ^
drivers/staging/wilc1000/host_interface.c: In function ‘host_int_ScanCompleteReceived’:
drivers/staging/wilc1000/host_interface.c:6878:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;

Signed-off-by: glen lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
---
 drivers/staging/wilc1000/host_interface.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index b36f98c..668e47e 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -6760,7 +6760,7 @@ void NetworkInfoReceived(u8 *pu8Buffer, u32 u32Length)
 {
 	s32 s32Error = WILC_SUCCESS;
 	tstrHostIFmsg strHostIFmsg;
-	u32 drvHandler;
+	uintptr_t drvHandler;
 	tstrWILC_WFIDrv *pstrWFIDrv = NULL;
 
 	drvHandler = ((pu8Buffer[u32Length - 4]) | (pu8Buffer[u32Length - 3] << 8) | (pu8Buffer[u32Length - 2] << 16) | (pu8Buffer[u32Length - 1] << 24));
@@ -6809,7 +6809,7 @@ void GnrlAsyncInfoReceived(u8 *pu8Buffer, u32 u32Length)
 {
 	s32 s32Error = WILC_SUCCESS;
 	tstrHostIFmsg strHostIFmsg;
-	u32 drvHandler;
+	uintptr_t drvHandler;
 	tstrWILC_WFIDrv *pstrWFIDrv = NULL;
 
 	/*BugID_5348*/
@@ -6871,7 +6871,7 @@ void host_int_ScanCompleteReceived(u8 *pu8Buffer, u32 u32Length)
 {
 	s32 s32Error = WILC_SUCCESS;
 	tstrHostIFmsg strHostIFmsg;
-	u32 drvHandler;
+	uintptr_t drvHandler;
 	tstrWILC_WFIDrv *pstrWFIDrv = NULL;
 
 	drvHandler = ((pu8Buffer[u32Length - 4]) | (pu8Buffer[u32Length - 3] << 8) | (pu8Buffer[u32Length - 2] << 16) | (pu8Buffer[u32Length - 1] << 24));
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* Re: [PATCH 00/28] removing the compile warnings for 64-bit
  2015-07-31  7:38 [PATCH 00/28] removing the compile warnings for 64-bit Tony Cho
                   ` (27 preceding siblings ...)
  2015-07-31  7:38 ` [PATCH 28/28] staging: wilc1000: change data type of variable Tony Cho
@ 2015-07-31 12:49 ` Sudip Mukherjee
  28 siblings, 0 replies; 35+ messages in thread
From: Sudip Mukherjee @ 2015-07-31 12:49 UTC (permalink / raw)
  To: Tony Cho
  Cc: gregkh, devel, rachel.kim, chris.park, austin.shin,
	linux-wireless, johnny.kim, Nicolas.FERRE, robin.hwang, jude.lee,
	leo.kim

On Fri, Jul 31, 2015 at 04:38:08PM +0900, Tony Cho wrote:
> Hi Greg,
> This patch focuses on removing the compile warnings for 64bit incompatability.
> Most warnings are due to senseless type castings from driver handler to u32 and
> also to void pointers. They are removed by using the same handler with this
> series of patch. All warnings disappear.
At the end of the series it has no warnings on my 64bit system. But some
of the patch in the series increased the number of warnings.
Before this series I had 77 warnings. patch 1/28 increased that to 82.
patch 4/28 increased the number of warnings to 133. But after that it
started gradually decreasing. And at the end 0.

regards
sudip

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH 01/28] staging: wilc1000: change type of driver handler in host interface msg
  2015-07-31  7:38 ` [PATCH 01/28] staging: wilc1000: change type of driver handler in host interface msg Tony Cho
@ 2015-07-31 20:46   ` Greg KH
  0 siblings, 0 replies; 35+ messages in thread
From: Greg KH @ 2015-07-31 20:46 UTC (permalink / raw)
  To: Tony Cho
  Cc: devel, rachel.kim, chris.park, austin.shin, linux-wireless,
	johnny.kim, Nicolas.FERRE, robin.hwang, jude.lee, leo.kim

On Fri, Jul 31, 2015 at 04:38:09PM +0900, Tony Cho wrote:
> From: glen lee <glen.lee@atmel.com>
> 
> This patch changes void pointer type of drvHandler with WILC_WFIDrvHandle
> type variable since the structure member drvHandler in tstrHostIFmsg is
> explicitly used to pass driver pointer as handler.
> The void pointer as argument is ambiguous for the functions to handle correctly.
> 
> After this patch, ATWILC_WFIDrvHandle type will be used as handler type to
> interface with other functions which does not need to know all about wifi driver
> structre tstrATWILC_WFIDrv.
> As a consequence of this patch, several patches will be followed up to change
> type of parameter which take drvHandler as argument.
> 
> Signed-off-by: glen lee <glen.lee@atmel.com>
> Signed-off-by: Tony Cho <tony.cho@atmel.com>
> ---
>  drivers/staging/wilc1000/host_interface.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
> index 02aaf39..fb4194a 100644
> --- a/drivers/staging/wilc1000/host_interface.c
> +++ b/drivers/staging/wilc1000/host_interface.c
> @@ -467,7 +467,7 @@ typedef union _tuniHostIFmsgBody {
>  typedef struct _tstrHostIFmsg {
>  	u16 u16MsgId;                                           /*!< Message ID */
>  	tuniHostIFmsgBody uniHostIFmsgBody;             /*!< Message body */
> -	void *drvHandler;
> +	WILC_WFIDrvHandle drvHandler;
>  } tstrHostIFmsg;
>  
>  #ifdef CONNECT_DIRECT

This patch adds build warnings to the tree, which isn't ok.  Change the
variable type and then fix up the places it is used in the same patch.
Right now you have a bunch more "warning: assignment from incompatible
pointer type [-Wincompatible-pointer-types]" added, which isn't ok.

Each patch in a series should do one logical thing, and never add more
build warnings to the build.  Please rework this series to do this
correctly.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH 02/28] staging: wilc1000: change void type of argument with WILC_WFIDrvHandle
  2015-07-31  7:38 ` [PATCH 02/28] staging: wilc1000: change void type of argument with WILC_WFIDrvHandle Tony Cho
@ 2015-07-31 20:46   ` Greg KH
  0 siblings, 0 replies; 35+ messages in thread
From: Greg KH @ 2015-07-31 20:46 UTC (permalink / raw)
  To: Tony Cho
  Cc: devel, rachel.kim, chris.park, austin.shin, linux-wireless,
	johnny.kim, Nicolas.FERRE, robin.hwang, jude.lee, leo.kim

On Fri, Jul 31, 2015 at 04:38:10PM +0900, Tony Cho wrote:
> From: glen lee <glen.lee@atmel.com>

This should probably be "Glen Lee", right?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH 28/28] staging: wilc1000: change data type of variable
  2015-07-31  7:38 ` [PATCH 28/28] staging: wilc1000: change data type of variable Tony Cho
@ 2015-07-31 20:48   ` Greg KH
  0 siblings, 0 replies; 35+ messages in thread
From: Greg KH @ 2015-07-31 20:48 UTC (permalink / raw)
  To: Tony Cho
  Cc: devel, rachel.kim, chris.park, austin.shin, linux-wireless,
	johnny.kim, Nicolas.FERRE, robin.hwang, jude.lee, leo.kim

On Fri, Jul 31, 2015 at 04:38:36PM +0900, Tony Cho wrote:
> From: glen lee <glen.lee@atmel.com>
> 
> drvHandler of u32 type is used to handle integer type pointer operation which
> cause build warnings.
> To use integer type varialbe as pointer, drvHandler data type need to be changed
> with uintptr_t type.
> 
> drivers/staging/wilc1000/host_interface.c: In function ‘NetworkInfoReceived’:
> drivers/staging/wilc1000/host_interface.c:6767:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
>   pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
>                ^
> drivers/staging/wilc1000/host_interface.c: In function ‘GnrlAsyncInfoReceived’:
> drivers/staging/wilc1000/host_interface.c:6819:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
>   pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
>                ^
> drivers/staging/wilc1000/host_interface.c: In function ‘host_int_ScanCompleteReceived’:
> drivers/staging/wilc1000/host_interface.c:6878:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
>   pstrWFIDrv = (tstrWILC_WFIDrv *)drvHandler;
> 
> Signed-off-by: glen lee <glen.lee@atmel.com>
> Signed-off-by: Tony Cho <tony.cho@atmel.com>
> ---
>  drivers/staging/wilc1000/host_interface.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
> index b36f98c..668e47e 100644
> --- a/drivers/staging/wilc1000/host_interface.c
> +++ b/drivers/staging/wilc1000/host_interface.c
> @@ -6760,7 +6760,7 @@ void NetworkInfoReceived(u8 *pu8Buffer, u32 u32Length)
>  {
>  	s32 s32Error = WILC_SUCCESS;
>  	tstrHostIFmsg strHostIFmsg;
> -	u32 drvHandler;
> +	uintptr_t drvHandler;

This isn't a valid kernel type, use "unsigned int *" if that is what you mean.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH 25/28] staging: wilc1000: change cast type from pointer to uintptr_t
  2015-07-31  7:38 ` [PATCH 25/28] staging: wilc1000: change cast type from pointer to uintptr_t Tony Cho
@ 2015-07-31 20:50   ` Greg KH
  0 siblings, 0 replies; 35+ messages in thread
From: Greg KH @ 2015-07-31 20:50 UTC (permalink / raw)
  To: Tony Cho
  Cc: devel, rachel.kim, chris.park, austin.shin, linux-wireless,
	johnny.kim, Nicolas.FERRE, robin.hwang, jude.lee, leo.kim

On Fri, Jul 31, 2015 at 04:38:33PM +0900, Tony Cho wrote:
> From: glen lee <glen.lee@atmel.com>
> 
> To use drvHandler as integer operation, cast type to uintptr_t.
> 
> Here is the build warning.
> drivers/staging/wilc1000/wilc_wlan.c:1871:23: warning: cast from pointer to
> integer of different size [-Wpointer-to-int-cast]
>   int driver_handler = (u32)drvHandler;
> 
> Signed-off-by: glen lee <glen.lee@atmel.com>
> Signed-off-by: Tony Cho <tony.cho@atmel.com>
> ---
>  drivers/staging/wilc1000/linux_wlan.c | 2 +-
>  drivers/staging/wilc1000/wilc_wlan.c  | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c
> index ec80849..14c2071 100644
> --- a/drivers/staging/wilc1000/linux_wlan.c
> +++ b/drivers/staging/wilc1000/linux_wlan.c
> @@ -1056,7 +1056,7 @@ static int linux_wlan_init_test_config(struct net_device *dev, linux_wlan_t *p_n
>  		goto _fail_;
>  	}
>  
> -	*(int *)c_val = (u32)pstrWFIDrv;
> +	*(int *)c_val = (uintptr_t)pstrWFIDrv;

Why is the cast needed at all?

>  
>  	if (!g_linux_wlan->oup.wlan_cfg_set(1, WID_SET_DRV_HANDLER, c_val, 4, 0, 0))
>  		goto _fail_;
> diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c
> index f5075b26..2cc23d5 100644
> --- a/drivers/staging/wilc1000/wilc_wlan.c
> +++ b/drivers/staging/wilc1000/wilc_wlan.c
> @@ -1868,7 +1868,7 @@ static int wilc_wlan_cfg_commit(int type, WILC_WFIDrvHandle drvHandler)
>  	wilc_cfg_frame_t *cfg = &p->cfg_frame;
>  	int total_len = p->cfg_frame_offset + 4 + DRIVER_HANDLER_SIZE;
>  	int seq_no = p->cfg_seq_no % 256;
> -	int driver_handler = (u32)drvHandler;
> +	int driver_handler = (uintptr_t)drvHandler;

You can't cast a pointer to an integer, it does not work on all systems,
which is what the compiler warnings is telling you.

If this really is a pointer, use a pointer, otherwise, use an integer,
but don't cast between the two.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH 24/28] staging: wilc1000: fix cast from pointer to integer warning
  2015-07-31  7:38 ` [PATCH 24/28] staging: wilc1000: fix cast from pointer to integer warning Tony Cho
@ 2015-07-31 20:51   ` Greg KH
  0 siblings, 0 replies; 35+ messages in thread
From: Greg KH @ 2015-07-31 20:51 UTC (permalink / raw)
  To: Tony Cho
  Cc: devel, rachel.kim, chris.park, austin.shin, linux-wireless,
	johnny.kim, Nicolas.FERRE, robin.hwang, jude.lee, leo.kim

On Fri, Jul 31, 2015 at 04:38:32PM +0900, Tony Cho wrote:
> From: glen lee <glen.lee@atmel.com>
> 
> To use a pointer as as integer in arithmetic operation, cast type to uintptr_t
> as the data type.
> This patch changes casting (unsigned int) with (uintptr_t) to do arithmetic operation
> 
> Here is build warning.
> drivers/staging/wilc1000/linux_wlan.c:2385:20: warning: cast from pointer to
> integer of different size [-Wpointer-to-int-cast]
>    skb_reserve(skb, (unsigned int)skb->data & 0x3);
> 
> Signed-off-by: glen lee <glen.lee@atmel.com>
> Signed-off-by: Tony Cho <tony.cho@atmel.com>
> ---
>  drivers/staging/wilc1000/linux_wlan.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c
> index 5dcb30c..ec80849 100644
> --- a/drivers/staging/wilc1000/linux_wlan.c
> +++ b/drivers/staging/wilc1000/linux_wlan.c
> @@ -2382,7 +2382,7 @@ void frmw_to_linux(uint8_t *buff, uint32_t size, uint32_t pkt_offset)
>  			return;
>  		}
>  
> -		skb_reserve(skb, (unsigned int)skb->data & 0x3);
> +		skb_reserve(skb, (uintptr_t)skb->data & 0x3);

Why is a cast needed at all here?

And again, don't use uintptr_t, it is not a kernel type.

I've stopped reviewing here, sorry, please fix up the series and resend.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2015-07-31 20:51 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-31  7:38 [PATCH 00/28] removing the compile warnings for 64-bit Tony Cho
2015-07-31  7:38 ` [PATCH 01/28] staging: wilc1000: change type of driver handler in host interface msg Tony Cho
2015-07-31 20:46   ` Greg KH
2015-07-31  7:38 ` [PATCH 02/28] staging: wilc1000: change void type of argument with WILC_WFIDrvHandle Tony Cho
2015-07-31 20:46   ` Greg KH
2015-07-31  7:38 ` [PATCH 03/28] staging: wilc1000: move structure WILC_WFIDrvHandle into wilc_wlan_if.h Tony Cho
2015-07-31  7:38 ` [PATCH 04/28] staging: wilc1000: change type of argument 5 in SendConfigPkt Tony Cho
2015-07-31  7:38 ` [PATCH 05/28] staging: wilc1000: remove unnecessary type cast Tony Cho
2015-07-31  7:38 ` [PATCH 06/28] staging: wilc1000: chage driver handler variable in SendConfigPkt Tony Cho
2015-07-31  7:38 ` [PATCH 07/28] staging: wilc1000: remove unused variables Tony Cho
2015-07-31  7:38 ` [PATCH 08/28] staging: wilc1000: change drvHandler type in wlan_cfg_get Tony Cho
2015-07-31  7:38 ` [PATCH 09/28] staging: wilc1000: change drvHandler type in wlan_cfg_set Tony Cho
2015-07-31  7:38 ` [PATCH 10/28] staging: wilc1000: change driver handle variable Tony Cho
2015-07-31  7:38 ` [PATCH 11/28] staging: wilc1000: fix incompatible type in assignment warning Tony Cho
2015-07-31  7:38 ` [PATCH 12/28] staging: wilc1000: change type of driver handler in tstrInterfaceInfo Tony Cho
2015-07-31  7:38 ` [PATCH 13/28] staging: wilc1000: change type of argument in host_int_set_wfi_drv_handler Tony Cho
2015-07-31  7:38 ` [PATCH 14/28] staging: wilc1000: remove unnecessary type cast " Tony Cho
2015-07-31  7:38 ` [PATCH 15/28] staging: wilc1000: fix cast from pointer to integer warning Tony Cho
2015-07-31  7:38 ` [PATCH 16/28] staging: wilc1000: change type of variable Tony Cho
2015-07-31  7:38 ` [PATCH 17/28] staging: wilc1000: fix comparison between different type warning Tony Cho
2015-07-31  7:38 ` [PATCH 18/28] staging: wilc1000: change pstrWFIDrv with drvHandler Tony Cho
2015-07-31  7:38 ` [PATCH 19/28] staging: wilc1000: change type of variable in tstrHostIfSetDrvHandler Tony Cho
2015-07-31  7:38 ` [PATCH 20/28] staging: wilc1000: remove unnecessary type case Tony Cho
2015-07-31  7:38 ` [PATCH 21/28] staging: wilc1000: remove unwanted type cast Tony Cho
2015-07-31  7:38 ` [PATCH 22/28] staging: wilc1000: fix passing argument from incompatible type warning Tony Cho
2015-07-31  7:38 ` [PATCH 23/28] staging: wilc1000: change type of parameter in wilc_wlan_cfg_commit Tony Cho
2015-07-31  7:38 ` [PATCH 24/28] staging: wilc1000: fix cast from pointer to integer warning Tony Cho
2015-07-31 20:51   ` Greg KH
2015-07-31  7:38 ` [PATCH 25/28] staging: wilc1000: change cast type from pointer to uintptr_t Tony Cho
2015-07-31 20:50   ` Greg KH
2015-07-31  7:38 ` [PATCH 26/28] staging: wilc1000: remove unused variable Tony Cho
2015-07-31  7:38 ` [PATCH 27/28] staging: wilc1000: fix casting build warning Tony Cho
2015-07-31  7:38 ` [PATCH 28/28] staging: wilc1000: change data type of variable Tony Cho
2015-07-31 20:48   ` Greg KH
2015-07-31 12:49 ` [PATCH 00/28] removing the compile warnings for 64-bit Sudip Mukherjee

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.