diff mbox

[01/28] staging: wilc1000: change type of driver handler in host interface msg

Message ID 1438328316-30197-2-git-send-email-tony.cho@atmel.com (mailing list archive)
State Not Applicable
Delegated to: Kalle Valo
Headers show

Commit Message

Tony Cho July 31, 2015, 7:38 a.m. UTC
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(-)

Comments

Greg KH July 31, 2015, 8:46 p.m. UTC | #1
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
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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