Re: [PATCH V2] Staging: wilc1000: Fix build break due to undeclared *wilc and implicit declaration of init_irq

2015-12-01 Thread punit vara
On Mon, Nov 9, 2015 at 3:53 PM, Sudip Mukherjee
<sudipm.mukher...@gmail.com> wrote:
> On Mon, Nov 09, 2015 at 03:43:38PM +0530, punit vara wrote:
>> On Mon, Nov 9, 2015 at 3:31 PM, glen lee <glen@atmel.com> wrote:
>> >
>> >
>> > On 2015년 11월 09일 18:05, punit vara wrote:
>> >>
>> >> On Mon, Nov 9, 2015 at 2:25 PM, glen lee <glen@atmel.com> wrote:
>> >>>
>> >>> On 2015년 11월 09일 17:18, Dan Carpenter wrote:
>> >>>>
>> >>>> On Mon, Nov 09, 2015 at 05:02:48PM +0900, glen lee wrote:
>> >>>>>
>>
>> make ./drivers/staging/wilc1000/this working fine for me
>>
>> but
>>
>> make ./drivers/staging/wilc1000/linux_wlan.o is creates error.
>
> I am also not getting build failure. Can you please post your .config file.
>
> regards
> sudip
I have attached .config file . and please tell me should I focus on
this patch or not . Because build is still broken.For temporary this
patch can be useful to fix the build .Later on as per requirement Glen
can change the code .


config.gz
Description: GNU Zip compressed data


Re: [PATCH V2] Staging: wilc1000: Fix build break due to undeclared *wilc and implicit declaration of init_irq

2015-12-01 Thread punit vara
On Wed, Dec 2, 2015 at 12:30 PM, Sudip Mukherjee
<sudipm.mukher...@gmail.com> wrote:
> On Wed, Dec 02, 2015 at 08:39:10AM +0530, punit vara wrote:
>> On Mon, Nov 9, 2015 at 3:53 PM, Sudip Mukherjee
>> <sudipm.mukher...@gmail.com> wrote:
>> > On Mon, Nov 09, 2015 at 03:43:38PM +0530, punit vara wrote:
>> >> On Mon, Nov 9, 2015 at 3:31 PM, glen lee <glen@atmel.com> wrote:
>> >> >
>> >> >
>> >> > On 2015년 11월 09일 18:05, punit vara wrote:
>> >> >>
>> >> >> On Mon, Nov 9, 2015 at 2:25 PM, glen lee <glen@atmel.com> wrote:
>> >> >>>
>> >> >>> On 2015년 11월 09일 17:18, Dan Carpenter wrote:
>> >> >>>>
>> >> >>>> On Mon, Nov 09, 2015 at 05:02:48PM +0900, glen lee wrote:
>> >> >>>>>
>> >>
>> >> make ./drivers/staging/wilc1000/this working fine for me
>> >>
>> >> but
>> >>
>> >> make ./drivers/staging/wilc1000/linux_wlan.o is creates error.
>> >
>> > I am also not getting build failure. Can you please post your .config file.
>> >
>> > regards
>> > sudip
>> I have attached .config file . and please tell me should I focus on
>> this patch or not . Because build is still broken.For temporary this
>> patch can be useful to fix the build .Later on as per requirement Glen
>> can change the code .
>
> With your config file also I am not getting any build failure. Can you
> please tell what are the exact compilation steps you are following?
>
> Here are my steps after I have copied your config file as .config.
> 1) make oldconfig && make prepare
> 2) make bzImage && make modules
>
> And I dont see any build failure.
> I think you are not building bzImage and the modules before testing wilc
> compilation. And that is why it is unable to find SPI or SDIO.
>
> regards
> sudip
Steps I have followed:
1. I have updated staging tree and checkout to new branch.
2. make drivers/staging/wilc1000/linux_wlan.o

When I have performed second step it automatically ask me about
different modules options "yes/no" I have pressed ENTER in every
option .At last configuration are written to .config. and module start
building and I have found error at last. I will try to perform 2 step
you have suggested .
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH V2] Staging: wilc1000: Fix build break due to undeclared *wilc and implicit declaration of init_irq

2015-11-09 Thread punit vara
On Mon, Nov 9, 2015 at 3:53 PM, Sudip Mukherjee
<sudipm.mukher...@gmail.com> wrote:
> On Mon, Nov 09, 2015 at 03:43:38PM +0530, punit vara wrote:
>> On Mon, Nov 9, 2015 at 3:31 PM, glen lee <glen@atmel.com> wrote:
>> >
>> >
>> > On 2015년 11월 09일 18:05, punit vara wrote:
>> >>
>> >> On Mon, Nov 9, 2015 at 2:25 PM, glen lee <glen@atmel.com> wrote:
>> >>>
>> >>> On 2015년 11월 09일 17:18, Dan Carpenter wrote:
>> >>>>
>> >>>> On Mon, Nov 09, 2015 at 05:02:48PM +0900, glen lee wrote:
>> >>>>>
>>
>> make ./drivers/staging/wilc1000/this working fine for me
>>
>> but
>>
>> make ./drivers/staging/wilc1000/linux_wlan.o is creates error.
>
> I am also not getting build failure. Can you please post your .config file.
>
> regards
> sudip
Can you tell me Sudip where .config file is saved ? Sorry for asking
silly question :-(
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH V2] Staging: wilc1000: Fix build break due to undeclared *wilc and implicit declaration of init_irq

2015-11-09 Thread punit vara
On Mon, Nov 9, 2015 at 2:25 PM, glen lee <glen@atmel.com> wrote:
>
> On 2015년 11월 09일 17:18, Dan Carpenter wrote:
>>
>> On Mon, Nov 09, 2015 at 05:02:48PM +0900, glen lee wrote:
>>>
>>> Hi Punit Vara,
>>>
>>> I cannot find build errors on my build machines.
>>>
>>> According the log which you have posted before says *wilc is undeclared
>>> in the function init_wilc_driver,
>>> which means WILC_SPI is selected because one of SPI or SDIO should be
>>> chosen at the moment.
>>> Hence, struct wilc *wilc should be compiled together.
>>> It looks like wilc1000 is compiled without SPI or SDIO.
>>>
>>> Of course, there are many cases that I don't know, so you could let me
>>> know the wilc1000 build configuration?
>>>
>>> static int __init init_wilc_driver(void)
>>> {
>>> #ifdef WILC_SPI
>>
>> This should be #ifndef WILC_SDIO
>
>
> I will do this in the next patch series.
>
>>
>>> struct wilc *wilc;
>>> #endif
>>
>> But the large question remains of why do we have this variable here any
>> way?
>
>
> As you pointed out, the variable is do-nothing for spi driver for now.
> After reworking SPI driver, the wilc will be passed to SPI as spi drive data
> like we already did in SDIO.
>
> We have done this to remove extern variable g_linux_wlan which is primary
> structure of wilc1000.
> For now it is not used, but need it not to break the build.
>
> static int linux_sdio_probe(struct sdio_func *func, const struct
> sdio_device_id *id)
> {
> struct wilc_sdio *wl_sdio;
> struct wilc *wilc;
>
> PRINT_D(INIT_DBG, "probe function\n");
> wl_sdio = kzalloc(sizeof(struct wilc_sdio), GFP_KERNEL);
> if (!wl_sdio)
> return -ENOMEM;
>
> PRINT_D(INIT_DBG, "Initializing netdev\n");
> local_sdio_func = func;
> if (wilc_netdev_init()) {
> PRINT_ER("Couldn't initialize netdev\n");
> kfree(wl_sdio);
> return -1;
> }
> wl_sdio->func = func;
> wl_sdio->wilc = wilc;
> sdio_set_drvdata(func, wl_sdio);
>
> regards,
> glen lee.
>
>>
>> regards,
>> dan carpenter
>>
>
How about this patch @Dan and @glen ,For me it does not create any
build error. For #ifndef WILC_SDIO  that pointer *wilc is not
compiling so that creates the error.

--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -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 WIC_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;
@@ -1083,6 +1083,10 @@ static void wlan_deinitialize_threads(struct
net_device *dev)
}
 }

