Skip to contentSkip to conversation

Staging: wilc1000: Fix build break due to undeclared *wilc and implicit declaration of init_irq

PATCH Superseded Punit Vara 2 participants 6 messages Nov 7, 2015 – Nov 8, 2015 Staging

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Punit Vara

author
#0 lore raw

PATCH 1/1 Staging: wilc1000: Fix build break due to undeclared *wilc and implicit declaration of init_irq

This patch is to the linux_wlan.c file that fixes up break found during make drivers/staging/wilc1000/linux_wlan.o

Patch add following things to file :
-struct wilc *wilc declaration
-init_irq declaration
-At preprocessor (!defined WILC_SDIO) to defination of init_irq -At preprocessor (!defined WILC_SDIO) to defination isr_uh_routine

---
 drivers/staging/wilc1000/linux_wlan.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/staging/wilc1000/linux_wlan.c +6 -2
index 09ddba2..0a21e62 100644
@@ -224,7 +224,7 @@ static int dev_state_ev_handler(struct notifier_block *this, unsigned long event
 
 }
 
-#if (defined WILC_SPI) || (defined WILC_SDIO_IRQ_GPIO)
+#if (defined WILC_SPI) || (defined WILC_SDIO_IRQ_GPIO) || (!defined WILC_SDIO)
 static irqreturn_t isr_uh_routine(int irq, void *user_data)
 {
 	perInterface_wlan_t *nic;
@@ -264,7 +264,7 @@ irqreturn_t isr_bh_routine(int irq, void *userdata)
 	return IRQ_HANDLED;
 }
 
-#if (defined WILC_SPI) || (defined WILC_SDIO_IRQ_GPIO)
+#if (defined WILC_SPI) || (defined WILC_SDIO_IRQ_GPIO) || (!defined WILC_SDIO)
 static int init_irq(struct net_device *dev)
 {
 	int ret = 0;
@@ -1082,6 +1082,9 @@ static void wlan_deinitialize_threads(struct net_device *dev)
 		wl->txq_thread = NULL;
 	}
 }
+
+#if (!defined WILC_SDIO) || (defined WILC_SDIO_IRQ_GPIO)
+static int init_irq(struct net_device *dev);
+#endif
 
 int wilc1000_wlan_init(struct net_device *dev, perInterface_wlan_t *p_nic)

{
@@ -1791,6 +1794,7 @@ int wilc_netdev_init(struct wilc **wilc)
/*The 1st function called after module inserted*/ static int __init init_wilc_driver(void)
{
+ struct wilc *wilc;
#ifdef WILC_SPI
struct wilc *wilc;
#endif

Signature · 1 line
2.6.2
#1 lore raw

Review int wilc_netdev_init(struct wilc **wilc) · line 1800

Quoted 10 lines · Punit Vara

int wilc1000_wlan_init(struct net_device *dev, perInterface_wlan_t *p_nic) {

(quoted diff) +1 -0
@@ -1791,6 +1794,7 @@ int wilc_netdev_init(struct wilc **wilc)
 /*The 1st function called after module inserted*/
 static int __init init_wilc_driver(void)
 {
+	struct wilc *wilc;
 #ifdef WILC_SPI
 	struct wilc *wilc;
 #endif

This patch still has the same problems as before.

regards,
dan carpenter

author
#2 lore raw
Quoted 14 lines · Dan Carpenter

Review int wilc_netdev_init(struct wilc **wilc) · line 1800

Quoted 10 lines · Punit Vara

int wilc1000_wlan_init(struct net_device *dev, perInterface_wlan_t *p_nic) {

(quoted diff) +1 -0
@@ -1791,6 +1794,7 @@ int wilc_netdev_init(struct wilc **wilc)
 /*The 1st function called after module inserted*/
 static int __init init_wilc_driver(void)
 {
+     struct wilc *wilc;
 #ifdef WILC_SPI
      struct wilc *wilc;
 #endif

This patch still has the same problems as before.

Quoted 4 lines

regards,
dan carpenter

Should I remove

#ifdef WILC_SPI
      struct wilc *wilc;

#endif

? Built is successful

#3 lore raw

I haven't looked at it, sorry. You'll have to figure it out or if you complain to the original person who broken the build he can figure it out. You are still missing a Fixes tag.

regards,
dan carpenter

author
#4 lore raw
Quoted 6 lines · Dan Carpenter

I haven't looked at it, sorry. You'll have to figure it out or if you complain to the original person who broken the build he can figure it out. You are still missing a Fixes tag.

regards,
dan carpenter

Here I will remove struct wilc *wilc;
and add
#if (defined WILC_SPI) || (!defined WILC_SDIO)

I have used git tag -l in my git tree and found v4.3-rc7 ..That is the tag I have to include in this patch description right ?

author
#5 lore raw
In reply to Dan Carpenter
Quoted 6 lines · Dan Carpenter

I haven't looked at it, sorry. You'll have to figure it out or if you complain to the original person who broken the build he can figure it out. You are still missing a Fixes tag.

regards,
dan carpenter

Actually while building one of my another patch I have found this broken. Now I understand what tag is . Would you tell me how can I find that particular commit which create defeat in this file ? Sorry first time I have encounter this kind of problem so I do not know how to figure it out.