diff mbox

[V2,13/27] staging: wilc1000: host_int_init: add argument net_device

Message ID 1445938083-20445-13-git-send-email-glen.lee@atmel.com (mailing list archive)
State Not Applicable
Delegated to: Kalle Valo
Headers show

Commit Message

Glen Lee Oct. 27, 2015, 9:27 a.m. UTC
This patch add argument net_device and pass netdev private data member wilc
to kthread_run. Pass net_device to the function as well.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
---
 drivers/staging/wilc1000/host_interface.c         | 11 +++++++++--
 drivers/staging/wilc1000/host_interface.h         |  2 +-
 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c |  2 +-
 3 files changed, 11 insertions(+), 4 deletions(-)

Comments

kernel test robot Oct. 27, 2015, 12:12 p.m. UTC | #1
Hi Glen,

[auto build test ERROR on staging/staging-next -- if it's inappropriate base, please suggest rules for selecting the more suitable base]

url:    https://github.com/0day-ci/linux/commits/Glen-Lee/staging-wicl1000-isr_uh_routine-use-netdev-private-wilc/20151027-173115
config: i386-allyesconfig (attached as .config)
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All error/warnings (new ones prefixed by >>):

   In file included from drivers/staging/wilc1000/host_interface.c:5:0:
>> drivers/staging/wilc1000/host_interface.h:914:50: warning: 'struct net_device' declared inside parameter list
    s32 host_int_init(struct net_device *dev, struct host_if_drv **phWFIDrv);
                                                     ^
>> drivers/staging/wilc1000/host_interface.h:914:50: warning: its scope is only this definition or declaration, which is probably not what you want
>> drivers/staging/wilc1000/host_interface.c:4135:5: error: conflicting types for 'host_int_init'
    s32 host_int_init(struct net_device *dev, struct host_if_drv **hif_drv_handler)
        ^
   In file included from drivers/staging/wilc1000/host_interface.c:5:0:
   drivers/staging/wilc1000/host_interface.h:914:5: note: previous declaration of 'host_int_init' was here
    s32 host_int_init(struct net_device *dev, struct host_if_drv **phWFIDrv);
        ^

vim +/host_int_init +4135 drivers/staging/wilc1000/host_interface.c

  4129	
  4130	void host_int_send_network_info_to_host
  4131		(u8 *macStartAddress, u16 u16RxFrameLen, s8 s8Rssi)
  4132	{
  4133	}
  4134	
> 4135	s32 host_int_init(struct net_device *dev, struct host_if_drv **hif_drv_handler)
  4136	{
  4137		s32 result = 0;
  4138		struct host_if_drv *hif_drv;

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
diff mbox

Patch

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 930dcba..f658594 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -7,6 +7,7 @@ 
 #include "wilc_wlan_if.h"
 #include "wilc_msgqueue.h"
 #include <linux/etherdevice.h>
+#include "wilc_wfi_netdevice.h"
 
 extern u8 connecting;
 
@@ -4131,11 +4132,16 @@  void host_int_send_network_info_to_host
 {
 }
 
-s32 host_int_init(struct host_if_drv **hif_drv_handler)
+s32 host_int_init(struct net_device *dev, struct host_if_drv **hif_drv_handler)
 {
 	s32 result = 0;
 	struct host_if_drv *hif_drv;
 	int err;
+	perInterface_wlan_t *nic;
+	struct wilc *wilc;
+
+	nic = netdev_priv(dev);
+	wilc = nic->wilc;
 
 	PRINT_D(HOSTINF_DBG, "Initializing host interface for client %d\n", clients_count + 1);
 
@@ -4181,7 +4187,8 @@  s32 host_int_init(struct host_if_drv **hif_drv_handler)
 			goto _fail_;
 		}
 
-		hif_thread_handler = kthread_run(hostIFthread, NULL, "WILC_kthread");
+		hif_thread_handler = kthread_run(hostIFthread, wilc,
+						 "WILC_kthread");
 
 		if (IS_ERR(hif_thread_handler)) {
 			PRINT_ER("Failed to creat Thread\n");
diff --git a/drivers/staging/wilc1000/host_interface.h b/drivers/staging/wilc1000/host_interface.h
index f3fb628..0fd2eda 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -911,7 +911,7 @@  void host_int_send_network_info_to_host
  *  @date		8 March 2012
  *  @version		1.0
  */
-s32 host_int_init(struct host_if_drv **phWFIDrv);
+s32 host_int_init(struct net_device *dev, struct host_if_drv **phWFIDrv);
 
 /**
  *  @brief              host interface initialization function
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index ac32d2b..21d053d 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -3464,7 +3464,7 @@  int wilc_init_host_int(struct net_device *net)
 	priv->bInP2PlistenState = false;
 
 	sema_init(&(priv->hSemScanReq), 1);
-	s32Error = host_int_init(&priv->hWILCWFIDrv);
+	s32Error = host_int_init(net, &priv->hWILCWFIDrv);
 	if (s32Error)
 		PRINT_ER("Error while initializing hostinterface\n");