+#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)
 {
wilc_wlan_inp_t nwi;
@@ -1791,7 +1795,7 @@ int wilc_netdev_init(struct wilc **wilc)
 /*The 1st function called after module inserted*/
 static int __init init_wilc_driver(void)
 {
-#ifdef WILC_SPI
+#if (defined WILC_SPI) || (!defined WILC_SDIO)
struct wilc *wilc;
 #endif
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH V2] Staging: wilc1000: Fix build break due to undeclared *wilc and implicit declaration of init_irq

2015-11-09 Thread punit vara
On Mon, Nov 9, 2015 at 3:31 PM, glen lee <glen@atmel.com> wrote:
>
>
> On 2015년 11월 09일 18:05, punit vara wrote:
>>
>> On Mon, Nov 9, 2015 at 2:25 PM, glen lee <glen@atmel.com> wrote:
>>>
>>> On 2015년 11월 09일 17:18, Dan Carpenter wrote:
>>>>
>>>> On Mon, Nov 09, 2015 at 05:02:48PM +0900, glen lee wrote:
>>>>>
>>>>> Hi Punit Vara,
>>>>>
>>>>> I cannot find build errors on my build machines.
>>>>>
>>>>> According the log which you have posted before says *wilc is undeclared
>>>>> in the function init_wilc_driver,
>>>>> which means WILC_SPI is selected because one of SPI or SDIO should be
>>>>> chosen at the moment.
>>>>> Hence, struct wilc *wilc should be compiled together.
>>>>> It looks like wilc1000 is compiled without SPI or SDIO.
>>>>>
>>>>> Of course, there are many cases that I don't know, so you could let me
>>>>> know the wilc1000 build configuration?
>>>>>
>>>>> static int __init init_wilc_driver(void)
>>>>> {
>>>>> #ifdef WILC_SPI
>>>>
>>>> This should be #ifndef WILC_SDIO
>>>
>>>
>>> I will do this in the next patch series.
>>>
>>>>>  struct wilc *wilc;
>>>>> #endif
>>>>
>>>> But the large question remains of why do we have this variable here any
>>>> way?
>>>
>>>
>>> As you pointed out, the variable is do-nothing for spi driver for now.
>>> After reworking SPI driver, the wilc will be passed to SPI as spi drive
>>> data
>>> like we already did in SDIO.
>>>
>>> We have done this to remove extern variable g_linux_wlan which is primary
>>> structure of wilc1000.
>>> For now it is not used, but need it not to break the build.
>>>
>>> static int linux_sdio_probe(struct sdio_func *func, const struct
>>> sdio_device_id *id)
>>> {
>>>  struct wilc_sdio *wl_sdio;
>>>  struct wilc *wilc;
>>>
>>>  PRINT_D(INIT_DBG, "probe function\n");
>>>  wl_sdio = kzalloc(sizeof(struct wilc_sdio), GFP_KERNEL);
>>>  if (!wl_sdio)
>>>  return -ENOMEM;
>>>
>>>  PRINT_D(INIT_DBG, "Initializing netdev\n");
>>>  local_sdio_func = func;
>>>  if (wilc_netdev_init()) {
>>>  PRINT_ER("Couldn't initialize netdev\n");
>>>  kfree(wl_sdio);
>>>  return -1;
>>>  }
>>>  wl_sdio->func = func;
>>>  wl_sdio->wilc = wilc;
>>>  sdio_set_drvdata(func, wl_sdio);
>>>
>>> regards,
>>> glen lee.
>>>
>>>> regards,
>>>> dan carpenter
>>>>
>> How about this patch @Dan and @glen ,For me it does not create any
>> build error. For #ifndef WILC_SDIO  that pointer *wilc is not
>> compiling so that creates the error.
>
>
> As Dan said, I also think there are too many ifdefs now. We will remove the
> defines after
> reworking SPI/SDIO modules.
>
> For now, I cannot test since build error does not happens in my side. :(
>
> Just in case, will this works for you?
> config WILC1000_DRIVER
> bool "WILC1000 support (WiFi only)"
> depends on CFG80211 && WEXT_CORE && INET
> +   depends on MMC || SPI
>
> I will look into more about this later.
>
> regards,
> glen lee.
>
>
>>
>> --- a/drivers/staging/wilc1000/linux_wlan.c
>> +++ b/drivers/staging/wilc1000/linux_wlan.c
>> @@ -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
>> WIC_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;
&g

Re: [PATCH V2] Staging: wilc1000: Fix build break due to undeclared *wilc and implicit declaration of init_irq

2015-11-09 Thread punit vara
On Mon, Nov 9, 2015 at 1:48 PM, Dan Carpenter <dan.carpen...@oracle.com> wrote:
> On Mon, Nov 09, 2015 at 05:02:48PM +0900, glen lee wrote:
>> Hi Punit Vara,
>>
>> I cannot find build errors on my build machines.
>>
>> According the log which you have posted before says *wilc is undeclared in 
>> the function init_wilc_driver,
>> which means WILC_SPI is selected because one of SPI or SDIO should be chosen 
>> at the moment.
>> Hence, struct wilc *wilc should be compiled together.
>> It looks like wilc1000 is compiled without SPI or SDIO.
>>
>> Of course, there are many cases that I don't know, so you could let me know 
>> the wilc1000 build configuration?
>>
>> static int __init init_wilc_driver(void)
>> {
>> #ifdef WILC_SPI
>
> This should be #ifndef WILC_SDIO
>
>
>>   struct wilc *wilc;
>> #endif
>
> But the large question remains of why do we have this variable here any
> way?
>
> regards,
> dan carpenter
>
I do not know why it is there .that is why I did not touch it first
my proposed patch was like
#if (defined WILC_SPI) || (!defined WILC_SDIO)
struct wilc *wilc;
#endif
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

2015-11-08 Thread punit vara
On Sun, Nov 8, 2015 at 2:21 AM, Dan Carpenter  wrote:
> 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.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

2015-11-08 Thread Punit Vara
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 :
-init_irq declaration
-At preprocessor (!defined WILC_SDIO) to defination of init_irq
-At preprocessor (!defined WILC_SDIO) to defination isr_uh_routine
-removes unnecessary lines to declare *wilc

Patch fixes 702c0e50f and 2c1d05d10 tags.

Signed-off-by: Punit Vara <punitv...@gmail.com>
---
-Fixes tag added suggested by Dan carpenter.
-Remove declaration of autovariable with same type and same name suggested by 
Joe Perches

 drivers/staging/wilc1000/linux_wlan.c | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/wilc1000/linux_wlan.c 
b/drivers/staging/wilc1000/linux_wlan.c
index 086f1db..5bd14ed 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -208,7 +208,7 @@ static int dev_state_ev_handler(struct notifier_block 
*this, unsigned long event
return NOTIFY_DONE;
 }
 
-#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;
@@ -246,7 +246,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;
@@ -937,6 +937,10 @@ static void wlan_deinitialize_threads(struct net_device 
*dev)
}
 }
 
+#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)
 {
wilc_wlan_inp_t nwi;
@@ -1578,9 +1582,7 @@ int wilc_netdev_init(struct wilc **wilc)
 
 static int __init init_wilc_driver(void)
 {
-#ifdef WILC_SPI
struct wilc *wilc;
-#endif
 
 #if defined(WILC_DEBUGFS)
if (wilc_debugfs_init() < 0) {
-- 
2.6.2

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

2015-11-07 Thread Punit Vara
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

Signed-off-by: Punit Vara <punitv...@gmail.com>
---
 drivers/staging/wilc1000/linux_wlan.c | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/wilc1000/linux_wlan.c 
b/drivers/staging/wilc1000/linux_wlan.c
index 09ddba2..0a21e62 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -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
-- 
2.6.2

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

2015-11-07 Thread punit vara
On Sat, Nov 7, 2015 at 7:24 PM, Dan Carpenter <dan.carpen...@oracle.com> wrote:
> On Sat, Nov 07, 2015 at 05:01:49PM +0530, Punit Vara wrote:
>>  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
>
> This patch still has the same problems as before.
>
> regards,
> dan carpenter
>
>
Should I remove
#ifdef WILC_SPI
  struct wilc *wilc;
 #endif

? Built is successful
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] Staging: wilc1000: Declare *wilc in init_wilc_driver to fix build error

2015-11-06 Thread Punit Vara
This patch is to the linux_wlan.c file that fixes declaration of *wilc
to remove following error while building it.

make drivers/staging/wilc1000/linux_wlan.o
drivers/staging/wilc1000/linux_wlan.c:1824:24: error: ‘wilc’ undeclared

Signed-off-by: Punit Vara <punitv...@gmail.com>
---
 drivers/staging/wilc1000/linux_wlan.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/wilc1000/linux_wlan.c 
b/drivers/staging/wilc1000/linux_wlan.c
index 2a5b36f..0805050 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -1780,6 +1780,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
-- 
2.6.2

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] Staging: wilc1000: Declare *wilc in init_wilc_driver to fix build error

2015-11-06 Thread punit vara
On Sat, Nov 7, 2015 at 3:29 AM, Punit Vara <punitv...@gmail.com> wrote:
> This patch is to the linux_wlan.c file that fixes declaration of *wilc
> to remove following error while building it.
>
> make drivers/staging/wilc1000/linux_wlan.o
> drivers/staging/wilc1000/linux_wlan.c:1824:24: error: ‘wilc’ undeclared
>
> Signed-off-by: Punit Vara <punitv...@gmail.com>
> ---
>  drivers/staging/wilc1000/linux_wlan.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/staging/wilc1000/linux_wlan.c 
> b/drivers/staging/wilc1000/linux_wlan.c
> index 2a5b36f..0805050 100644
> --- a/drivers/staging/wilc1000/linux_wlan.c
> +++ b/drivers/staging/wilc1000/linux_wlan.c
> @@ -1780,6 +1780,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
> --
> 2.6.2
>
drivers/staging/wilc1000/linux_wlan.c: In function ‘wilc1000_wlan_init’:
drivers/staging/wilc1000/linux_wlan.c:1109:3: error: implicit
declaration of function ‘init_irq’
[-Werror=implicit-function-declaration]
   if (init_irq(dev)) {
   ^
drivers/staging/wilc1000/linux_wlan.c: In function ‘init_wilc_driver’:
drivers/staging/wilc1000/linux_wlan.c:1824:24: error: ‘wilc’
undeclared (first use in this function)
  if (wilc_netdev_init())
^
drivers/staging/wilc1000/linux_wlan.c:1824:24: note: each undeclared
identifier is reported only once for each function it appears in
cc1: some warnings being treated as errors
scripts/Makefile.build:258: recipe for target
'drivers/staging/wilc1000/linux_wlan.o' failed
make[1]: *** [drivers/staging/wilc1000/linux_wlan.o] Error 1
Makefile:1526: recipe for target 'drivers/staging/wilc1000/linux_wlan.o' failed
make: *** [drivers/staging/wilc1000/linux_wlan.o] Error 2

There were two errors generated by make drivers/staging/wilc1000/linux_wlan.o
One error I have removed second one I will resolve tomorrow. Should I
remove function init_irq defination from #ifdef ? or any better
solution to remove this error?
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] Staging: wilc1000: Declare *wilc in init_wilc_driver to fix build error

2015-11-06 Thread punit vara
On Sat, Nov 7, 2015 at 3:47 AM, punit vara <punitv...@gmail.com> wrote:
> On Sat, Nov 7, 2015 at 3:39 AM, punit vara <punitv...@gmail.com> wrote:
>> On Sat, Nov 7, 2015 at 3:29 AM, Punit Vara <punitv...@gmail.com> wrote:
>>> This patch is to the linux_wlan.c file that fixes declaration of *wilc
>>> to remove following error while building it.
>>>
>>> make drivers/staging/wilc1000/linux_wlan.o
>>> drivers/staging/wilc1000/linux_wlan.c:1824:24: error: ‘wilc’ undeclared
>>>
>>> Signed-off-by: Punit Vara <punitv...@gmail.com>
>>> ---
>>>  drivers/staging/wilc1000/linux_wlan.c | 1 +
>>>  1 file changed, 1 insertion(+)
>>>
>>> diff --git a/drivers/staging/wilc1000/linux_wlan.c 
>>> b/drivers/staging/wilc1000/linux_wlan.c
>>> index 2a5b36f..0805050 100644
>>> --- a/drivers/staging/wilc1000/linux_wlan.c
>>> +++ b/drivers/staging/wilc1000/linux_wlan.c
>>> @@ -1780,6 +1780,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
>>> --
>>> 2.6.2
>>>
>> drivers/staging/wilc1000/linux_wlan.c: In function ‘wilc1000_wlan_init’:
>> drivers/staging/wilc1000/linux_wlan.c:1109:3: error: implicit
>> declaration of function ‘init_irq’
>> [-Werror=implicit-function-declaration]
>>if (init_irq(dev)) {
>>^
>> drivers/staging/wilc1000/linux_wlan.c: In function ‘init_wilc_driver’:
>> drivers/staging/wilc1000/linux_wlan.c:1824:24: error: ‘wilc’
>> undeclared (first use in this function)
>>   if (wilc_netdev_init())
>> ^
>> drivers/staging/wilc1000/linux_wlan.c:1824:24: note: each undeclared
>> identifier is reported only once for each function it appears in
>> cc1: some warnings being treated as errors
>> scripts/Makefile.build:258: recipe for target
>> 'drivers/staging/wilc1000/linux_wlan.o' failed
>> make[1]: *** [drivers/staging/wilc1000/linux_wlan.o] Error 1
>> Makefile:1526: recipe for target 'drivers/staging/wilc1000/linux_wlan.o' 
>> failed
>> make: *** [drivers/staging/wilc1000/linux_wlan.o] Error 2
>>
>> There were two errors generated by make drivers/staging/wilc1000/linux_wlan.o
>> One error I have removed second one I will resolve tomorrow. Should I
>> remove function init_irq defination from #ifdef ? or any better
>> solution to remove this error?
>
> Today I have fetched greg staging tree I have found
>
> make drivers/staging/wilc1000/linux_wlan.o
>
> build failed.
>
> So I am just trying to fix it . I removed one error and send patch to
> get some feedback about second error. I will be sending whole patch
> fixing both errors.
okay :-)
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RESEND PATCH v2] Staging: wilc1000: Prefer eth_broadcast_addr over memset()

2015-10-28 Thread Punit Vara
This patch is to the host_interface.c that fixes up following
warning by checkpatch:

-prefer eth_broadcast_addr() over memset()

Signed-off-by: Punit Vara <punitv...@gmail.com>
---
Applied on updated staging tree.

 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 5f81eab..53e21cd 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -4642,7 +4642,7 @@ s32 host_int_del_station(struct host_if_drv *hif_drv, 
const u8 *pu8MacAddr)
msg.drv = hif_drv;
 
if (!pu8MacAddr)
-   memset(pstrDelStationMsg->mac_addr, 255, ETH_ALEN);
+   eth_broadcast_addr(pstrDelStationMsg->mac_addr);
else
memcpy(pstrDelStationMsg->mac_addr, pu8MacAddr, ETH_ALEN);
 
-- 
2.5.3

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2] Staging: wilc1000: Prefer eth_broadcast_addr over memset()

2015-10-27 Thread Punit Vara
This patch is to the host_interface.c that fixes up following
warning by checkpatch:

-prefer eth_broadcast_addr() over memset()

Signed-off-by: Punit Vara <punitv...@gmail.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 5f81eab..53e21cd 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -4642,7 +4642,7 @@ s32 host_int_del_station(struct host_if_drv *hif_drv, 
const u8 *pu8MacAddr)
msg.drv = hif_drv;
 
if (!pu8MacAddr)
-   memset(pstrDelStationMsg->mac_addr, 255, ETH_ALEN);
+   eth_broadcast_addr(pstrDelStationMsg->mac_addr);
else
memcpy(pstrDelStationMsg->mac_addr, pu8MacAddr, ETH_ALEN);
 
-- 
2.5.3

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RESEND PATCH 08/10] net: wireless: brcm80211: Remove unneeded variable which return 0

2015-10-27 Thread Punit Vara
This is patch to the brcmsmac/main.c that removes unnecessary variable
which was declared to return zero.

This patch fixes up warning reported by coccicheck:
-Unneeded variable: "err". Return "0" on line 3788

Signed-off-by: Punit Vara <punitv...@gmail.com>
---
 drivers/net/wireless/brcm80211/brcmsmac/main.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/wireless/brcm80211/brcmsmac/main.c 
b/drivers/net/wireless/brcm80211/brcmsmac/main.c
index 9728be0..9d717b6 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/main.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c
@@ -3777,7 +3777,6 @@ static void brcms_c_set_ps_ctrl(struct brcms_c_info *wlc)
  */
 static int brcms_c_set_mac(struct brcms_bss_cfg *bsscfg)
 {
-   int err = 0;
struct brcms_c_info *wlc = bsscfg->wlc;
 
/* enter the MAC addr into the RXE match registers */
@@ -3785,7 +3784,7 @@ static int brcms_c_set_mac(struct brcms_bss_cfg *bsscfg)
 
brcms_c_ampdu_macaddr_upd(wlc);
 
-   return err;
+   return 0;
 }
 
 /* Write the BSS config's BSSID address to core (set_bssid in d11procs.tcl).
-- 
2.5.3

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RESEND PATCH 04/10] net: wireless: brcm80211: Remove duplicated arguments to |

2015-10-27 Thread Punit Vara
Remove uncessary repeated arguments with OR(|)

This is patch to the brcmsmac/channel.c file that removes following
 warning reported by coccicheck:

-duplicated argument to & or |

Signed-off-by: Punit Vara <punitv...@gmail.com>
---
 drivers/net/wireless/brcm80211/brcmsmac/channel.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/wireless/brcm80211/brcmsmac/channel.c 
b/drivers/net/wireless/brcm80211/brcmsmac/channel.c
index 635ae03..d56fa03 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/channel.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/channel.c
@@ -652,7 +652,6 @@ static void brcms_reg_apply_radar_flags(struct wiphy *wiphy)
 */
if (!(ch->flags & IEEE80211_CHAN_DISABLED))
ch->flags |= IEEE80211_CHAN_RADAR |
-IEEE80211_CHAN_NO_IR |
 IEEE80211_CHAN_NO_IR;
}
 }
-- 
2.5.3

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RESEND PATCH 06/10] net: wireless: ath: simplify return flow for carl9170_regwrite_result()

2015-10-27 Thread Punit Vara
This patch is to the carl9170/phy.c file that fixes warning reported by
coccicheck :

 WARNING: end returns can be simplified

I have removed unneccessary variable declaration and simply return flow
for carl9170_regwrite_result()

Signed-off-by: Punit Vara <punitv...@gmail.com>
---
 drivers/net/wireless/ath/carl9170/phy.c | 7 +--
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/net/wireless/ath/carl9170/phy.c 
b/drivers/net/wireless/ath/carl9170/phy.c
index dca6df1..f3b5434 100644
--- a/drivers/net/wireless/ath/carl9170/phy.c
+++ b/drivers/net/wireless/ath/carl9170/phy.c
@@ -966,7 +966,6 @@ static const struct carl9170_phy_freq_entry 
carl9170_phy_freq_params[] = {
 static int carl9170_init_rf_bank4_pwr(struct ar9170 *ar, bool band5ghz,
  u32 freq, enum carl9170_bw bw)
 {
-   int err;
u32 d0, d1, td0, td1, fd0, fd1;
u8 chansel;
u8 refsel0 = 1, refsel1 = 0;
@@ -1024,11 +1023,7 @@ static int carl9170_init_rf_bank4_pwr(struct ar9170 *ar, 
bool band5ghz,
carl9170_regwrite(0x1c58e8, fd1);
 
carl9170_regwrite_finish();
-   err = carl9170_regwrite_result();
-   if (err)
-   return err;
-
-   return 0;
+   return carl9170_regwrite_result();
 }
 
 static const struct carl9170_phy_freq_params *
-- 
2.5.3

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RESEND PATCH 05/10] net: wireless: simplify return flow for zd1201_setconfig16

2015-10-27 Thread Punit Vara
This patch is to the zd1201.c file that fixes up warning
reported by coccicheck:

WARNING: end returns can be simplified and declaration on line 1658 can
be dropped

Prefer direct return value instead of writing 2-3 more sentence.

Signed-off-by: Punit Vara <punitv...@gmail.com>
---
 drivers/net/wireless/zd1201.c | 6 +-
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/net/wireless/zd1201.c b/drivers/net/wireless/zd1201.c
index 6f5c793..d9e67d9 100644
--- a/drivers/net/wireless/zd1201.c
+++ b/drivers/net/wireless/zd1201.c
@@ -1655,15 +1655,11 @@ static int zd1201_set_maxassoc(struct net_device *dev,
 struct iw_request_info *info, struct iw_param *rrq, char *extra)
 {
struct zd1201 *zd = netdev_priv(dev);
-   int err;
 
if (!zd->ap)
return -EOPNOTSUPP;
 
-   err = zd1201_setconfig16(zd, ZD1201_RID_CNFMAXASSOCSTATIONS, 
rrq->value);
-   if (err)
-   return err;
-   return 0;
+   return zd1201_setconfig16(zd, ZD1201_RID_CNFMAXASSOCSTATIONS, 
rrq->value);
 }
 
 static int zd1201_get_maxassoc(struct net_device *dev,
-- 
2.5.3

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RESEND PATCH 07/10] net: wireless: iwlegacy: Remove unneeded variable ret

2015-10-27 Thread Punit Vara
This patch is to the 3945-mac.c file that fixes up following warning
by coccicheck:

drivers/net/wireless/iwlegacy/3945-mac.c:247:5-8: Unneeded variable:
"ret". Return "- EOPNOTSUPP" on line 249

Return -EOPNOTSUPP directly instead of return using ret

Signed-off-by: Punit Vara <punitv...@gmail.com>
---
 drivers/net/wireless/iwlegacy/3945-mac.c | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/net/wireless/iwlegacy/3945-mac.c 
b/drivers/net/wireless/iwlegacy/3945-mac.c
index af1b3e6..ff4dc44 100644
--- a/drivers/net/wireless/iwlegacy/3945-mac.c
+++ b/drivers/net/wireless/iwlegacy/3945-mac.c
@@ -244,9 +244,7 @@ il3945_set_dynamic_key(struct il_priv *il, struct 
ieee80211_key_conf *keyconf,
 static int
 il3945_remove_static_key(struct il_priv *il)
 {
-   int ret = -EOPNOTSUPP;
-
-   return ret;
+   return -EOPNOTSUPP;
 }
 
 static int
@@ -529,7 +527,6 @@ il3945_tx_skb(struct il_priv *il,
if (unlikely(tid >= MAX_TID_COUNT))
goto drop;
}
-
/* Descriptor for chosen Tx queue */
txq = >txq[txq_id];
q = >q;
-- 
2.5.3

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v4 14/15] net: wireless: ath: Remove unneeded variable ret returning 0

2015-10-27 Thread punit vara
On Tue, Oct 27, 2015 at 1:42 PM, Kalle Valo <kv...@codeaurora.org> wrote:
> punit vara <punitv...@gmail.com> writes:
>
>> Will my other patches which are already correct be added to wireless
>> tree ? or I have to resend everything ?
>
> Yes, please resend the whole patchset. I don't apply patches
> individually from a patchset, it's just too time consuming and error
> prone.
>
> Also, as you seem to be new here, I don't recommend sending big
> patchsets in the beginning. Start slow, send just few a patch or two at
> a time, and once you gain more experience send bigger patchsets.
>
> --
> Kalle Valo
Next time I will send 2-3 patches only . This time I have resent you
all the patches that I have created before . Thank you for suggestion.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RESEND PATCH 10/10] net: wireless: ath: Remove unneeded variable ret returning 0

2015-10-27 Thread Punit Vara
This patch is to the ath5k/eeprom.c that fixes up warning caught by
coccicheck:

-Unneeded variable: "ret". Return "0" on line 1733

Remove unneccesary variable ret created to return zero.

Signed-off-by: Punit Vara <punitv...@gmail.com>
---
 drivers/net/wireless/ath/ath5k/eeprom.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath5k/eeprom.c 
b/drivers/net/wireless/ath/ath5k/eeprom.c
index 94d34ee..673ab8d 100644
--- a/drivers/net/wireless/ath/ath5k/eeprom.c
+++ b/drivers/net/wireless/ath/ath5k/eeprom.c
@@ -1707,7 +1707,7 @@ ath5k_eeprom_read_spur_chans(struct ath5k_hw *ah)
struct ath5k_eeprom_info *ee = >ah_capabilities.cap_eeprom;
u32 offset;
u16 val;
-   int ret = 0, i;
+   int i;
 
offset = AR5K_EEPROM_CTL(ee->ee_version) +
AR5K_EEPROM_N_CTLS(ee->ee_version);
@@ -1730,7 +1730,7 @@ ath5k_eeprom_read_spur_chans(struct ath5k_hw *ah)
}
}
 
-   return ret;
+   return 0;
 }
 
 
-- 
2.5.3

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RESEND PATCH 09/10] net: wireless: brcm80211: Remove unneeded variable ret_code returning 0

2015-10-27 Thread Punit Vara
This patch is to the brcmsmac/stf.c that fixes up warning caught by
coccicheck:

-Unneeded variable: "ret_code". Return "0" on line 328

Remove unneccesary variable ret_code created to return zero.

Signed-off-by: Punit Vara <punitv...@gmail.com>
---
 drivers/net/wireless/brcm80211/brcmsmac/stf.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/brcm80211/brcmsmac/stf.c 
b/drivers/net/wireless/brcm80211/brcmsmac/stf.c
index dd91627..71ddf42 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/stf.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/stf.c
@@ -306,7 +306,6 @@ int brcms_c_stf_txchain_set(struct brcms_c_info *wlc, s32 
int_val, bool force)
  */
 int brcms_c_stf_ss_update(struct brcms_c_info *wlc, struct brcms_band *band)
 {
-   int ret_code = 0;
u8 prev_stf_ss;
u8 upd_stf_ss;
 
@@ -325,7 +324,7 @@ int brcms_c_stf_ss_update(struct brcms_c_info *wlc, struct 
brcms_band *band)
PHY_TXC1_MODE_SISO : PHY_TXC1_MODE_CDD;
} else {
if (wlc->band != band)
-   return ret_code;
+   return 0;
upd_stf_ss = (wlc->stf->txstreams == 1) ?
PHY_TXC1_MODE_SISO : band->band_stf_ss_mode;
}
@@ -334,7 +333,7 @@ int brcms_c_stf_ss_update(struct brcms_c_info *wlc, struct 
brcms_band *band)
brcms_b_band_stf_ss_set(wlc->hw, upd_stf_ss);
}
 
-   return ret_code;
+   return 0;
 }
 
 int brcms_c_stf_attach(struct brcms_c_info *wlc)
-- 
2.5.3

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RESEND PATCH 01/10] net: wireless: ath: Remove unnecessary semicolon

2015-10-27 Thread Punit Vara
This patch is to the htt_rx.c that removes unneeded semicolon which is
reported by coccicheck.

Here semicolon just create empty statement so please remote it.

Signed-off-by: Punit Vara <punitv...@gmail.com>
---
 drivers/net/wireless/ath/ath10k/htt_rx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c 
b/drivers/net/wireless/ath/ath10k/htt_rx.c
index 1b7a043..002a633 100644
--- a/drivers/net/wireless/ath/ath10k/htt_rx.c
+++ b/drivers/net/wireless/ath/ath10k/htt_rx.c
@@ -2077,7 +2077,7 @@ void ath10k_htt_t2h_msg_handler(struct ath10k *ar, struct 
sk_buff *skb)
ath10k_dbg_dump(ar, ATH10K_DBG_HTT_DUMP, NULL, "htt event: ",
skb->data, skb->len);
break;
-   };
+   }
 
/* Free the indication buffer */
dev_kfree_skb_any(skb);
-- 
2.5.3

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RESEND PATCH 03/10] net: wireless: rtwifi: Remove duplicated arguments to |

2015-10-27 Thread Punit Vara
Remove uncessary repeated arguments COMP_EFUSE, COMP_REGD, COMP_CHAN
 with OR(|)

This is patch to the debug.c file that removes following warning
reported by coccicheck:

-duplicated argument to & or |

Signed-off-by: Punit Vara <punitv...@gmail.com>
---
 drivers/net/wireless/rtlwifi/debug.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/rtlwifi/debug.c 
b/drivers/net/wireless/rtlwifi/debug.c
index fd25aba..b8f5540 100644
--- a/drivers/net/wireless/rtlwifi/debug.c
+++ b/drivers/net/wireless/rtlwifi/debug.c
@@ -37,9 +37,9 @@ void rtl_dbgp_flag_init(struct ieee80211_hw *hw)
COMP_BEACON | COMP_RATE | COMP_RXDESC | COMP_DIG | COMP_TXAGC |
COMP_POWER | COMP_POWER_TRACKING | COMP_BB_POWERSAVING | COMP_SWAS |
COMP_RF | COMP_TURBO | COMP_RATR | COMP_CMD |
-   COMP_EFUSE | COMP_QOS | COMP_MAC80211 | COMP_REGD | COMP_CHAN |
-   COMP_EASY_CONCURRENT | COMP_EFUSE | COMP_QOS | COMP_MAC80211 |
-   COMP_REGD | COMP_CHAN | COMP_BT_COEXIST;
+   COMP_EFUSE | COMP_QOS | COMP_MAC80211 | COMP_CHAN |
+   COMP_EASY_CONCURRENT | COMP_QOS | COMP_MAC80211 |
+   COMP_REGD | COMP_BT_COEXIST;
 
 
for (i = 0; i < DBGP_TYPE_MAX; i++)
-- 
2.5.3

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RESEND PATCH 02/10] net: wireless: ath: Remove unnecessary semicolon

2015-10-27 Thread Punit Vara
This patch is to the ath10k/wmi.h that removes unneeded semicolon which
 is reported by coccicheck.

Here semicolon just create empty statement so please remote it.

Signed-off-by: Punit Vara <punitv...@gmail.com>
---
 drivers/net/wireless/ath/ath10k/wmi.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath10k/wmi.h 
b/drivers/net/wireless/ath/ath10k/wmi.h
index 52d3503..21d5b6b 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.h
+++ b/drivers/net/wireless/ath/ath10k/wmi.h
@@ -1675,7 +1675,7 @@ static inline const char *ath10k_wmi_phymode_str(enum 
wmi_phy_mode mode)
 
/* no default handler to allow compiler to check that the
 * enum is fully handled */
-   };
+   }
 
return "";
 }
-- 
2.5.3

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v4 14/15] net: wireless: ath: Remove unneeded variable ret returning 0

2015-10-26 Thread punit vara
On Fri, Oct 23, 2015 at 12:26 AM, Sergei Shtylyov
<sergei.shtyl...@cogentembedded.com> wrote:
> On 10/22/2015 09:47 PM, Punit Vara wrote:
>
>> Remove black line suggested by Sergei
>
>
>Such kind of comments should be under the --- tear line.
>
>>
>> This patch is to the ath5k/eeprom.c that fixes up warning caught by
>> coccicheck:
>>
>> Unneeded variable: "ret". Return "0" on line 980
>>
>> Remove unneeded variable ret created to return zero.
>>
>> Signed-off-by: Punit Vara <punitv...@gmail.com>
>
> [...]
>
> MBR, Sergei
>
Thanks you Sergei for review.

Actually I didnt know You have replied to this mail because this was
gone in some other folder of my mail box .. I will send this patch
again as you suggested . Will my other patches which are already
correct be added to wireless tree ? or I have to resend everything ?
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] Staging: wilc1000: Fix warning prefer eth_broadcast_addr over memset()

2015-10-26 Thread Punit Vara
This patch is to the host_interface.c that fixes up following
warning by checkpatch.pl:

-Prefer eth_broadcast_addr() over memset()

Signed-off-by: Punit Vara <punitv...@gmail.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 09a6c98..87b4eb8 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -4688,7 +4688,7 @@ s32 host_int_del_station(struct host_if_drv *hif_drv, 
const u8 *pu8MacAddr)
msg.drv = hif_drv;
 
if (pu8MacAddr == NULL)
-   memset(pstrDelStationMsg->mac_addr, 255, ETH_ALEN);
+   eth_broadcast_addr(pstrDelStationMsg->mac_addr);
else
memcpy(pstrDelStationMsg->mac_addr, pu8MacAddr, ETH_ALEN);
 
-- 
2.5.3

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/3] staging: wilc1000: Remove reference preceded by free

2015-10-25 Thread punit vara
On Mon, Oct 26, 2015 at 1:01 AM, punit vara <punitv...@gmail.com> wrote:
> On Mon, Oct 26, 2015 at 12:42 AM, Greg KH <gre...@linuxfoundation.org> wrote:
>> On Sun, Oct 25, 2015 at 04:01:23AM +0530, Punit Vara wrote:
>>> This patch is to the wilc_wfi_cfgoperations.c file that fixes up
>>> following error reported by coccicheck:
>>>
>>> ERROR: reference preceded by free on line 1219
>>>
>>> For (params->seq_len) <= 0 memory is already freed when
>>> (params->seq_len) >0 then memory was alloted. So there is no need to use
>>> kfree whenever params->seq_len <=0 remove it and place kfree inside
>>> (params->seq_len) >0 condition.
>>>
>>> Signed-off-by: Punit Vara <punitv...@gmail.com>
>>> ---
>>>  drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 7 +++
>>>  1 file changed, 3 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c 
>>> b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
>>> index bcbf1bd..9b3cf04 100644
>>> --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
>>> +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
>>> @@ -1216,11 +1216,10 @@ static int add_key(struct wiphy *wiphy, struct 
>>> net_device *netdev, u8 key_index,
>>>
>>>   priv->wilc_ptk[key_index]->key = 
>>> kmalloc(params->key_len, GFP_KERNEL);
>>>
>>> - kfree(priv->wilc_ptk[key_index]->seq);
>>> -
>>> - if ((params->seq_len) > 0)
>>> + if ((params->seq_len) > 0) {
>>> + kfree(priv->wilc_ptk[key_index]->seq);
>>>   priv->wilc_ptk[key_index]->seq = 
>>> kmalloc(params->seq_len, GFP_KERNEL);
>>> -
>>> + }
>>
>> Are you sure about this?  It seems like you are changing the logic
>> here...
>>
> Yes this time I am quite confident here . On This file line no 1177
> already freed the allocation of memory ..On the following line if
> (params->seq_len) > 0 then memory is allotted but if it is not then
> memory allocation remains free only. So here kfree is not required
> outside of the if condition. It should be inside the if condition
> because for   (params->seq_len) > 0 memory is already allotted at line
> followed by 1177. Kindly look at it once.
>
> Thanks :-)
Again I went back thinking Greg who is stable kernel maintainer who
doubts about logic .So I again go through these code , you are right .
What you ignore this change and apply this patch ?
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 9b3cf04..3ab7d3e 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -1174,9 +1174,9 @@ static int add_key(struct wiphy *wiphy, struct
net_device *netdev, u8 key_index,
memcpy(priv->wilc_gtk[key_index]->key,
params->key, params->key_len);

/* if there has been previous
allocation for the same index through its seq, free that memory and
allocate again*/
-   kfree(priv->wilc_gtk[key_index]->seq);

if ((params->seq_len) > 0) {
+   kfree(priv->wilc_gtk[key_index]->seq);
priv->wilc_gtk[key_index]->seq
= kmalloc(params->seq_len, GFP_KERNEL);

memcpy(priv->wilc_gtk[key_index]->seq, params->seq, params->seq_len);
}


?? May send this patch ? I think it will not change the logic .
Comment me if I am wrong
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/3] staging: wilc1000: Remove reference preceded by free

2015-10-25 Thread punit vara
On Mon, Oct 26, 2015 at 12:42 AM, Greg KH <gre...@linuxfoundation.org> wrote:
> On Sun, Oct 25, 2015 at 04:01:23AM +0530, Punit Vara wrote:
>> This patch is to the wilc_wfi_cfgoperations.c file that fixes up
>> following error reported by coccicheck:
>>
>> ERROR: reference preceded by free on line 1219
>>
>> For (params->seq_len) <= 0 memory is already freed when
>> (params->seq_len) >0 then memory was alloted. So there is no need to use
>> kfree whenever params->seq_len <=0 remove it and place kfree inside
>> (params->seq_len) >0 condition.
>>
>> Signed-off-by: Punit Vara <punitv...@gmail.com>
>> ---
>>  drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 7 +++
>>  1 file changed, 3 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c 
>> b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
>> index bcbf1bd..9b3cf04 100644
>> --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
>> +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
>> @@ -1216,11 +1216,10 @@ static int add_key(struct wiphy *wiphy, struct 
>> net_device *netdev, u8 key_index,
>>
>>   priv->wilc_ptk[key_index]->key = 
>> kmalloc(params->key_len, GFP_KERNEL);
>>
>> - kfree(priv->wilc_ptk[key_index]->seq);
>> -
>> - if ((params->seq_len) > 0)
>> + if ((params->seq_len) > 0) {
>> + kfree(priv->wilc_ptk[key_index]->seq);
>>   priv->wilc_ptk[key_index]->seq = 
>> kmalloc(params->seq_len, GFP_KERNEL);
>> -
>> + }
>
> Are you sure about this?  It seems like you are changing the logic
> here...
>
Yes this time I am quite confident here . On This file line no 1177
already freed the allocation of memory ..On the following line if
(params->seq_len) > 0 then memory is allotted but if it is not then
memory allocation remains free only. So here kfree is not required
outside of the if condition. It should be inside the if condition
because for   (params->seq_len) > 0 memory is already allotted at line
followed by 1177. Kindly look at it once.

Thanks :-)
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 3/3] Staging: wilc1000: Remove boolean comparision

2015-10-24 Thread Punit Vara
This patch is to the host_interface.c file that fixes up following
warning reported by coccicheck:

WARNING: Comparison to bool

Boolean tests do not need explicit comparison to true or false

Signed-off-by: Punit Vara <punitv...@gmail.com>
---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 38fead4..09a6c98 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -1440,7 +1440,7 @@ static s32 Handle_RcvdNtwrkInfo(struct host_if_drv 
*hif_drv,
}
}
 
-   if (bNewNtwrkFound == true) {
+   if (bNewNtwrkFound) {
PRINT_D(HOSTINF_DBG, "New network found\n");
 
if (hif_drv->strWILC_UsrScanReq.u32RcvdChCount < 
MAX_NUM_SCANNED_NETWORKS) {
@@ -2714,7 +2714,7 @@ static void Handle_PowerManagement(struct host_if_drv 
*hif_drv,
 
strWID.id = (u16)WID_POWER_MANAGEMENT;
 
-   if (strPowerMgmtParam->enabled == true)
+   if (strPowerMgmtParam->enabled)
s8PowerMode = MIN_FAST_PS;
else
s8PowerMode = NO_POWERSAVE;
-- 
2.5.3

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/3] Staging: wilc1000: Remove comparision of field address to NULL

2015-10-24 Thread Punit Vara
This is patch to the linux_wlan file that fixes up following error
reported by coccicheck :

ERROR: test of a variable/field address

Signed-off-by: Punit Vara <punitv...@gmail.com>
---
 drivers/staging/wilc1000/linux_wlan.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/wilc1000/linux_wlan.c 
b/drivers/staging/wilc1000/linux_wlan.c
index b879b8b..1b0f89c 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -907,7 +907,7 @@ void wilc1000_wlan_deinit(struct wilc *nic)
disable_sdio_interrupt();
mutex_unlock(_linux_wlan->hif_cs);
 #endif
-   if (_linux_wlan->txq_event != NULL)
+   if (!(_linux_wlan->txq_event))
up(_linux_wlan->txq_event);
 
PRINT_D(INIT_DBG, "Deinitializing Threads\n");
@@ -969,10 +969,10 @@ static int wlan_deinit_locks(struct wilc *nic)
 {
PRINT_D(INIT_DBG, "De-Initializing Locks\n");
 
-   if (_linux_wlan->hif_cs != NULL)
+   if (!(_linux_wlan->hif_cs))
mutex_destroy(_linux_wlan->hif_cs);
 
-   if (_linux_wlan->rxq_cs != NULL)
+   if (!(_linux_wlan->rxq_cs))
mutex_destroy(_linux_wlan->rxq_cs);
 
return 0;
@@ -1037,7 +1037,7 @@ static void wlan_deinitialize_threads(struct wilc *nic)
g_linux_wlan->close = 1;
PRINT_D(INIT_DBG, "Deinitializing Threads\n");
 
-   if (_linux_wlan->txq_event != NULL)
+   if (!(_linux_wlan->txq_event))
up(_linux_wlan->txq_event);
 
if (g_linux_wlan->txq_thread != NULL) {
-- 
2.5.3

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 0/3] Staging: wilc1000: Remove coccicheck warnings and error

2015-10-24 Thread Punit Vara

Punit Vara (3):
  staging: wilc1000: Remove reference preceded by free
  Staging: wilc1000: Remove comparision of field address to NULL
  Staging: wilc1000: Remove boolean comparision

 drivers/staging/wilc1000/host_interface.c | 4 ++--
 drivers/staging/wilc1000/linux_wlan.c | 8 
 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 7 +++
 3 files changed, 9 insertions(+), 10 deletions(-)

-- 
2.5.3

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/3] staging: wilc1000: Remove reference preceded by free

2015-10-24 Thread Punit Vara
This patch is to the wilc_wfi_cfgoperations.c file that fixes up
following error reported by coccicheck:

ERROR: reference preceded by free on line 1219

For (params->seq_len) <= 0 memory is already freed when
(params->seq_len) >0 then memory was alloted. So there is no need to use
kfree whenever params->seq_len <=0 remove it and place kfree inside
(params->seq_len) >0 condition.

Signed-off-by: Punit Vara <punitv...@gmail.com>
---
 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c 
b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index bcbf1bd..9b3cf04 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -1216,11 +1216,10 @@ static int add_key(struct wiphy *wiphy, struct 
net_device *netdev, u8 key_index,
 
priv->wilc_ptk[key_index]->key = 
kmalloc(params->key_len, GFP_KERNEL);
 
-   kfree(priv->wilc_ptk[key_index]->seq);
-
-   if ((params->seq_len) > 0)
+   if ((params->seq_len) > 0) {
+   kfree(priv->wilc_ptk[key_index]->seq);
priv->wilc_ptk[key_index]->seq = 
kmalloc(params->seq_len, GFP_KERNEL);
-
+   }
if (INFO) {
for (i = 0; i < params->key_len; i++)
PRINT_INFO(CFG80211_DBG, 
"Adding pairwise key value[%d] = %x\n", i, params->key[i]);
-- 
2.5.3

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v6 14/15] net: wireless: ath: Remove unneeded variable ret returning 0

2015-10-23 Thread Punit Vara
This warning is reported by coccicheck:

Signed-off-by: Punit Vara <punitv...@gmail.com>
---
 drivers/net/wireless/ath/wcn36xx/main.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ath/wcn36xx/main.c 
b/drivers/net/wireless/ath/wcn36xx/main.c
index 900e72a..94bcc08 100644
--- a/drivers/net/wireless/ath/wcn36xx/main.c
+++ b/drivers/net/wireless/ath/wcn36xx/main.c
@@ -935,8 +935,6 @@ static const struct ieee80211_ops wcn36xx_ops = {
 
 static int wcn36xx_init_ieee80211(struct wcn36xx *wcn)
 {
-   int ret = 0;
-
static const u32 cipher_suites[] = {
WLAN_CIPHER_SUITE_WEP40,
WLAN_CIPHER_SUITE_WEP104,
@@ -977,7 +975,7 @@ static int wcn36xx_init_ieee80211(struct wcn36xx *wcn)
wcn->hw->sta_data_size = sizeof(struct wcn36xx_sta);
wcn->hw->vif_data_size = sizeof(struct wcn36xx_vif);
 
-   return ret;
+   return 0;
 }
 
 static int wcn36xx_platform_get_resources(struct wcn36xx *wcn,
-- 
2.5.3

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 14/15] net: wireless: ath: Remove unneeded variable ret returning 0

2015-10-22 Thread Punit Vara
This patch is to the ath5k/eeprom.c that fixes up warning caught by
coccicheck:

-Unneeded variable: "ret". Return "0" on line 1733

Remove unneccesary variable ret created to return zero.

Signed-off-by: Punit Vara <punitv...@gmail.com>
---
 drivers/net/wireless/ath/ath5k/eeprom.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ath/ath5k/eeprom.c 
b/drivers/net/wireless/ath/ath5k/eeprom.c
index 94d34ee..0c82ea5 100644
--- a/drivers/net/wireless/ath/ath5k/eeprom.c
+++ b/drivers/net/wireless/ath/ath5k/eeprom.c
@@ -1707,8 +1707,7 @@ ath5k_eeprom_read_spur_chans(struct ath5k_hw *ah)
struct ath5k_eeprom_info *ee = >ah_capabilities.cap_eeprom;
u32 offset;
u16 val;
-   int ret = 0, i;
-
+   int i;
offset = AR5K_EEPROM_CTL(ee->ee_version) +
AR5K_EEPROM_N_CTLS(ee->ee_version);
 
@@ -1730,7 +1729,7 @@ ath5k_eeprom_read_spur_chans(struct ath5k_hw *ah)
}
}
 
-   return ret;
+   return 0;
 }
 
 
-- 
2.5.3

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v4 14/15] net: wireless: ath: Remove unneeded variable ret returning 0

2015-10-22 Thread Punit Vara
Remove black line suggested by Sergei

This patch is to the ath5k/eeprom.c that fixes up warning caught by
coccicheck:

Unneeded variable: "ret". Return "0" on line 980

Remove unneeded variable ret created to return zero.

Signed-off-by: Punit Vara <punitv...@gmail.com>
---
 drivers/net/wireless/ath/wcn36xx/main.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ath/wcn36xx/main.c 
b/drivers/net/wireless/ath/wcn36xx/main.c
index 900e72a..94bcc08 100644
--- a/drivers/net/wireless/ath/wcn36xx/main.c
+++ b/drivers/net/wireless/ath/wcn36xx/main.c
@@ -935,8 +935,6 @@ static const struct ieee80211_ops wcn36xx_ops = {
 
 static int wcn36xx_init_ieee80211(struct wcn36xx *wcn)
 {
-   int ret = 0;
-
static const u32 cipher_suites[] = {
WLAN_CIPHER_SUITE_WEP40,
WLAN_CIPHER_SUITE_WEP104,
@@ -977,7 +975,7 @@ static int wcn36xx_init_ieee80211(struct wcn36xx *wcn)
wcn->hw->sta_data_size = sizeof(struct wcn36xx_sta);
wcn->hw->vif_data_size = sizeof(struct wcn36xx_vif);
 
-   return ret;
+   return 0;
 }
 
 static int wcn36xx_platform_get_resources(struct wcn36xx *wcn,
-- 
2.5.3

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v3 14/15] net: wireless: ath: Remove unneeded variable ret returning 0

2015-10-22 Thread Punit Vara
This patch is to the ath5k/eeprom.c that fixes up warning caught by
coccicheck:

-Unneeded variable: "ret". Return "0" on line 1733

Remove unneccesary variable ret created to return zero.

Also removed empty line suggested by Sergei
 
Signed-off-by: Punit Vara <punitv...@gmail.com>
---
 drivers/net/wireless/ath/ath5k/eeprom.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ath/ath5k/eeprom.c 
b/drivers/net/wireless/ath/ath5k/eeprom.c
index 94d34ee..0c82ea5 100644
--- a/drivers/net/wireless/ath/ath5k/eeprom.c
+++ b/drivers/net/wireless/ath/ath5k/eeprom.c
@@ -1707,8 +1707,7 @@ ath5k_eeprom_read_spur_chans(struct ath5k_hw *ah)
struct ath5k_eeprom_info *ee = >ah_capabilities.cap_eeprom;
u32 offset;
u16 val;
-   int ret = 0, i;
-
+   int i;
offset = AR5K_EEPROM_CTL(ee->ee_version) +
AR5K_EEPROM_N_CTLS(ee->ee_version);
 
@@ -1730,7 +1729,7 @@ ath5k_eeprom_read_spur_chans(struct ath5k_hw *ah)
}
}
 
-   return ret;
+   return 0;
 }
 
 
-- 
2.5.3

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3 14/15] net: wireless: ath: Remove unneeded variable ret returning 0

2015-10-22 Thread punit vara
On Fri, Oct 23, 2015 at 12:05 AM, Sergei Shtylyov
<sergei.shtyl...@cogentembedded.com> wrote:
> Hello.
>
> On 10/22/2015 09:26 PM, Punit Vara wrote:
>
>> This patch is to the ath5k/eeprom.c that fixes up warning caught by
>> coccicheck:
>>
>> -Unneeded variable: "ret". Return "0" on line 1733
>>
>> Remove unneccesary variable ret created to return zero.
>>
>> Also removed empty line suggested by Sergei
>>
>> Signed-off-by: Punit Vara <punitv...@gmail.com>
>> ---
>>   drivers/net/wireless/ath/ath5k/eeprom.c | 5 ++---
>>   1 file changed, 2 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/net/wireless/ath/ath5k/eeprom.c
>> b/drivers/net/wireless/ath/ath5k/eeprom.c
>> index 94d34ee..0c82ea5 100644
>> --- a/drivers/net/wireless/ath/ath5k/eeprom.c
>> +++ b/drivers/net/wireless/ath/ath5k/eeprom.c
>> @@ -1707,8 +1707,7 @@ ath5k_eeprom_read_spur_chans(struct ath5k_hw *ah)
>> struct ath5k_eeprom_info *ee = >ah_capabilities.cap_eeprom;
>> u32 offset;
>> u16 val;
>> -   int ret = 0, i;
>> -
>
>
>No, this one shouldn't have been removed. There should an empty line
> between the declarations and the statements.
>
>> +   int i;
>> offset = AR5K_EEPROM_CTL(ee->ee_version) +
>> AR5K_EEPROM_N_CTLS(ee->ee_version);
>>
>
> MBR, Sergei
>

I have resent patch with update but I cant see it in my mailbox I dont
know Why.. Sorry if You are getting mail more time. I am sending final
version v5 as last.Please sorry for inconvenience
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v5 14/15] net: wireless: ath: Remove unneeded variable ret returning 0

2015-10-22 Thread Punit Vara
Remove empty line suggested by Sergei

This patch is to the ath5k/eeprom.c that fixes up warning caught by
coccicheck:

Unneeded variable: "ret". Return "0" on line 980

Remove unneeded variable ret created to return zero.

Signed-off-by: Punit Vara <punitv...@gmail.com>
---
 drivers/net/wireless/ath/wcn36xx/main.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ath/wcn36xx/main.c 
b/drivers/net/wireless/ath/wcn36xx/main.c
index 900e72a..94bcc08 100644
--- a/drivers/net/wireless/ath/wcn36xx/main.c
+++ b/drivers/net/wireless/ath/wcn36xx/main.c
@@ -935,8 +935,6 @@ static const struct ieee80211_ops wcn36xx_ops = {
 
 static int wcn36xx_init_ieee80211(struct wcn36xx *wcn)
 {
-   int ret = 0;
-
static const u32 cipher_suites[] = {
WLAN_CIPHER_SUITE_WEP40,
WLAN_CIPHER_SUITE_WEP104,
@@ -977,7 +975,7 @@ static int wcn36xx_init_ieee80211(struct wcn36xx *wcn)
wcn->hw->sta_data_size = sizeof(struct wcn36xx_sta);
wcn->hw->vif_data_size = sizeof(struct wcn36xx_vif);
 
-   return ret;
+   return 0;
 }
 
 static int wcn36xx_platform_get_resources(struct wcn36xx *wcn,
-- 
2.5.3

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 08/15] net: wireless: simplify return flow for usb_control_msg

2015-10-21 Thread Punit Vara
remove int ret suggested by Jiri Slaby
This patch is to the at76c50x-usb.c file that fixes up warning
reported by coccicheck:

WARNING: end returns can be simplified if negative or 0 value

Prefer direct return value instead of writing 2-3 more sentence.

Signed-off-by: Punit Vara <punitv...@gmail.com>
---
 drivers/net/wireless/at76c50x-usb.c | 6 +-
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/net/wireless/at76c50x-usb.c 
b/drivers/net/wireless/at76c50x-usb.c
index dab2513..b4aa062 100644
--- a/drivers/net/wireless/at76c50x-usb.c
+++ b/drivers/net/wireless/at76c50x-usb.c
@@ -543,14 +543,10 @@ static void at76_ledtrig_tx_activity(void)
 
 static int at76_remap(struct usb_device *udev)
 {
-   int ret;
-   ret = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), 0x0a,
+   return usb_control_msg(udev, usb_sndctrlpipe(udev, 0), 0x0a,
  USB_TYPE_VENDOR | USB_DIR_OUT |
  USB_RECIP_INTERFACE, 0, 0, NULL, 0,
  USB_CTRL_GET_TIMEOUT);
-   if (ret < 0)
-   return ret;
-   return 0;
 }
 
 static int at76_get_op_mode(struct usb_device *udev)
-- 
2.5.3

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 05/15] net: wireless: ti: Return flow can be simplified for wl1271_cmd_interrogate

2015-10-21 Thread Punit Vara
Remove int ret suggested by kbuild test robot

This patch is to the wlcore/acx.c file that fixes up warning
reported by coccicheck:

WARNING: end returns can be simplified if negative or 0 value

Prefer direct return value instead of writing 2-3 more sentence.

Signed-off-by: Punit Vara <punitv...@gmail.com>
---
 drivers/net/wireless/ti/wlcore/acx.c | 7 +--
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/net/wireless/ti/wlcore/acx.c 
b/drivers/net/wireless/ti/wlcore/acx.c
index f28fa3b..6b566d9 100644
--- a/drivers/net/wireless/ti/wlcore/acx.c
+++ b/drivers/net/wireless/ti/wlcore/acx.c
@@ -158,16 +158,11 @@ out:
 int wl1271_acx_mem_map(struct wl1271 *wl, struct acx_header *mem_map,
   size_t len)
 {
-   int ret;
 
wl1271_debug(DEBUG_ACX, "acx mem map");
 
-   ret = wl1271_cmd_interrogate(wl, ACX_MEM_MAP, mem_map,
+   return wl1271_cmd_interrogate(wl, ACX_MEM_MAP, mem_map,
 sizeof(struct acx_header), len);
-   if (ret < 0)
-   return ret;
-
-   return 0;
 }
 
 int wl1271_acx_rx_msdu_life_time(struct wl1271 *wl)
-- 
2.5.3

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html