[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 
---
 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

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


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  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
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


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
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 ?
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


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.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[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 
---
-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

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


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  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
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


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  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(&wilc)) {
> 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
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


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  wrote:
>
>
> On 2015년 11월 09일 18:05, punit vara wrote:
>>
>> On Mon, Nov 9, 2015 at 2:25 PM, glen lee  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(&wilc)) {
>>>  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;
>> @@ -1083,6 +1083

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
 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  wrote:
>> >
>> >
>> > On 2015년 11월 09일 18:05, punit vara wrote:
>> >>
>> >> On Mon, Nov 9, 2015 at 2:25 PM, glen lee  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 :-(
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


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
 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  wrote:
>> >
>> >
>> > On 2015년 11월 09일 18:05, punit vara wrote:
>> >>
>> >> On Mon, Nov 9, 2015 at 2:25 PM, glen lee  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
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


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
 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
>>  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  wrote:
>> >> >
>> >> >
>> >> > On 2015년 11월 09일 18:05, punit vara wrote:
>> >> >>
>> >> >> On Mon, Nov 9, 2015 at 2:25 PM, glen lee  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 .
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] Staging: ks7010: Prefer using the BIT macro

2016-11-13 Thread Punit Vara
Replace all occurances of (1<
---
 drivers/staging/ks7010/ks7010_sdio.h | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/ks7010/ks7010_sdio.h 
b/drivers/staging/ks7010/ks7010_sdio.h
index c89e570..197b4c0 100644
--- a/drivers/staging/ks7010/ks7010_sdio.h
+++ b/drivers/staging/ks7010/ks7010_sdio.h
@@ -53,14 +53,14 @@
 /* ARM to SD interrupt Pending */
 #define INT_PENDING0x24
 
-#define INT_GCR_B  (1<<7)
-#define INT_GCR_A  (1<<6)
-#define INT_WRITE_STATUS   (1<<5)
-#define INT_WRITE_INDEX(1<<4)
-#define INT_WRITE_SIZE (1<<3)
-#define INT_READ_STATUS(1<<2)
-#define INT_READ_INDEX (1<<1)
-#define INT_READ_SIZE  (1<<0)
+#define INT_GCR_B  BIT(7)
+#define INT_GCR_A  BIT(6)
+#define INT_WRITE_STATUS   BIT(5)
+#define INT_WRITE_INDEXBIT(4)
+#define INT_WRITE_SIZE BIT(3)
+#define INT_READ_STATUSBIT(2)
+#define INT_READ_INDEX BIT(1)
+#define INT_READ_SIZE  BIT(0)
 
 /* General Communication Register A */
 #define GCR_A  0x28
-- 
2.7.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2] Subject: Staging: ks7010: Prefer using the BIT macro

2016-11-14 Thread Punit Vara
Replace all occurences of (1<
---
* remove unecessary indentation

 drivers/staging/ks7010/ks7010_sdio.h | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/ks7010/ks7010_sdio.h 
b/drivers/staging/ks7010/ks7010_sdio.h
index c89e570..0a0951f 100644
--- a/drivers/staging/ks7010/ks7010_sdio.h
+++ b/drivers/staging/ks7010/ks7010_sdio.h
@@ -53,14 +53,14 @@
 /* ARM to SD interrupt Pending */
 #define INT_PENDING0x24
 
-#define INT_GCR_B  (1<<7)
-#define INT_GCR_A  (1<<6)
-#define INT_WRITE_STATUS   (1<<5)
-#define INT_WRITE_INDEX(1<<4)
-#define INT_WRITE_SIZE (1<<3)
-#define INT_READ_STATUS(1<<2)
-#define INT_READ_INDEX (1<<1)
-#define INT_READ_SIZE  (1<<0)
+#define INT_GCR_B  BIT(7)
+#define INT_GCR_A  BIT(6)
+#define INT_WRITE_STATUS   BIT(5)
+#define INT_WRITE_INDEXBIT(4)
+#define INT_WRITE_SIZE BIT(3)
+#define INT_READ_STATUSBIT(2)
+#define INT_READ_INDEX BIT(1)
+#define INT_READ_SIZE  BIT(0)
 
 /* General Communication Register A */
 #define GCR_A  0x28
-- 
2.7.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] Staging: ks7010: Prefer using the BIT macro

2016-11-14 Thread punit vara
Sorry for that.

I have updated the patch and sent you version 2. If I am still wrong
could you please share me link to the sample commit ?

thanks,
PV

On Mon, Nov 14, 2016 at 12:30 PM, Greg KH  wrote:
> On Mon, Nov 14, 2016 at 12:20:40PM +0530, Punit Vara wrote:
>>   Replace all occurances of (1<>   ks7010_sdio.h to get rid of checkpatch.pl "CHECK" output "Prefer using
>>   BIT macro"
>>
>>   Signed-off-by: Punit Vara 
>
> Why the odd indentation?
>
> Same for the Subject: line, why the extra whitespace?
>
> thanks,
>
> greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v3] Staging: ks7010: Prefer using the BIT macro

2016-11-14 Thread Punit Vara
Replace all occurences of (1<
---
* Subject made more clear
* Remove unnecessary indentation

 drivers/staging/ks7010/ks7010_sdio.h | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/ks7010/ks7010_sdio.h 
b/drivers/staging/ks7010/ks7010_sdio.h
index c89e570..0a0951f 100644
--- a/drivers/staging/ks7010/ks7010_sdio.h
+++ b/drivers/staging/ks7010/ks7010_sdio.h
@@ -53,14 +53,14 @@
 /* ARM to SD interrupt Pending */
 #define INT_PENDING0x24
 
-#define INT_GCR_B  (1<<7)
-#define INT_GCR_A  (1<<6)
-#define INT_WRITE_STATUS   (1<<5)
-#define INT_WRITE_INDEX(1<<4)
-#define INT_WRITE_SIZE (1<<3)
-#define INT_READ_STATUS(1<<2)
-#define INT_READ_INDEX (1<<1)
-#define INT_READ_SIZE  (1<<0)
+#define INT_GCR_B  BIT(7)
+#define INT_GCR_A  BIT(6)
+#define INT_WRITE_STATUS   BIT(5)
+#define INT_WRITE_INDEXBIT(4)
+#define INT_WRITE_SIZE BIT(3)
+#define INT_READ_STATUSBIT(2)
+#define INT_READ_INDEX BIT(1)
+#define INT_READ_SIZE  BIT(0)
 
 /* General Communication Register A */
 #define GCR_A  0x28
-- 
2.7.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] Staging: ks7010: Use preffered kernel types

2016-11-15 Thread Punit Vara
Replace uint8_t, uint16_t and uint32_t with preferred kernel types
u8, u16 and u32 respectively suggested by checkpatch.pl

Signed-off-by: Punit Vara 
---
 drivers/staging/ks7010/ks_wlan.h | 138 +--
 drivers/staging/ks7010/michael_mic.c |  10 +--
 drivers/staging/ks7010/michael_mic.h |  18 ++---
 3 files changed, 83 insertions(+), 83 deletions(-)

diff --git a/drivers/staging/ks7010/ks_wlan.h b/drivers/staging/ks7010/ks_wlan.h
index 6981170..279e9b0 100644
--- a/drivers/staging/ks7010/ks_wlan.h
+++ b/drivers/staging/ks7010/ks_wlan.h
@@ -42,36 +42,36 @@
 #endif
 
 struct ks_wlan_parameter {
-   uint8_t operation_mode; /* Operation Mode */
-   uint8_t channel;/*  Channel */
-   uint8_t tx_rate;/*  Transmit Rate */
+   u8 operation_mode;  /* Operation Mode */
+   u8 channel; /*  Channel */
+   u8 tx_rate; /*  Transmit Rate */
struct {
-   uint8_t size;
-   uint8_t body[16];
+   u8 size;
+   u8 body[16];
} rate_set;
-   uint8_t bssid[ETH_ALEN];/* BSSID */
+   u8 bssid[ETH_ALEN]; /* BSSID */
struct {
-   uint8_t size;
-   uint8_t body[32 + 1];
+   u8 size;
+   u8 body[32 + 1];
} ssid; /*  SSID */
-   uint8_t preamble;   /*  Preamble */
-   uint8_t powermgt;   /*  PowerManagementMode */
-   uint32_t scan_type; /*  AP List Scan Type */
+   u8 preamble;/*  Preamble */
+   u8 powermgt;/*  PowerManagementMode */
+   u32 scan_type;  /*  AP List Scan Type */
 #define BEACON_LOST_COUNT_MIN 0
 #define BEACON_LOST_COUNT_MAX 65535
-   uint32_t beacon_lost_count; /*  Beacon Lost Count */
-   uint32_t rts;   /*  RTS Threashold */
-   uint32_t fragment;  /*  Fragmentation Threashold */
-   uint32_t privacy_invoked;
-   uint32_t wep_index;
+   u32 beacon_lost_count;  /*  Beacon Lost Count */
+   u32 rts;/*  RTS Threashold */
+   u32 fragment;   /*  Fragmentation Threashold */
+   u32 privacy_invoked;
+   u32 wep_index;
struct {
-   uint8_t size;
-   uint8_t val[13 * 2 + 1];
+   u8 size;
+   u8 val[13 * 2 + 1];
} wep_key[4];
-   uint16_t authenticate_type;
-   uint16_t phy_type;  /* 11b/11g/11bg mode type */
-   uint16_t cts_mode;  /* for 11g/11bg mode cts mode */
-   uint16_t phy_info_timer;/* phy information timer */
+   u16 authenticate_type;
+   u16 phy_type;   /* 11b/11g/11bg mode type */
+   u16 cts_mode;   /* for 11g/11bg mode cts mode */
+   u16 phy_info_timer; /* phy information timer */
 };
 
 enum {
@@ -215,37 +215,37 @@ struct hostt_t {
 
 #define RSN_IE_BODY_MAX 64
 struct rsn_ie_t {
-   uint8_t id; /* 0xdd = WPA or 0x30 = RSN */
-   uint8_t size;   /* max ? 255 ? */
-   uint8_t body[RSN_IE_BODY_MAX];
+   u8 id;  /* 0xdd = WPA or 0x30 = RSN */
+   u8 size;/* max ? 255 ? */
+   u8 body[RSN_IE_BODY_MAX];
 } __packed;
 
 #ifdef WPS
 #define WPS_IE_BODY_MAX 255
 struct wps_ie_t {
-   uint8_t id; /* 221 'dd  00 50 F2 04' */
-   uint8_t size;   /* max ? 255 ? */
-   uint8_t body[WPS_IE_BODY_MAX];
+   u8 id;  /* 221 'dd  00 50 F2 04' */
+   u8 size;/* max ? 255 ? */
+   u8 body[WPS_IE_BODY_MAX];
 } __packed;
 #endif /* WPS */
 
 struct local_ap_t {
-   uint8_t bssid[6];
-   uint8_t rssi;
-   uint8_t sq;
+   u8 bssid[6];
+   u8 rssi;
+   u8 sq;
struct {
-   uint8_t size;
-   uint8_t body[32];
-   uint8_t ssid_pad;
+   u8 size;
+   u8 body[32];
+   u8 ssid_pad;
} ssid;
struct {
-   uint8_t size;
-   uint8_t body[16];
-   uint8_t rate_pad;
+   u8 size;
+   u8 body[16];
+   u8 rate_pad;
} rate_set;
-   uint16_t capability;
-   uint8_t channel;
-   uint8_t noise;
+   u16 capability;
+   u8 channel;
+   u8 noise;
struct rsn_ie_t wpa_ie;
struct rsn_ie_t rsn_ie;
 #ifdef WPS
@@ -261,15 +261,15 @@ struct local_aplist_t {
 };
 
 struct local_gain_t {
-   uint8_t TxMode;
-   uint8_t RxMode;
-   uint8_t TxGain;
-   uint8_t RxGain;
+   u8 TxMode;
+   u8 RxMode;
+   u8 TxGain;
+   u8 RxGain;
 };
 
 struct local_eeprom_sum_t {
-   uint8_t type;
-   uint8_t result;
+   u8 type;
+   u8 result;
 };
 
 enum {
@@ -351,25 +351,25 @@ enum {
 #define MIC_KEY_SIZE 8
 
 struct wpa_key_t {
-   uint32_t ext_flags; /* IW_ENCODE_EXT_xxx */
-   uint8_t tx_seq[IW_ENCODE_SEQ_MAX_SIZE]; /* LSB first */
-   uint8_t rx_seq[IW_ENCODE_SEQ_MAX_SIZE]; /* LSB first */
+   u32 ext_flags;  /* IW_ENCODE_EXT_xxx 

Re: [PATCH] Staging: rtl8712: rtl871x_ioctl_linux.c Move constant to right side of the comparision

2015-09-28 Thread punit vara
On Mon, Sep 28, 2015 at 4:48 PM, Sudip Mukherjee
 wrote:
> On Sat, Sep 26, 2015 at 12:45:46PM -0500, Larry Finger wrote:
>> On 09/26/2015 11:49 AM, Punit Vara wrote:
>> >This patch is to the rtl871x_ioctl_linux.c that fixes up following
>> >warning reported by checkpatch.pl :
>> >
>> >- Comparisons should place the constant on the right side of the test
>> >
>> >Signed-off-by: Punit Vara 
>>
>> This warning is crap. WTF difference does it make The compiler
>> does not care, and any reader with any piece of a brain is not going
>> to be confused!
>>
>> This patch and all others like it are just meaningless source churning!
>>
>> This author has made such a royal mess of his patches that I
>> recommend that ALL of them be dropped. In addition, we should
>> continue to drop his changes until he learns how to use git to
>> generate N/M patches, and until he reads the documentation on patch
>> submission.
> Excuse me for my ignorance, but I still can not see what was wrong with
> his patch. checkpatch is giving warning and he has fixed it. As far as
> sending in series is concerned, he is a newbie and after telling him how
> to generate patches in series he has learnt that. I have already told
> him that his patches might be dropped as they are not in series and he
> is ready to resend in series as soon as Greg confirms that they are
> dropped. And as long as the driver is in staging there will be source
> churning, isn't it?
> If i remember correctly I was told that for a driver to be moved out of
> staging the primary thing is that all checkpatch warnings needs to fixed.
> So if this driver has to move out of staging someday then these warnings
> also has to be fixed by someone.
>
> regards
> sudip

Thank you for understanding my situation @Sudip @Dan Carpenter ..
First I have planned to clean all the warning whatever it may be silly
or some serious. So that by cleaning those I can easily understand the
whole process . I was thinking to dig into TODO list and followed by
writing any driver. Greg please confirm me what should I do ? Do i
touch any rtl* ? It is first time I am working with this much huge
project .So may be I dont know what warnings are priority and what are
not ? I felt proud when my first patch was accepted .Execuse me @Larry
@Joshua if I irritate you by sending so many patches in sequence but I
am happy to clean all the staging driver warning first. So that every
programmer can focus on programming only not on cleanpatch warnings .

Regards,
Punit
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 3/3] Staging: rts5208: Coding style warnings fix for block comments

2015-09-30 Thread punit vara
On Tue, Sep 29, 2015 at 5:55 AM, Greg KH  wrote:
> On Mon, Sep 21, 2015 at 11:29:50PM +0530, Punit Vara wrote:
>> This patch is to rtsx_chip.h that fixes up following warning reported
>> by checkpatch.pl :
>>
>> -Block comments use * on subsequent lines
>> -Block comments use a trailing */ on a separate line
>>
>> Signed-off-by: Punit Vara 
>> ---
>>  drivers/staging/rts5208/rtsx_chip.h | 66 
>> +++--
>>  1 file changed, 42 insertions(+), 24 deletions(-)
>
> Where is patch 1/3 and 2/3?
>
> You have sent me almost 60 different patches, yet you gave me no idea
> what order to apply them in at all, what am I supposed to do with all of
> them?
>
> Please redo all of your outstanding patches that I have not taken and
> resend them in a proper patch series, numbered correctly so that I have
> a chance to know what order to apply the.  I've now purged my todo queue
> of all of your patches.
>
> thanks,
>
> greg k-h


I will resend you all the patches whichever having block comment
warnings as soon as I get some time.

Thanks !
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 01/11] Staging: rtl8712: drv_types.h:Coding style warnings fix for block comments

2015-10-07 Thread Punit Vara
This is patch to the drv_types.h file that fixes up following warning
reported by checkpatch.pl :

-Block comments use * on subsequent lines
-Block comments use a trailing */ on a separate line

Signed-off-by: Punit Vara 
---
 drivers/staging/rtl8712/drv_types.h | 11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8712/drv_types.h 
b/drivers/staging/rtl8712/drv_types.h
index e62543d..3d64fee 100644
--- a/drivers/staging/rtl8712/drv_types.h
+++ b/drivers/staging/rtl8712/drv_types.h
@@ -23,11 +23,12 @@
  * Larry Finger 
  *
  
**/
-/*-
-
-   For type defines and data structure defines
-
*/
+/* -
+ *
+ * For type defines and data structure defines
+ *
+ * -
+ */
 #ifndef __DRV_TYPES_H__
 #define __DRV_TYPES_H__
 
-- 
2.5.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 03/11] Staging: rtl8712: ieee80211.c: Coding style warnings fix for block comments

2015-10-07 Thread Punit Vara
This is patch to the ieee80211.c file that fixes up following warning
reported by checkpatch.pl :

-Block comments use * on subsequent lines
-Block comments use a trailing */ on a separate line

Signed-off-by: Punit Vara 
---
 drivers/staging/rtl8712/ieee80211.c | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8712/ieee80211.c 
b/drivers/staging/rtl8712/ieee80211.c
index c5527c1..261a973 100644
--- a/drivers/staging/rtl8712/ieee80211.c
+++ b/drivers/staging/rtl8712/ieee80211.c
@@ -107,9 +107,10 @@ u8 *r8712_set_ie(u8 *pbuf, sint index, uint len, u8 
*source, uint *frlen)
return pbuf + len + 2;
 }
 
-/*
-index: the information element id index, limit is the limit for search
--*/
+/* ---
+ * index: the information element id index, limit is the limit for search
+ * ---
+ */
 u8 *r8712_get_ie(u8 *pbuf, sint index, sint *len, sint limit)
 {
sint tmp, i;
-- 
2.5.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 02/11] Staging: rtl8712: hal_init.c: Coding style warnings fix for block comments

2015-10-07 Thread Punit Vara
This is patch to the hal_init.c file that fixes up following warning
reported by checkpatch.pl :

-Block comments use * on subsequent lines
-Block comments use a trailing */ on a separate line

Signed-off-by: Punit Vara 
---
 drivers/staging/rtl8712/hal_init.c | 12 
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8712/hal_init.c 
b/drivers/staging/rtl8712/hal_init.c
index 0a1c631..0265214 100644
--- a/drivers/staging/rtl8712/hal_init.c
+++ b/drivers/staging/rtl8712/hal_init.c
@@ -297,7 +297,8 @@ static u8 rtl8712_dl_fw(struct _adapter *padapter)
 
tmp8 = r8712_read8(padapter, 0x1025000A);
if (tmp8 & BIT(4)) /* When boot from EEPROM,
-   & FW need more time to read EEPROM */
+   * & FW need more time to read EEPROM
+   */
i = 60;
else/* boot from EFUSE */
i = 30;
@@ -331,7 +332,8 @@ uint rtl8712_hal_init(struct _adapter *padapter)
r8712_read32(padapter, RCR));
val32 = r8712_read32(padapter, RCR);
r8712_write32(padapter, RCR, (val32 | BIT(26))); /* Enable RX TCP
-   Checksum offload */
+ * Checksum offload
+ */
netdev_info(padapter->pnetdev, "2 RCR=0x%x\n",
r8712_read32(padapter, RCR));
val32 = r8712_read32(padapter, RCR);
@@ -345,7 +347,8 @@ uint rtl8712_hal_init(struct _adapter *padapter)
r8712_write8(padapter, 0x102500BD, r8712_read8(padapter, 0x102500BD) |
   BIT(7)); /* enable usb rx aggregation */
r8712_write8(padapter, 0x102500D9, 1); /* TH=1 => means that invalidate
-   *  usb rx aggregation */
+   *  usb rx aggregation
+   */
r8712_write8(padapter, 0x1025FE5B, 0x04); /* 1.7ms/4 */
/* Fix the RX FIFO issue(USB error) */
r8712_write8(padapter, 0x1025fe5C, r8712_read8(padapter, 0x1025fe5C)
@@ -366,7 +369,8 @@ uint rtl8712_hal_deinit(struct _adapter *padapter)
r8712_write8(padapter, SYS_FUNC_EN+1, 0x70);
r8712_write8(padapter, PMC_FSM, 0x06);  /* Enable Loader Data Keep */
r8712_write8(padapter, SYS_ISO_CTRL, 0xF9); /* Isolation signals from
-* CORE, PLL */
+* CORE, PLL
+*/
r8712_write8(padapter, SYS_ISO_CTRL+1, 0xe8); /* Enable EFUSE 1.2V */
r8712_write8(padapter, AFE_PLL_CTRL, 0x00); /* Disable AFE PLL. */
r8712_write8(padapter, LDOA15_CTRL, 0x54);  /* Disable A15V */
-- 
2.5.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 04/11] Staging: rtl8712: ieee80211.h: Coding style warnings fix for block comments

2015-10-07 Thread Punit Vara
This is patch to the ieee80211.h file that fixes up following warning
reported by checkpatch.pl :

-Block comments use * on subsequent lines
-Block comments use a trailing */ on a separate line

Signed-off-by: Punit Vara 
---
 drivers/staging/rtl8712/ieee80211.h | 48 -
 1 file changed, 26 insertions(+), 22 deletions(-)

diff --git a/drivers/staging/rtl8712/ieee80211.h 
b/drivers/staging/rtl8712/ieee80211.h
index 6e813a9..d374824c 100644
--- a/drivers/staging/rtl8712/ieee80211.h
+++ b/drivers/staging/rtl8712/ieee80211.h
@@ -120,12 +120,13 @@ struct ieee_param {
 
 #define IEEE80211_DATA_LEN 2304
 /* Maximum size for the MA-UNITDATA primitive, 802.11 standard section
-   6.2.1.1.2.
-
-   The figure in section 7.1.2 suggests a body size of up to 2312
-   bytes is allowed, which is a bit confusing, I suspect this
-   represents the 2304 bytes of real data, plus a possible 8 bytes of
-   WEP IV and ICV. (this interpretation suggested by Ramiro Barreiro) */
+ * 6.2.1.1.2.
+ *
+ * The figure in section 7.1.2 suggests a body size of up to 2312
+ * bytes is allowed, which is a bit confusing, I suspect this
+ * represents the 2304 bytes of real data, plus a possible 8 bytes of
+ * WEP IV and ICV. (this interpretation suggested by Ramiro Barreiro)
+ */
 
 #define IEEE80211_HLEN 30
 #define IEEE80211_FRAME_LEN(IEEE80211_DATA_LEN + IEEE80211_HLEN)
@@ -405,7 +406,8 @@ struct ieee80211_snap_hdr {
 
 /* NOTE: This data is for statistical purposes; not all hardware provides this
  *   information for frames received.  Not setting these will not cause
- *   any adverse affects. */
+ *   any adverse affects.
+ */
 struct ieee80211_rx_stats {
s8 rssi;
u8 signal;
@@ -420,7 +422,8 @@ struct ieee80211_rx_stats {
 /* IEEE 802.11 requires that STA supports concurrent reception of at least
  * three fragmented frames. This define can be increased to support more
  * concurrent frames, but it should be noted that each entry can consume about
- * 2 kB of RAM and increasing cache size will slow down frame reassembly. */
+ * 2 kB of RAM and increasing cache size will slow down frame reassembly.
+ */
 #define IEEE80211_FRAG_CACHE_LEN 4
 
 struct ieee80211_frag_entry {
@@ -510,19 +513,19 @@ struct ieee80211_security {
 } __packed;
 
 /*
-
- 802.11 data frame from AP
-
-  ,---.
-Bytes |  2   |  2   |6|6|6|  2   | 0..2312 |   4  |
-  |--|--|-|-|-|--|-|--|
-Desc. | ctrl | dura |  DA/RA  |   TA|SA   | Sequ |  frame  |  fcs |
-  |  | tion | (BSSID) | | | ence |  data   |  |
-  `---'
-
-Total: 28-2340 bytes
-
-*/
+ *
+ * 802.11 data frame from AP
+ *
+ *   ,---.
+ * Bytes |  2   |  2   |6|6|6|  2   | 0..2312 |   4  |
+ *   |--|--|-|-|-|--|-|--|
+ * Desc. | ctrl | dura |  DA/RA  |   TA|SA   | Sequ |  frame  |  fcs |
+ *   |  | tion | (BSSID) | | | ence |  data   |  |
+ *   `---'
+ *
+ * Total: 28-2340 bytes
+ *
+ */
 
 struct ieee80211_header_data {
u16 frame_ctl;
@@ -628,7 +631,8 @@ struct ieee80211_txb {
 /* MAX_RATES_LENGTH needs to be 12.  The spec says 8, and many APs
  * only use 8, and then use extended rates for the remaining supported
  * rates.  Other APs, however, stick all of their supported rates on the
- * main rates information element... */
+ * main rates information element...
+ */
 #define MAX_RATES_LENGTH  ((u8)12)
 #define MAX_RATES_EX_LENGTH   ((u8)16)
 #define MAX_NETWORK_COUNT  128
-- 
2.5.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 06/11] Staging: rtl8712: os_intfs.c : Coding style warning fix for block comment

2015-10-07 Thread Punit Vara
This is patch to the os_intfs.c file that fixes up following warning
reported by checkpatch.pl :

-Block comments use a trailing */ on a separate line

Signed-off-by: Punit Vara 
---
 drivers/staging/rtl8712/os_intfs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8712/os_intfs.c 
b/drivers/staging/rtl8712/os_intfs.c
index 5d551a1..f34a963 100644
--- a/drivers/staging/rtl8712/os_intfs.c
+++ b/drivers/staging/rtl8712/os_intfs.c
@@ -366,7 +366,8 @@ static void enable_video_mode(struct _adapter *padapter, 
int cbw40_value)
 
if (cbw40_value) {
/* if the driver supports the 40M bandwidth,
-* we can enable the bit 9.*/
+* we can enable the bit 9.
+*/
intcmd |= 0x200;
}
r8712_fw_cmd(padapter, intcmd);
-- 
2.5.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 09/11] Staging: rtl8712: rtl8712_cmdctrl_bitdef.h: Coding style warning fix for block comment

2015-10-07 Thread Punit Vara
This is patch to the rtl8712_cmdctrl_bitdef.h file that fixes up following
 warning reported by checkpatch.pl :

-Block comments use a trailing */ on a separate line

Signed-off-by: Punit Vara 
---
 drivers/staging/rtl8712/rtl8712_cmdctrl_bitdef.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8712/rtl8712_cmdctrl_bitdef.h 
b/drivers/staging/rtl8712/rtl8712_cmdctrl_bitdef.h
index 8dffe10..b7dda90 100644
--- a/drivers/staging/rtl8712/rtl8712_cmdctrl_bitdef.h
+++ b/drivers/staging/rtl8712/rtl8712_cmdctrl_bitdef.h
@@ -21,7 +21,8 @@
 #define __RTL8712_CMDCTRL_BITDEF_H__
 
 /*
- * 2. Command Control Registers (Offset: 0x0040 - 0x004F)*/
+ * 2. Command Control Registers (Offset: 0x0040 - 0x004F)
+ */
 /*--*/
 /*   8192S (CMD) command register bits (Offset 0x40, 16 bits)*/
 /*--*/
-- 
2.5.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 05/11] Staging: rtl8712: mlme_linux.c: Coding style warnings fix for block comments

2015-10-07 Thread Punit Vara
This is patch to the mlme_linux.c file that fixes up following warning
reported by checkpatch.pl :

-Block comments use a trailing */ on a separate line

Signed-off-by: Punit Vara 
---
 drivers/staging/rtl8712/mlme_linux.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8712/mlme_linux.c 
b/drivers/staging/rtl8712/mlme_linux.c
index 8c5a475..6d253bf 100644
--- a/drivers/staging/rtl8712/mlme_linux.c
+++ b/drivers/staging/rtl8712/mlme_linux.c
@@ -122,7 +122,8 @@ void r8712_os_indicate_disconnect(struct _adapter *adapter)
r8712_use_tkipkey_handler,
(unsigned long)adapter);
/* Restore the PMK information to securitypriv structure
-* for the following connection. */
+* for the following connection.
+*/
memcpy(&adapter->securitypriv.PMKIDList[0],
&backupPMKIDList[0],
sizeof(struct RT_PMKID_LIST) * NUM_PMKID_CACHE);
-- 
2.5.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 08/11] Staging: rtl8712: rtl8712_cmd.c: Coding style warnings fix for block comments

2015-10-07 Thread Punit Vara
This is patch to the rtl8712_cmd.c file that fixes up following warning
reported by checkpatch.pl :

-Block comments use a trailing */ on a separate line

Signed-off-by: Punit Vara 
---
 drivers/staging/rtl8712/rtl8712_cmd.c | 12 
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8712/rtl8712_cmd.c 
b/drivers/staging/rtl8712/rtl8712_cmd.c
index 007f0a3..b755ab4 100644
--- a/drivers/staging/rtl8712/rtl8712_cmd.c
+++ b/drivers/staging/rtl8712/rtl8712_cmd.c
@@ -64,10 +64,12 @@ static void check_hw_pbc(struct _adapter *padapter)
return;
if (tmp1byte&HAL_8192S_HW_GPIO_WPS_BIT) {
/* Here we only set bPbcPressed to true
-* After trigger PBC, the variable will be set to false */
+* After trigger PBC, the variable will be set to false
+*/
DBG_8712("CheckPbcGPIO - PBC is pressed \n");
/* 0 is the default value and it means the application monitors
-* the HW PBC doesn't provide its pid to driver. */
+* the HW PBC doesn't provide its pid to driver.
+*/
if (padapter->pid == 0)
return;
kill_pid(find_vpid(padapter->pid), SIGUSR1, 1);
@@ -76,7 +78,8 @@ static void check_hw_pbc(struct _adapter *padapter)
 
 /* query rx phy status from fw.
  * Adhoc mode: beacon.
- * Infrastructure mode: beacon , data. */
+ * Infrastructure mode: beacon , data.
+ */
 static void query_fw_rx_phy_status(struct _adapter *padapter)
 {
u32 val32 = 0;
@@ -257,7 +260,8 @@ static struct cmd_obj *cmd_hdl_filter(struct _adapter 
*padapter,
/* Before set JoinBss_CMD to FW, driver must ensure FW is in
 * PS_MODE_ACTIVE. Directly write rpwm to radio on and assign
 * new pwr_mode to Driver, instead of use workitem to change
-* state. */
+* state.
+*/
if (padapter->pwrctrlpriv.pwr_mode > PS_MODE_ACTIVE) {
padapter->pwrctrlpriv.pwr_mode = PS_MODE_ACTIVE;
_enter_pwrlock(&(padapter->pwrctrlpriv.lock));
-- 
2.5.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 10/11] Staging: rtl8712: rtl8712_gp_bitdef.h: Coding style warning fix for block comment

2015-10-07 Thread Punit Vara
This is patch to the rtl8712_gp_bitdef.h file that fixes up following
 warning reported by checkpatch.pl :

-Block comments use a trailing */ on a separate line

Signed-off-by: Punit Vara 
---
 drivers/staging/rtl8712/rtl8712_gp_bitdef.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8712/rtl8712_gp_bitdef.h 
b/drivers/staging/rtl8712/rtl8712_gp_bitdef.h
index 138ea45..44c9060 100644
--- a/drivers/staging/rtl8712/rtl8712_gp_bitdef.h
+++ b/drivers/staging/rtl8712/rtl8712_gp_bitdef.h
@@ -64,7 +64,8 @@
 
 #defineGPIOMUX_EN  BIT(3)  /* When this bit is set to "1",
 * GPIO PINs will switch to MAC
-* GPIO Function*/
+* GPIO Function
+*/
 #defineGPIOSEL_GPIO0   /* UART or JTAG or pure GPIO*/
 #defineGPIOSEL_PHYDBG  1   /* PHYDBG*/
 #defineGPIOSEL_BT  2   /* BT_coex*/
-- 
2.5.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 07/11] Staging: rtl8712: recv_linux.c: Coding style warning fix for block comment

2015-10-07 Thread Punit Vara
This is patch to the recv_linux.c file that fixes up following warning
reported by checkpatch.pl :

-Block comments use a trailing */ on a separate line

Signed-off-by: Punit Vara 
---
 drivers/staging/rtl8712/recv_linux.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8712/recv_linux.c 
b/drivers/staging/rtl8712/recv_linux.c
index 4201ce7..2f5460d 100644
--- a/drivers/staging/rtl8712/recv_linux.c
+++ b/drivers/staging/rtl8712/recv_linux.c
@@ -127,7 +127,8 @@ void r8712_recv_indicatepkt(struct _adapter *padapter,
skb->protocol = eth_type_trans(skb, padapter->pnetdev);
netif_rx(skb);
precv_frame->u.hdr.pkt = NULL; /* pointers to NULL before
-   * r8712_free_recvframe() */
+   * r8712_free_recvframe()
+   */
r8712_free_recvframe(precv_frame, pfree_recv_queue);
return;
 _recv_indicatepkt_drop:
-- 
2.5.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 11/11] Staging: rtl8712: rtl8712_hal.h: Coding style warnings fix for block comments

2015-10-07 Thread Punit Vara
This is patch to the rtl8712_hal.h file that fixes up following warning
reported by checkpatch.pl :

-Block comments use a trailing */ on a separate line

Signed-off-by: Punit Vara 
---
 drivers/staging/rtl8712/rtl8712_hal.h | 14 +-
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8712/rtl8712_hal.h 
b/drivers/staging/rtl8712/rtl8712_hal.h
index 4c51fa3..57d5d2d 100644
--- a/drivers/staging/rtl8712/rtl8712_hal.h
+++ b/drivers/staging/rtl8712/rtl8712_hal.h
@@ -68,12 +68,14 @@ struct fw_priv {   /*8-bytes alignment required*/
unsigned char signature_0;  /*0x12: CE product, 0x92: IT product*/
unsigned char signature_1;  /*0x87: CE product, 0x81: IT product*/
unsigned char hci_sel; /*0x81: PCI-AP, 01:PCIe, 02: 92S-U, 0x82: USB-AP,
-   * 0x12: 72S-U, 03:SDIO*/
+   * 0x12: 72S-U, 03:SDIO
+   */
unsigned char chip_version; /*the same value as register value*/
unsigned char customer_ID_0; /*customer  ID low byte*/
unsigned char customer_ID_1; /*customer  ID high byte*/
unsigned char rf_config;  /*0x11:  1T1R, 0x12: 1T2R, 0x92: 1T2R turbo,
-* 0x22: 2T2R*/
+* 0x22: 2T2R
+*/
unsigned char usb_ep_num;  /* 4: 4EP, 6: 6EP, 11: 11EP*/
/*--- long word 1 */
unsigned char regulatory_class_0; /*regulatory class bit map 0*/
@@ -97,7 +99,8 @@ struct fw_priv {   /*8-bytes alignment required*/
unsigned char qos_en;/*1: QoS enable*/
unsigned char bw_40MHz_en;   /*1: 40MHz BW enable*/
unsigned char AMSDU2AMPDU_en;   /*1: 4181 convert AMSDU to AMPDU,
-  * 0: disable*/
+  * 0: disable
+  */
unsigned char AMPDU_en;   /*1: 11n AMPDU enable*/
unsigned char rate_control_offload; /*1: FW offloads,0: driver handles*/
unsigned char aggregation_offload;  /*1: FW offloads,0: driver handles*/
@@ -125,8 +128,9 @@ struct fw_priv {   /*8-bytes alignment required*/
 
 struct fw_hdr {/*8-byte alignment required*/
unsigned short  signature;
-   unsigned short  version;/*0x8000 ~ 0x8FFF for FPGA version,
-*0x ~ 0x7FFF for ASIC version,*/
+   unsigned short  version;/* 0x8000 ~ 0x8FFF for FPGA version,
+* 0x ~ 0x7FFF for ASIC version,
+*/
unsigned intdmem_size;/*define the size of boot loader*/
unsigned intimg_IMEM_size; /*define the size of FW in IMEM*/
unsigned intimg_SRAM_size; /*define the size of FW in SRAM*/
-- 
2.5.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 2/4] Staging: rtl8712: Use ether_addr_equal() over memcmp()

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

-Prefer ether_addr_equal() or ether_addr_equal_unaligned() over memcmp()

bssid has datatype u8 and pnetwork->network.MacAddress has data type
 unsigned char.

Signed-off-by: Punit Vara 
---
 drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c 
b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
index 2ba055d..1c9092e 100644
--- a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
+++ b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
@@ -2007,7 +2007,7 @@ static int r871x_get_ap_info(struct net_device *dev,
return -EINVAL;
}
netdev_info(dev, "r8712u: BSSID:%pM\n", bssid);
-   if (!memcmp(bssid, pnetwork->network.MacAddress, ETH_ALEN)) {
+   if (!ether_addr_equal(bssid, pnetwork->network)) {
/* BSSID match, then check if supporting wpa/wpa2 */
pbuf = r8712_get_wpa_ie(&pnetwork->network.IEs[12],
   &wpa_ielen, pnetwork->network.IELength-12);
-- 
2.5.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 4/4] Staging: rtl8712: fix warning for placing constant on the right side of test

2015-10-10 Thread Punit Vara
This patch is to the rtl871x_ioctl_linux.c file that fixes up following
warnings reported by checkpatch.pl:

-Comparisons should place the constant on the right side of the test

Signed-off-by: Punit Vara 
---
 drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c 
b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
index fc1028a..e9852ae 100644
--- a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
+++ b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
@@ -959,7 +959,7 @@ static int r871x_wx_set_priv(struct net_device *dev,
if (IS_ERR(ext))
return PTR_ERR(ext);
 
-   if (0 == strcasecmp(ext, "RSSI")) {
+   if (strcasecmp(ext, "RSSI") == 0) {
/*Return received signal strength indicator in -db for */
/* current AP */
/* Rssi xx */
@@ -976,7 +976,7 @@ static int r871x_wx_set_priv(struct net_device *dev,
} else {
sprintf(ext, "OK");
}
-   } else if (0 == strcasecmp(ext, "LINKSPEED")) {
+   } else if (strcasecmp(ext, "LINKSPEED") == 0) {
/*Return link speed in MBPS */
/*LinkSpeed xx */
union iwreq_data wrqd;
@@ -984,30 +984,30 @@ static int r871x_wx_set_priv(struct net_device *dev,
int mbps;
 
ret_inner = r8711_wx_get_rate(dev, info, &wrqd, extra);
-   if (0 != ret_inner)
+   if (ret_inner != 0)
mbps = 0;
else
mbps = wrqd.bitrate.value / 100;
sprintf(ext, "LINKSPEED %d", mbps);
-   } else if (0 == strcasecmp(ext, "MACADDR")) {
+   } else if (strcasecmp(ext, "MACADDR") == 0) {
/*Return mac address of the station */
/* Macaddr = xx:xx:xx:xx:xx:xx */
sprintf(ext, "MACADDR = %pM", dev->dev_addr);
-   } else if (0 == strcasecmp(ext, "SCAN-ACTIVE")) {
+   } else if (strcasecmp(ext, "SCAN-ACTIVE") == 0) {
/*Set scan type to active */
/*OK if successful */
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
 
pmlmepriv->passive_mode = 1;
sprintf(ext, "OK");
-   } else if (0 == strcasecmp(ext, "SCAN-PASSIVE")) {
+   } else if (strcasecmp(ext, "SCAN-PASSIVE") == 0) {
/*Set scan type to passive */
/*OK if successful */
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
 
pmlmepriv->passive_mode = 0;
sprintf(ext, "OK");
-   } else if (0 == strncmp(ext, "DCE-E", 5)) {
+   } else if (strncmp(ext, "DCE-E", 5) == 0) {
/*Set scan type to passive */
/*OK if successful */
r8712_disconnectCtrlEx_cmd(padapter
@@ -1017,7 +1017,7 @@ static int r871x_wx_set_priv(struct net_device *dev,
, 5000 /*u32 firstStageTO */
);
sprintf(ext, "OK");
-   } else if (0 == strncmp(ext, "DCE-D", 5)) {
+   } else if (strncmp(ext, "DCE-D", 5) == 0) {
/*Set scan type to passive */
/*OK if successfu */
r8712_disconnectCtrlEx_cmd(padapter
-- 
2.5.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 1/4] Staging: rtl8712: Fix warning prefer eth_broadcast_addr() over memset()

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

-Prefer eth_broadcast_addr() over memset()

Signed-off-by: Punit Vara 
---
 drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c 
b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
index 143be0f..2ba055d 100644
--- a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
+++ b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
@@ -1811,8 +1811,7 @@ static int r871x_wx_set_enc_ext(struct net_device *dev,
if (param == NULL)
return -ENOMEM;
param->cmd = IEEE_CMD_SET_ENCRYPTION;
-   memset(param->sta_addr, 0xff, ETH_ALEN);
-
+   eth_broadcast_addr(param->sta_addr);
strncpy((char *)param->u.crypt.alg, alg_name, IEEE_CRYPT_ALG_NAME_LEN);
if (pext->ext_flags & IW_ENCODE_EXT_GROUP_KEY)
param->u.crypt.set_tx = 0;
-- 
2.5.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 0/4] Staging: rtl8712: Fix coding style warnings

2015-10-10 Thread Punit Vara
This set of patch fixes following warnings reported by checkpatch.pl:

-Prefer eth_broadcast_addr() over memset()
-Prefer ether_addr_equal() or ether_addr_equal_unaligned() over memcmp()
-Block comments use * on subsequent lines
-Block comments use a trailing */ on a separate line
-Comparisons should place the constant on the right side of the test

Punit Vara (4):
  Staging: rtl8712: Fix warning prefer eth_broadcast_addr() over
memset()
  Staging: rtl8712: Use ether_addr_equal() over memcmp()
  Staging: rtl8712: Coding style warnings fix for block comments
  Staging: rtl8712: fix warning for placing constant on the right side
of test

 drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 47 ++-
 1 file changed, 25 insertions(+), 22 deletions(-)

--
2.5.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 3/4] Staging: rtl8712: Coding style warnings fix for block comments

2015-10-10 Thread Punit Vara
This patch is to the rtl871x_ioctl_linux.c file that fixes up following
warnings reported by checkpatch.pl :

-Block comments use * on subsequent lines
-Block comments use a trailing */ on a separate line

Signed-off-by: Punit Vara 
---
 drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 26 +++---
 1 file changed, 15 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c 
b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
index 1c9092e..fc1028a 100644
--- a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
+++ b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
@@ -797,13 +797,13 @@ static int r871x_wx_set_pmkid(struct net_device *dev,
int intReturn = false;
 
 /*
-   There are the BSSID information in the bssid.sa_data array.
-   If cmd is IW_PMKSA_FLUSH, it means the wpa_supplicant wants to clear
-   all the PMKID information. If cmd is IW_PMKSA_ADD, it means the
-   wpa_supplicant wants to add a PMKID/BSSID to driver.
-   If cmd is IW_PMKSA_REMOVE, it means the wpa_supplicant wants to
-   remove a PMKID/BSSID from driver.
-*/
+ * There are the BSSID information in the bssid.sa_data array.
+ * If cmd is IW_PMKSA_FLUSH, it means the wpa_supplicant wants to clear
+ * all the PMKID information. If cmd is IW_PMKSA_ADD, it means the
+ * wpa_supplicant wants to add a PMKID/BSSID to driver.
+ * If cmd is IW_PMKSA_REMOVE, it means the wpa_supplicant wants to
+ * remove a PMKID/BSSID from driver.
+ */
if (pPMK == NULL)
return -EINVAL;
memcpy(strIssueBssid, pPMK->bssid.sa_data, ETH_ALEN);
@@ -818,7 +818,8 @@ static int r871x_wx_set_pmkid(struct net_device *dev,
if (!memcmp(psecuritypriv->PMKIDList[j].Bssid,
strIssueBssid, ETH_ALEN)) {
/* BSSID is matched, the same AP => rewrite
-* with new PMKID. */
+* with new PMKID.
+*/
netdev_info(dev, "r8712u: %s: BSSID exists in 
the PMKList.\n",
__func__);
memcpy(psecuritypriv->PMKIDList[j].PMKID,
@@ -850,7 +851,8 @@ static int r871x_wx_set_pmkid(struct net_device *dev,
if (!memcmp(psecuritypriv->PMKIDList[j].Bssid,
strIssueBssid, ETH_ALEN)) {
/* BSSID is matched, the same AP => Remove
-* this PMKID information and reset it. */
+* this PMKID information and reset it.
+*/

eth_zero_addr(psecuritypriv->PMKIDList[j].Bssid);
psecuritypriv->PMKIDList[j].bUsed = false;
break;
@@ -1587,7 +1589,8 @@ static int r8711_wx_set_enc(struct net_device *dev,
} else {
wep.KeyLength = 0;
if (keyindex_provided == 1) { /* set key_id only, no given
-  * KeyMaterial(erq->length==0).*/
+  * KeyMaterial(erq->length==0).
+  */
padapter->securitypriv.PrivacyKeyIndex = key;
switch (padapter->securitypriv.DefKeylen[key]) {
case 5:
@@ -2240,7 +2243,8 @@ static iw_handler r8711_handlers[] = {
r8711_wx_set_wap,   /* SIOCSIWAP */
r8711_wx_get_wap,   /* SIOCGIWAP */
r871x_wx_set_mlme,  /* request MLME operation;
-*  uses struct iw_mlme */
+*  uses struct iw_mlme
+*/
dummy,  /* SIOCGIWAPLIST -- deprecated */
r8711_wx_set_scan,  /* SIOCSIWSCAN */
r8711_wx_get_scan,  /* SIOCGIWSCAN */
-- 
2.5.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 2/4] Staging: rtl8712: Use ether_addr_equal() over memcmp()

2015-10-10 Thread punit vara
On Sat, Oct 10, 2015 at 11:04 PM, Larry Finger
 wrote:
> On 10/10/2015 11:58 AM, Punit Vara wrote:
>>
>> This patch is to the rtl871x_ioctl_linux.c file that fixes up following
>> warning reported by checkpatch.pl :
>>
>> -Prefer ether_addr_equal() or ether_addr_equal_unaligned() over memcmp()
>>
>> bssid has datatype u8 and pnetwork->network.MacAddress has data type
>>   unsigned char.
>>
>> Signed-off-by: Punit Vara 
>> ---
>>   drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
>> b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
>> index 2ba055d..1c9092e 100644
>> --- a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
>> +++ b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
>> @@ -2007,7 +2007,7 @@ static int r871x_get_ap_info(struct net_device *dev,
>> return -EINVAL;
>> }
>> netdev_info(dev, "r8712u: BSSID:%pM\n", bssid);
>> -   if (!memcmp(bssid, pnetwork->network.MacAddress,
>> ETH_ALEN)) {
>> +   if (!ether_addr_equal(bssid, pnetwork->network)) {
>> /* BSSID match, then check if supporting wpa/wpa2
>> */
>> pbuf =
>> r8712_get_wpa_ie(&pnetwork->network.IEs[12],
>>&wpa_ielen, pnetwork->network.IELength-12);
>>
>
> The types of the variables are not what is important - it is the alignment!
>
> I suggest that you read the definition of ether_addr_equal() and consider
> what happens if either of the two addresses is not aligned to u16!
>
> You also have a logic error. Routine memcmp() returns zero when the two
> arguments are equal. Thus !memcmp() will be true when they are equal.
> Routine ether_addr_equal() returns true when the arguments are equal.
> Whenever !memcmp() is correct and the arguments are aligned, then you need
> to replace it with ether_addr_equal().
>
> The checkpatch script is a good tool for locating things to be changed;
> however, if the change is other than cosmetic, you *MUST THINK* about what
> is happening. Yes, rtl8712 is ugly code, but it works. Please do not break
> it.
>
> NACK.
>
> Larry
>

@Larry I am thankful for your high quality feedback.
if both address are aligned to u16 then we should use
ether_addr_equal() if not then ether_addr_equal_unaligned().

Both return true if addr1 and addr2 matches. If I am understand
correctly bssid and MacAdress is not aligned to u16 .So right
correction would be
if(ether_addr_equal_unaligned(bssid, pnetwork->network))

right ?
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 4/4] Staging: rtl8712: fix warning for placing constant on the right side of test

2015-10-10 Thread punit vara
On Sat, Oct 10, 2015 at 10:37 PM, Julia Lawall  wrote:
>
>
> On Sat, 10 Oct 2015, Punit Vara wrote:
>
>> This patch is to the rtl871x_ioctl_linux.c file that fixes up following
>
> The entire above line doesn't give any information (except the file name,
> but that can easily be seen from what comes just below).  A commit message
> that would get to the point (what you did) more quickly could be something
> like: "Put constant on the right side of a test.  Problem found using
> checkpatch."
>
> julia
>
>> warnings reported by checkpatch.pl:
>>
>> -Comparisons should place the constant on the right side of the test
>>
>> Signed-off-by: Punit Vara 
>> ---
>>  drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 16 
>>  1 file changed, 8 insertions(+), 8 deletions(-)
>>
>> diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c 
>> b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
>> index fc1028a..e9852ae 100644
>> --- a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
>> +++ b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
>> @@ -959,7 +959,7 @@ static int r871x_wx_set_priv(struct net_device *dev,
>>   if (IS_ERR(ext))
>>   return PTR_ERR(ext);
>>
>> - if (0 == strcasecmp(ext, "RSSI")) {
>> + if (strcasecmp(ext, "RSSI") == 0) {
>>   /*Return received signal strength indicator in -db for */
>>   /* current AP */
>>   /* Rssi xx */
>> @@ -976,7 +976,7 @@ static int r871x_wx_set_priv(struct net_device *dev,
>>   } else {
>>   sprintf(ext, "OK");
>>   }
>> - } else if (0 == strcasecmp(ext, "LINKSPEED")) {
>> + } else if (strcasecmp(ext, "LINKSPEED") == 0) {
>>   /*Return link speed in MBPS */
>>   /*LinkSpeed xx */
>>   union iwreq_data wrqd;
>> @@ -984,30 +984,30 @@ static int r871x_wx_set_priv(struct net_device *dev,
>>   int mbps;
>>
>>   ret_inner = r8711_wx_get_rate(dev, info, &wrqd, extra);
>> - if (0 != ret_inner)
>> + if (ret_inner != 0)
>>   mbps = 0;
>>   else
>>   mbps = wrqd.bitrate.value / 100;
>>   sprintf(ext, "LINKSPEED %d", mbps);
>> - } else if (0 == strcasecmp(ext, "MACADDR")) {
>> + } else if (strcasecmp(ext, "MACADDR") == 0) {
>>   /*Return mac address of the station */
>>   /* Macaddr = xx:xx:xx:xx:xx:xx */
>>   sprintf(ext, "MACADDR = %pM", dev->dev_addr);
>> - } else if (0 == strcasecmp(ext, "SCAN-ACTIVE")) {
>> + } else if (strcasecmp(ext, "SCAN-ACTIVE") == 0) {
>>   /*Set scan type to active */
>>   /*OK if successful */
>>   struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
>>
>>   pmlmepriv->passive_mode = 1;
>>   sprintf(ext, "OK");
>> - } else if (0 == strcasecmp(ext, "SCAN-PASSIVE")) {
>> + } else if (strcasecmp(ext, "SCAN-PASSIVE") == 0) {
>>   /*Set scan type to passive */
>>   /*OK if successful */
>>   struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
>>
>>   pmlmepriv->passive_mode = 0;
>>   sprintf(ext, "OK");
>> - } else if (0 == strncmp(ext, "DCE-E", 5)) {
>> + } else if (strncmp(ext, "DCE-E", 5) == 0) {
>>   /*Set scan type to passive */
>>   /*OK if successful */
>>   r8712_disconnectCtrlEx_cmd(padapter
>> @@ -1017,7 +1017,7 @@ static int r871x_wx_set_priv(struct net_device *dev,
>>   , 5000 /*u32 firstStageTO */
>>   );
>>   sprintf(ext, "OK");
>> - } else if (0 == strncmp(ext, "DCE-D", 5)) {
>> + } else if (strncmp(ext, "DCE-D", 5) == 0) {
>>   /*Set scan type to passive */
>>   /*OK if successfu */
>>   r8712_disconnectCtrlEx_cmd(padapter
>> --
>> 2.5.3
>>
>>


I thought warning is clearly showing that constant should be on right
side that's why I did not include any extra detail just include one
warning in patch. But surely from next time I will follow your as per
your valuable feedback.

Thanks
Punit Vara
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 2/4] Staging: rtl8712: Use ether_addr_equal() over memcmp()

2015-10-10 Thread punit vara
On Sun, Oct 11, 2015 at 1:20 AM, Julia Lawall  wrote:
>
>
> On Sun, 11 Oct 2015, punit vara wrote:
>
>> On Sat, Oct 10, 2015 at 11:04 PM, Larry Finger
>>  wrote:
>> > On 10/10/2015 11:58 AM, Punit Vara wrote:
>> >>
>> >> This patch is to the rtl871x_ioctl_linux.c file that fixes up following
>> >> warning reported by checkpatch.pl :
>> >>
>> >> -Prefer ether_addr_equal() or ether_addr_equal_unaligned() over memcmp()
>> >>
>> >> bssid has datatype u8 and pnetwork->network.MacAddress has data type
>> >>   unsigned char.
>> >>
>> >> Signed-off-by: Punit Vara 
>> >> ---
>> >>   drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 2 +-
>> >>   1 file changed, 1 insertion(+), 1 deletion(-)
>> >>
>> >> diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
>> >> b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
>> >> index 2ba055d..1c9092e 100644
>> >> --- a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
>> >> +++ b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
>> >> @@ -2007,7 +2007,7 @@ static int r871x_get_ap_info(struct net_device *dev,
>> >> return -EINVAL;
>> >> }
>> >> netdev_info(dev, "r8712u: BSSID:%pM\n", bssid);
>> >> -   if (!memcmp(bssid, pnetwork->network.MacAddress,
>> >> ETH_ALEN)) {
>> >> +   if (!ether_addr_equal(bssid, pnetwork->network)) {
>> >> /* BSSID match, then check if supporting wpa/wpa2
>> >> */
>> >> pbuf =
>> >> r8712_get_wpa_ie(&pnetwork->network.IEs[12],
>> >>&wpa_ielen, pnetwork->network.IELength-12);
>> >>
>> >
>> > The types of the variables are not what is important - it is the alignment!
>> >
>> > I suggest that you read the definition of ether_addr_equal() and consider
>> > what happens if either of the two addresses is not aligned to u16!
>> >
>> > You also have a logic error. Routine memcmp() returns zero when the two
>> > arguments are equal. Thus !memcmp() will be true when they are equal.
>> > Routine ether_addr_equal() returns true when the arguments are equal.
>> > Whenever !memcmp() is correct and the arguments are aligned, then you need
>> > to replace it with ether_addr_equal().
>> >
>> > The checkpatch script is a good tool for locating things to be changed;
>> > however, if the change is other than cosmetic, you *MUST THINK* about what
>> > is happening. Yes, rtl8712 is ugly code, but it works. Please do not break
>> > it.
>> >
>> > NACK.
>> >
>> > Larry
>> >
>>
>> @Larry I am thankful for your high quality feedback.
>> if both address are aligned to u16 then we should use
>> ether_addr_equal() if not then ether_addr_equal_unaligned().
>>
>> Both return true if addr1 and addr2 matches. If I am understand
>> correctly bssid and MacAdress is not aligned to u16 .So right
>> correction would be
>> if(ether_addr_equal_unaligned(bssid, pnetwork->network))
>>
>> right ?
>
> You can use pahole to check the alignment.  Use git log to find other
> patches that mention the use of this tool to see what information to
> provide in the commit message.
>
> julia

Thanks Julia I didn't know about that dwarf utility I will go through
it .sorry I have forgot to write MacAddress.

So here solution could be either

ether_addr_equal(bssid, pnetwork->network.MacAddress) or
ether_addr_equal_unaligned(bssid->network.MacAddress)

I will learn debugging with help of pahole and again send the patch.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 2/4] Staging: rtl8712: Use ether_addr_equal() over memcmp()

2015-10-10 Thread punit vara
On Sun, Oct 11, 2015 at 1:52 AM, punit vara  wrote:
> On Sun, Oct 11, 2015 at 1:20 AM, Julia Lawall  wrote:
>>
>>
>> On Sun, 11 Oct 2015, punit vara wrote:
>>
>>> On Sat, Oct 10, 2015 at 11:04 PM, Larry Finger
>>>  wrote:
>>> > On 10/10/2015 11:58 AM, Punit Vara wrote:
>>> >>
>>> >> This patch is to the rtl871x_ioctl_linux.c file that fixes up following
>>> >> warning reported by checkpatch.pl :
>>> >>
>>> >> -Prefer ether_addr_equal() or ether_addr_equal_unaligned() over memcmp()
>>> >>
>>> >> bssid has datatype u8 and pnetwork->network.MacAddress has data type
>>> >>   unsigned char.
>>> >>
>>> >> Signed-off-by: Punit Vara 
>>> >> ---
>>> >>   drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 2 +-
>>> >>   1 file changed, 1 insertion(+), 1 deletion(-)
>>> >>
>>> >> diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
>>> >> b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
>>> >> index 2ba055d..1c9092e 100644
>>> >> --- a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
>>> >> +++ b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
>>> >> @@ -2007,7 +2007,7 @@ static int r871x_get_ap_info(struct net_device 
>>> >> *dev,
>>> >> return -EINVAL;
>>> >> }
>>> >> netdev_info(dev, "r8712u: BSSID:%pM\n", bssid);
>>> >> -   if (!memcmp(bssid, pnetwork->network.MacAddress,
>>> >> ETH_ALEN)) {
>>> >> +   if (!ether_addr_equal(bssid, pnetwork->network)) {
>>> >> /* BSSID match, then check if supporting wpa/wpa2
>>> >> */
>>> >> pbuf =
>>> >> r8712_get_wpa_ie(&pnetwork->network.IEs[12],
>>> >>&wpa_ielen, 
>>> >> pnetwork->network.IELength-12);
>>> >>
>>> >
>>> > The types of the variables are not what is important - it is the 
>>> > alignment!
>>> >
>>> > I suggest that you read the definition of ether_addr_equal() and consider
>>> > what happens if either of the two addresses is not aligned to u16!
>>> >
>>> > You also have a logic error. Routine memcmp() returns zero when the two
>>> > arguments are equal. Thus !memcmp() will be true when they are equal.
>>> > Routine ether_addr_equal() returns true when the arguments are equal.
>>> > Whenever !memcmp() is correct and the arguments are aligned, then you need
>>> > to replace it with ether_addr_equal().
>>> >
>>> > The checkpatch script is a good tool for locating things to be changed;
>>> > however, if the change is other than cosmetic, you *MUST THINK* about what
>>> > is happening. Yes, rtl8712 is ugly code, but it works. Please do not break
>>> > it.
>>> >
>>> > NACK.
>>> >
>>> > Larry
>>> >
>>>
>>> @Larry I am thankful for your high quality feedback.
>>> if both address are aligned to u16 then we should use
>>> ether_addr_equal() if not then ether_addr_equal_unaligned().
>>>
>>> Both return true if addr1 and addr2 matches. If I am understand
>>> correctly bssid and MacAdress is not aligned to u16 .So right
>>> correction would be
>>> if(ether_addr_equal_unaligned(bssid, pnetwork->network))
>>>
>>> right ?
>>
>> You can use pahole to check the alignment.  Use git log to find other
>> patches that mention the use of this tool to see what information to
>> provide in the commit message.
>>
>> julia
>
> Thanks Julia I didn't know about that dwarf utility I will go through
> it .sorry I have forgot to write MacAddress.
>
> So here solution could be either
>
> ether_addr_equal(bssid, pnetwork->network.MacAddress) or
> ether_addr_equal_unaligned(bssid->network.MacAddress)
>
> I will learn debugging with help of pahole and again send the patch.

Thanks Julia I didn't know about that dwarves utility I will go through
it .sorry I have forgot to write MacAddress.

So here solution could be either

ether_addr_equal(bssid, pnetwork->network.MacAddress) or
ether_addr_equal_unaligned(bssid, pnetwork->network.MacAddress)

I will learn debugging with help of pahole and again send the patch.
Sorry for inconvenience previous mail send before adding because my
laptop was hanged.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 2/4] Staging: rtl8712: Use ether_addr_equal() over memcmp()

2015-10-11 Thread punit vara
On Sun, Oct 11, 2015 at 6:07 AM, kbuild test robot  wrote:
> Hi Punit,
>
> [auto build test WARNING on v4.3-rc4 -- if it's inappropriate base, please 
> ignore]
>
> reproduce:
> # apt-get install sparse
> make ARCH=x86_64 allmodconfig
> make C=1 CF=-D__CHECK_ENDIAN__
>
>
> sparse warnings: (new ones prefixed by >>)
>
>drivers/staging/rtl8712/rtl871x_ioctl_linux.c:227:15: sparse: cast to 
> restricted __le16
>>> drivers/staging/rtl8712/rtl871x_ioctl_linux.c:2010:54: sparse: incorrect 
>>> type in argument 2 (different base types)
>drivers/staging/rtl8712/rtl871x_ioctl_linux.c:2010:54:expected 
> unsigned char const [usertype] *addr2
>drivers/staging/rtl8712/rtl871x_ioctl_linux.c:2010:54:got struct 
> wlan_bssid_ex network
>drivers/staging/rtl8712/rtl871x_ioctl_linux.c: In function 
> 'r871x_get_ap_info':
>drivers/staging/rtl8712/rtl871x_ioctl_linux.c:2010:32: error: incompatible 
> type for argument 2 of 'ether_addr_equal'
>   if (!ether_addr_equal(bssid, pnetwork->network)) {
>^
>In file included from drivers/staging/rtl8712/osdep_service.h:39:0,
> from drivers/staging/rtl8712/rtl871x_ioctl_linux.c:32:
>include/linux/etherdevice.h:310:20: note: expected 'const u8 * {aka const 
> unsigned char *}' but argument is of type 'struct wlan_bssid_ex'
> static inline bool ether_addr_equal(const u8 *addr1, const u8 *addr2)
>^
>
> vim +2010 drivers/staging/rtl8712/rtl871x_ioctl_linux.c
>
>   1994   return -EINVAL;
>   1995  spin_lock_irqsave(&(pmlmepriv->scanned_queue.lock), irqL);
>   1996  phead = &queue->queue;
>   1997  plist = phead->next;
>   1998  while (1) {
>   1999  if (end_of_queue_search(phead, plist) == true)
>   2000  break;
>   2001  pnetwork = LIST_CONTAINOR(plist, struct wlan_network, 
> list);
>   2002  if (hwaddr_aton_i(data, bssid)) {
>   2003  netdev_info(dev, "r8712u: Invalid BSSID 
> '%s'.\n",
>   2004  (u8 *)data);
>   2005  
> spin_unlock_irqrestore(&(pmlmepriv->scanned_queue.lock),
>   2006 irqL);
>   2007  return -EINVAL;
>   2008  }
>   2009  netdev_info(dev, "r8712u: BSSID:%pM\n", bssid);
>> 2010  if (!ether_addr_equal(bssid, pnetwork->network)) {
>   2011  /* BSSID match, then check if supporting 
> wpa/wpa2 */
>   2012  pbuf = 
> r8712_get_wpa_ie(&pnetwork->network.IEs[12],
>   2013 &wpa_ielen, 
> pnetwork->network.IELength-12);
>   2014  if (pbuf && (wpa_ielen > 0)) {
>   2015  pdata->flags = 1;
>   2016  break;
>   2017  }
>   2018  pbuf = 
> r8712_get_wpa2_ie(&pnetwork->network.IEs[12],
>
> ---
> 0-DAY kernel test infrastructureOpen Source Technology Center
> https://lists.01.org/pipermail/kbuild-all   Intel Corporation


That error is because I forgot MacAddress that I have already mention.
Julia I have used pahole as you suggested me
following are the two structure need to be consider for alignment.

struct iw_pmksa {
__u32  cmd; /* 0 4 */
struct sockaddrbssid;/* 416 */
__u8   pmkid[16];  /*2016 */

/* size: 36, cachelines: 1, members: 3 */
/* last cacheline: 36 bytes */
};

struct wlan_bssid_ex {
u32Length;   /* 0 4 */
unsigned char  MacAddress[6];/* 4 6 */
u8 Reserved[2];/*10 2 */
struct ndis_802_11_ssidSsid;  /*1236 */
u32Privacy;  /*48 4 */
s32Rssi;   /*52 4 */
enum NDIS_802_11_NETWORK_TYPE NetworkTypeInUse;  /*56 4 */
struct NDIS_802_11_CONFIGURATION Configuration;   /*6032 */
/* --- cacheline 1 boundary (64 bytes) was 28 bytes ago --- */
enum NDIS_802_11_NETWORK_INFRASTRUCTURE InfrastructureMode; /*92 4 */
u8 rates[16];  /*9616 */
u32IELength; /*   112 4 */
u8 IEs[768];   /*   116   768 */
/* --- cacheline 13 boundary (832 bytes) was 52 bytes ago --- */

/* size: 884, cachelines: 14, members: 12 */
/* last cacheline: 52 bytes */
};


As I understood both are not aligned to u16 so
ether_addr_equal_unaligned() should be used.

[PATCH v2 2/4] Staging: rtl8712: Use ether_addr_equal() over memcmp()

2015-10-12 Thread Punit Vara
This patch is to the rtl871x_ioctl_linux.c file that fixes up following
warning reported by checkpatch.pl :

-Prefer ether_addr_equal() or ether_addr_equal_unaligned() over memcmp()

bssid and pnetwork->network.MacAddress both are 6 byte
array which aligned with u16

Signed-off-by: Punit Vara 
---
 drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c 
b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
index 143be0f..b19556a 100644
--- a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
+++ b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
@@ -2008,7 +2008,7 @@ static int r871x_get_ap_info(struct net_device *dev,
return -EINVAL;
}
netdev_info(dev, "r8712u: BSSID:%pM\n", bssid);
-   if (!memcmp(bssid, pnetwork->network.MacAddress, ETH_ALEN)) {
+   if (ether_addr_equal(bssid, pnetwork->network.MacAddress)) {
/* BSSID match, then check if supporting wpa/wpa2 */
pbuf = r8712_get_wpa_ie(&pnetwork->network.IEs[12],
   &wpa_ielen, pnetwork->network.IELength-12);
-- 
2.5.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v2 2/4] Staging: rtl8712: Use ether_addr_equal() over memcmp()

2015-10-12 Thread punit vara
On Tue, Oct 13, 2015 at 12:16 AM, Punit Vara  wrote:
> This patch is to the rtl871x_ioctl_linux.c file that fixes up following
> warning reported by checkpatch.pl :
>
> -Prefer ether_addr_equal() or ether_addr_equal_unaligned() over memcmp()
>
> bssid and pnetwork->network.MacAddress both are 6 byte
> array which aligned with u16
>
> Signed-off-by: Punit Vara 
> ---
>  drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c 
> b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
> index 143be0f..b19556a 100644
> --- a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
> +++ b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
> @@ -2008,7 +2008,7 @@ static int r871x_get_ap_info(struct net_device *dev,
> return -EINVAL;
> }
> netdev_info(dev, "r8712u: BSSID:%pM\n", bssid);
> -   if (!memcmp(bssid, pnetwork->network.MacAddress, ETH_ALEN)) {
> +   if (ether_addr_equal(bssid, pnetwork->network.MacAddress)) {
> /* BSSID match, then check if supporting wpa/wpa2 */
> pbuf = r8712_get_wpa_ie(&pnetwork->network.IEs[12],
>&wpa_ielen, pnetwork->network.IELength-12);
> --
> 2.5.3
>

I have updated the patch as per feedback from various developers. As I
am sending second time subject should be patch v2 right ?
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH RESEND 0/4] Staging: rtl8712: Fix coding style warnings

2015-10-14 Thread Punit Vara
This set of patch fixes following warnings reported by checkpatch.pl:

-Prefer eth_broadcast_addr() over memset()
-Prefer ether_addr_equal() or ether_addr_equal_unaligned() over memcmp()
-Block comments use * on subsequent lines
-Block comments use a trailing */ on a separate line
-Comparisons should place the constant on the right side of the test

v2: Fixed API suggested by : Larry Finger  larry.fin...@lwfinger.net
Improved patch description suggested by Julia julia.law...@lip6.fr
Punit Vara (4):
  Staging: rtl8712: Fix warning prefer eth_broadcast_addr() over
memset()
  Staging: rtl8712: Use ether_addr_equal() over memcmp()
  Staging: rtl8712: Coding style warnings fix for block comments
  Staging: rtl8712: fix warning for placing constant on the right side
of test

 drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 47 ++-
 1 file changed, 25 insertions(+), 22 deletions(-)

--
2.5.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH RESEND 3/4] Staging: rtl8712: Coding style warnings fix for block comments

2015-10-14 Thread Punit Vara
This patch is to the rtl871x_ioctl_linux.c file that fixes up following
warnings reported by checkpatch.pl :

-Block comments use * on subsequent lines
-Block comments use a trailing */ on a separate line

Signed-off-by: Punit Vara 
---
 drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 26 +++---
 1 file changed, 15 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c 
b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
index 1c9092e..fc1028a 100644
--- a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
+++ b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
@@ -797,13 +797,13 @@ static int r871x_wx_set_pmkid(struct net_device *dev,
int intReturn = false;
 
 /*
-   There are the BSSID information in the bssid.sa_data array.
-   If cmd is IW_PMKSA_FLUSH, it means the wpa_supplicant wants to clear
-   all the PMKID information. If cmd is IW_PMKSA_ADD, it means the
-   wpa_supplicant wants to add a PMKID/BSSID to driver.
-   If cmd is IW_PMKSA_REMOVE, it means the wpa_supplicant wants to
-   remove a PMKID/BSSID from driver.
-*/
+ * There are the BSSID information in the bssid.sa_data array.
+ * If cmd is IW_PMKSA_FLUSH, it means the wpa_supplicant wants to clear
+ * all the PMKID information. If cmd is IW_PMKSA_ADD, it means the
+ * wpa_supplicant wants to add a PMKID/BSSID to driver.
+ * If cmd is IW_PMKSA_REMOVE, it means the wpa_supplicant wants to
+ * remove a PMKID/BSSID from driver.
+ */
if (pPMK == NULL)
return -EINVAL;
memcpy(strIssueBssid, pPMK->bssid.sa_data, ETH_ALEN);
@@ -818,7 +818,8 @@ static int r871x_wx_set_pmkid(struct net_device *dev,
if (!memcmp(psecuritypriv->PMKIDList[j].Bssid,
strIssueBssid, ETH_ALEN)) {
/* BSSID is matched, the same AP => rewrite
-* with new PMKID. */
+* with new PMKID.
+*/
netdev_info(dev, "r8712u: %s: BSSID exists in 
the PMKList.\n",
__func__);
memcpy(psecuritypriv->PMKIDList[j].PMKID,
@@ -850,7 +851,8 @@ static int r871x_wx_set_pmkid(struct net_device *dev,
if (!memcmp(psecuritypriv->PMKIDList[j].Bssid,
strIssueBssid, ETH_ALEN)) {
/* BSSID is matched, the same AP => Remove
-* this PMKID information and reset it. */
+* this PMKID information and reset it.
+*/

eth_zero_addr(psecuritypriv->PMKIDList[j].Bssid);
psecuritypriv->PMKIDList[j].bUsed = false;
break;
@@ -1587,7 +1589,8 @@ static int r8711_wx_set_enc(struct net_device *dev,
} else {
wep.KeyLength = 0;
if (keyindex_provided == 1) { /* set key_id only, no given
-  * KeyMaterial(erq->length==0).*/
+  * KeyMaterial(erq->length==0).
+  */
padapter->securitypriv.PrivacyKeyIndex = key;
switch (padapter->securitypriv.DefKeylen[key]) {
case 5:
@@ -2240,7 +2243,8 @@ static iw_handler r8711_handlers[] = {
r8711_wx_set_wap,   /* SIOCSIWAP */
r8711_wx_get_wap,   /* SIOCGIWAP */
r871x_wx_set_mlme,  /* request MLME operation;
-*  uses struct iw_mlme */
+*  uses struct iw_mlme
+*/
dummy,  /* SIOCGIWAPLIST -- deprecated */
r8711_wx_set_scan,  /* SIOCSIWSCAN */
r8711_wx_get_scan,  /* SIOCGIWSCAN */
-- 
2.5.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH RESEND 1/4] Staging: rtl8712: Fix warning prefer eth_broadcast_addr() over memset()

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

-Prefer eth_broadcast_addr() over memset()

Signed-off-by: Punit Vara 
---
 drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c 
b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
index 143be0f..2ba055d 100644
--- a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
+++ b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
@@ -1811,8 +1811,7 @@ static int r871x_wx_set_enc_ext(struct net_device *dev,
if (param == NULL)
return -ENOMEM;
param->cmd = IEEE_CMD_SET_ENCRYPTION;
-   memset(param->sta_addr, 0xff, ETH_ALEN);
-
+   eth_broadcast_addr(param->sta_addr);
strncpy((char *)param->u.crypt.alg, alg_name, IEEE_CRYPT_ALG_NAME_LEN);
if (pext->ext_flags & IW_ENCODE_EXT_GROUP_KEY)
param->u.crypt.set_tx = 0;
-- 
2.5.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 4/4] Staging: rtl8712: fix warning for placing constant on the right side of test

2015-10-14 Thread Punit Vara
Put constant on the right side of a test.Problem found using checkpatch: 

Warning:Comparisons should place the constant on the right side of the test

Signed-off-by: Punit Vara 
---
 drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c 
b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
index fc1028a..e9852ae 100644
--- a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
+++ b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
@@ -959,7 +959,7 @@ static int r871x_wx_set_priv(struct net_device *dev,
if (IS_ERR(ext))
return PTR_ERR(ext);
 
-   if (0 == strcasecmp(ext, "RSSI")) {
+   if (strcasecmp(ext, "RSSI") == 0) {
/*Return received signal strength indicator in -db for */
/* current AP */
/* Rssi xx */
@@ -976,7 +976,7 @@ static int r871x_wx_set_priv(struct net_device *dev,
} else {
sprintf(ext, "OK");
}
-   } else if (0 == strcasecmp(ext, "LINKSPEED")) {
+   } else if (strcasecmp(ext, "LINKSPEED") == 0) {
/*Return link speed in MBPS */
/*LinkSpeed xx */
union iwreq_data wrqd;
@@ -984,30 +984,30 @@ static int r871x_wx_set_priv(struct net_device *dev,
int mbps;
 
ret_inner = r8711_wx_get_rate(dev, info, &wrqd, extra);
-   if (0 != ret_inner)
+   if (ret_inner != 0)
mbps = 0;
else
mbps = wrqd.bitrate.value / 100;
sprintf(ext, "LINKSPEED %d", mbps);
-   } else if (0 == strcasecmp(ext, "MACADDR")) {
+   } else if (strcasecmp(ext, "MACADDR") == 0) {
/*Return mac address of the station */
/* Macaddr = xx:xx:xx:xx:xx:xx */
sprintf(ext, "MACADDR = %pM", dev->dev_addr);
-   } else if (0 == strcasecmp(ext, "SCAN-ACTIVE")) {
+   } else if (strcasecmp(ext, "SCAN-ACTIVE") == 0) {
/*Set scan type to active */
/*OK if successful */
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
 
pmlmepriv->passive_mode = 1;
sprintf(ext, "OK");
-   } else if (0 == strcasecmp(ext, "SCAN-PASSIVE")) {
+   } else if (strcasecmp(ext, "SCAN-PASSIVE") == 0) {
/*Set scan type to passive */
/*OK if successful */
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
 
pmlmepriv->passive_mode = 0;
sprintf(ext, "OK");
-   } else if (0 == strncmp(ext, "DCE-E", 5)) {
+   } else if (strncmp(ext, "DCE-E", 5) == 0) {
/*Set scan type to passive */
/*OK if successful */
r8712_disconnectCtrlEx_cmd(padapter
@@ -1017,7 +1017,7 @@ static int r871x_wx_set_priv(struct net_device *dev,
, 5000 /*u32 firstStageTO */
);
sprintf(ext, "OK");
-   } else if (0 == strncmp(ext, "DCE-D", 5)) {
+   } else if (strncmp(ext, "DCE-D", 5) == 0) {
/*Set scan type to passive */
/*OK if successfu */
r8712_disconnectCtrlEx_cmd(padapter
-- 
2.5.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 2/4] Staging: rtl8712: Use ether_addr_equal() over memcmp()

2015-10-14 Thread Punit Vara
This patch is to the rtl871x_ioctl_linux.c file that fixes up following
warning reported by checkpatch.pl :

-Prefer ether_addr_equal() or ether_addr_equal_unaligned() over memcmp()

bssid and pnetwork->network.MacAddress both are 6 byte
array which aligned with u16

Signed-off-by: Punit Vara 
---
 drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c 
b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
index 143be0f..b19556a 100644
--- a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
+++ b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
@@ -2008,7 +2008,7 @@ static int r871x_get_ap_info(struct net_device *dev,
return -EINVAL;
}
netdev_info(dev, "r8712u: BSSID:%pM\n", bssid);
-   if (!memcmp(bssid, pnetwork->network.MacAddress, ETH_ALEN)) {
+   if (ether_addr_equal(bssid, pnetwork->network.MacAddress)) {
/* BSSID match, then check if supporting wpa/wpa2 */
pbuf = r8712_get_wpa_ie(&pnetwork->network.IEs[12],
   &wpa_ielen, pnetwork->network.IELength-12);
-- 
2.5.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v2 4/4] Staging: rtl8712: fix warning for placing constant on the right side of test

2015-10-17 Thread punit vara
On Sat, Oct 17, 2015 at 10:46 AM, Greg KH  wrote:
> On Wed, Oct 14, 2015 at 11:55:55PM +0530, Punit Vara wrote:
>> Put constant on the right side of a test.Problem found using checkpatch:
>>
>> Warning:Comparisons should place the constant on the right side of the test
>>
>> Signed-off-by: Punit Vara 
>> ---
>>  drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 16 
>>  1 file changed, 8 insertions(+), 8 deletions(-)
>
> Didn't apply to my tree :(
In this case what should I do ? Should I do git reset , git pull and
then  do changes on latest tree ?

One more thing I would like suggestion how can start switching this
driver to LIB80211 ,MAC80211 ? Which is the first file I should focus
? Simultaneously I am trying to understand the flow of driver . I
would like to know the start point  from where I can start doing small
changes.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v2 4/4] Staging: rtl8712: fix warning for placing constant on the right side of test

2015-10-19 Thread punit vara
On Mon, Oct 19, 2015 at 8:14 AM, Larry Finger  wrote:
> On 10/18/2015 09:00 PM, Greg KH wrote:
>>
>> On Sun, Oct 18, 2015 at 12:02:53PM +0530, punit vara wrote:
>>>
>>> One more thing I would like suggestion how can start switching this
>>> driver to LIB80211 ,MAC80211 ? Which is the first file I should focus
>>> ? Simultaneously I am trying to understand the flow of driver . I
>>> would like to know the start point  from where I can start doing small
>>> changes.
>>
>>
>> If you don't understand the wireless stack, I suggest you do some
>> research on it first, converting a driver to the in-kernel stack is a
>> _very_ difficult thing and not something that someone without any
>> experience in this area is going to be able to do easily.
>
>
> I second this suggestion. Your skill level is not nearly sufficient for this
> sort of task. Note that there is a group working on driver rtl8192su, which
> should be able to replace rtl8712u. The participants are very highly skilled
> wireless developers; however, they are having trouble. The internals of the
> Realtek chips are not revealed to anyone in any form other than the code
> they release.
>
> Larry
>
>


Thank you Larry  ,Tillman , Greg for your valuable suggestions. I am
interested to learn wireless stack .I have already read wireless wiki
documentation , sort of rtl8712 code , cfg80112  APIs . Yeah I agree
with you Greg and Larry that its _very_ difficult to thing to convert
driver in kernel and also rtl8712 has more files compare to others.
Anyway however difficult or tough it may be but I have to go through
it once to become highly skilled or good engineer . I would give it a
try even if I will fail I believe at least 1% of my knowledge will be
improved . More suggestions are welcome.

I have did

git remote add gregkh
http://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git

git pull gregkh

git rebase my_local_branch

I have got some conflicts .I can solve them but they are too many . I
am trying to solve it . After that I will soon resend this patch.

Thanks
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v2 4/4] Staging: rtl8712: fix warning for placing constant on the right side of test

2015-10-22 Thread punit vara
On Mon, Oct 19, 2015 at 8:51 PM, punit vara  wrote:
> On Mon, Oct 19, 2015 at 8:14 AM, Larry Finger  
> wrote:
>> On 10/18/2015 09:00 PM, Greg KH wrote:
>>>
>>> On Sun, Oct 18, 2015 at 12:02:53PM +0530, punit vara wrote:
>>>>
>>>> One more thing I would like suggestion how can start switching this
>>>> driver to LIB80211 ,MAC80211 ? Which is the first file I should focus
>>>> ? Simultaneously I am trying to understand the flow of driver . I
>>>> would like to know the start point  from where I can start doing small
>>>> changes.
>>>
>>>
>>> If you don't understand the wireless stack, I suggest you do some
>>> research on it first, converting a driver to the in-kernel stack is a
>>> _very_ difficult thing and not something that someone without any
>>> experience in this area is going to be able to do easily.
>>
>>
>> I second this suggestion. Your skill level is not nearly sufficient for this
>> sort of task. Note that there is a group working on driver rtl8192su, which
>> should be able to replace rtl8712u. The participants are very highly skilled
>> wireless developers; however, they are having trouble. The internals of the
>> Realtek chips are not revealed to anyone in any form other than the code
>> they release.
>>
>> Larry
>>
>>
>
>
> Thank you Larry  ,Tillman , Greg for your valuable suggestions. I am
> interested to learn wireless stack .I have already read wireless wiki
> documentation , sort of rtl8712 code , cfg80112  APIs . Yeah I agree
> with you Greg and Larry that its _very_ difficult to thing to convert
> driver in kernel and also rtl8712 has more files compare to others.
> Anyway however difficult or tough it may be but I have to go through
> it once to become highly skilled or good engineer . I would give it a
> try even if I will fail I believe at least 1% of my knowledge will be
> improved . More suggestions are welcome.
>
> I have did
>
> git remote add gregkh
> http://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
>
> git pull gregkh
>
> git rebase my_local_branch
>
> I have got some conflicts .I can solve them but they are too many . I
> am trying to solve it . After that I will soon resend this patch.
>
> Thanks

@Greg KH
I am working on linux-next .I have tried to rebase my local branch on
your staging tree but I am getting too many conflict .and I have tried
to clone your staging tree separately but due slow internet I am
unable to clone it fully . Is there any other way I can get your
staging tree by downloading ?
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v2 4/4] Staging: rtl8712: fix warning for placing constant on the right side of test

2015-10-22 Thread punit vara
On Fri, Oct 23, 2015 at 12:52 AM, Dan Carpenter
 wrote:
> On Fri, Oct 23, 2015 at 12:34:36AM +0530, punit vara wrote:
>> I am working on linux-next .I have tried to rebase my local branch on
>> your staging tree but I am getting too many conflict .and I have tried
>> to clone your staging tree separately but due slow internet I am
>> unable to clone it fully . Is there any other way I can get your
>> staging tree by downloading ?
>
> For a while, I had the worst internet of any kernel dev.  I can help. :)
>
> Do you have any complete kernel git repository?  If you download it one
> time then you just do a `git fetch` and `git checkout` after that.
> Never do a `git pull`.
>
> Downloading the linux kernel git repository the first time over bad
> internet is a huge headache because if you lose the connection then you
> have to restart.  See if someone can post a .tar.gz of the kernel .git
> directory on a webpage for you then you can download it bit by bit using
> wget.  Unpack it and do a `git reset --hard`.
>
> regards,
> dan carpenter

>>git branch -a

  master
* my_local_branch
  old-local-1
  remotes/gregkh/master
  remotes/gregkh/staging-linus
  remotes/gregkh/staging-next
  remotes/gregkh/staging-testing
  remotes/gregkh/test
  remotes/linux-next/akpm
  remotes/linux-next/akpm-base
  remotes/linux-next/master
  remotes/linux-next/stable
  remotes/origin/HEAD -> origin/master
  remotes/origin/master

>>git remote -v
gregkhhttp://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
(fetch)
gregkhhttp://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
(push)
linux-next
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
(fetch)
linux-next
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
(push)
originhttps://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
(fetch)
originhttps://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
(push)

Above is my situation I have performed >> commands in terminal.

>>git checkout origin/master

>>git checkout -b experimental origin/master

>>git fetch gregkh

Am I doing the right thing to get staging changes in my experimental branch ?
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v2 4/4] Staging: rtl8712: fix warning for placing constant on the right side of test

2015-10-24 Thread punit vara
On Fri, Oct 23, 2015 at 2:04 AM, Dan Carpenter  wrote:
> First fetch the changes, then check them out.
>
> $ git fetch git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 
> staging-next
> $ git checkout FETCH_HEAD
>
> regards,
> dan carpenter
>
Thank you very much Dan.
Problem is solved :-)

@Greg I haven't found any warnings in your tree .You might applied
this patch before. So I am forward to create other patches
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[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 
---
 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

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[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 
---
 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(&g_linux_wlan->hif_cs);
 #endif
-   if (&g_linux_wlan->txq_event != NULL)
+   if (!(&g_linux_wlan->txq_event))
up(&g_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 (&g_linux_wlan->hif_cs != NULL)
+   if (!(&g_linux_wlan->hif_cs))
mutex_destroy(&g_linux_wlan->hif_cs);
 
-   if (&g_linux_wlan->rxq_cs != NULL)
+   if (!(&g_linux_wlan->rxq_cs))
mutex_destroy(&g_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 (&g_linux_wlan->txq_event != NULL)
+   if (!(&g_linux_wlan->txq_event))
up(&g_linux_wlan->txq_event);
 
if (g_linux_wlan->txq_thread != NULL) {
-- 
2.5.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[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

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[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 
---
 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

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


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  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 
>> ---
>>  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 :-)
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


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  wrote:
> On Mon, Oct 26, 2015 at 12:42 AM, Greg KH  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 
>>> ---
>>>  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
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[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 
---
 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

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[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 
---
 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

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[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 
---
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

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[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 
---
 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

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


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  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 
> ---
>  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(&wilc))
^
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?
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


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:39 AM, punit vara  wrote:
> On Sat, Nov 7, 2015 at 3:29 AM, Punit Vara  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 
>> ---
>>  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(&wilc))
> ^
> 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.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


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  wrote:
> On Sat, Nov 7, 2015 at 3:39 AM, punit vara  wrote:
>> On Sat, Nov 7, 2015 at 3:29 AM, Punit Vara  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 
>>> ---
>>>  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(&wilc))
>> ^
>> 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 :-)
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 2662/2662] Staging: android: Fix 80 character length

2015-09-18 Thread Punit Vara
This patch is to the Kconfig file which fixes up lines which
exceeded the standard  80 character limitation.
This file also fixes up 3 warnings regarding paragraph.

Signed-off-by: Punit Vara 
---
 drivers/staging/android/Kconfig | 28 
 1 file changed, 16 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/android/Kconfig b/drivers/staging/android/Kconfig
index 42b1512..f4a2371 100644
--- a/drivers/staging/android/Kconfig
+++ b/drivers/staging/android/Kconfig
@@ -12,7 +12,8 @@ config ASHMEM
  file-based API.
 
  It is, in theory, a good memory allocator for low-memory devices,
- because it can discard shared memory units when under memory pressure.
+ because it can discard shared memory units when under memory
+ pressure.
 
 config ANDROID_TIMED_OUTPUT
bool "Timed output class driver"
@@ -24,19 +25,20 @@ config ANDROID_TIMED_GPIO
depends on ANDROID_TIMED_OUTPUT
default n
 ---help---
- Unlike generic gpio is to allow programs to access and manipulate gpio
- registers from user space, timed output/gpio is a system to allow 
changing
- a gpio pin and restore it automatically after a specified timeout.
+ Unlike generic gpio is to allow programs to access and manipulate
+ gpio registers from user space, timed output/gpio is a system to
+ allow changing a gpio pin and restore it automatically after a
+ specified timeout.
 
 config ANDROID_LOW_MEMORY_KILLER
bool "Android Low Memory Killer"
---help---
- Registers processes to be killed when low memory conditions, this is 
useful
- as there is no particular swap space on android.
+ Registers processes to be killed when low memory conditions, this
+ is useful as there is no particular swap space on android.
 
- The registered process will kills according to the priorities in 
android init
- scripts (/init.rc), and it defines priority values with minimum free 
memory size
- for each priority.
+ The registered process will kills according to the priorities in
+ android init scripts (/init.rc), and it defines priority values with
+ minimum free memory size for each priority.
 
 config SYNC
bool "Synchronization framework"
@@ -44,8 +46,9 @@ config SYNC
select ANON_INODES
select DMA_SHARED_BUFFER
---help---
- This option enables the framework for synchronization between multiple
- drivers.  Sync implementations can take advantage of hardware
+ This option enables the framework for synchronization between
+ multiple drivers.
+ Sync implementations can take advantage of hardware
  synchronization built into devices like GPUs.
 
 config SW_SYNC
@@ -54,7 +57,8 @@ config SW_SYNC
depends on SYNC
---help---
  A sync object driver that uses a 32bit counter to coordinate
- synchronization.  Useful when there is no hardware primitive backing
+ synchronization.
+ Useful when there is no hardware primitive backing
  the synchronization.
 
 config SW_SYNC_USER
-- 
2.5.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] Staging: android: Fix 80 character length

2015-09-18 Thread Punit Vara
This patch is to the Kconfig file which fixes up lines which
exceeded the standard  80 character limitation.
This file also fixes up 3 warnings regarding paragraph.

Signed-off-by: Punit Vara 
---
 drivers/staging/android/Kconfig | 28 
 1 file changed, 16 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/android/Kconfig b/drivers/staging/android/Kconfig
index 42b1512..f4a2371 100644
--- a/drivers/staging/android/Kconfig
+++ b/drivers/staging/android/Kconfig
@@ -12,7 +12,8 @@ config ASHMEM
  file-based API.
 
  It is, in theory, a good memory allocator for low-memory devices,
- because it can discard shared memory units when under memory pressure.
+ because it can discard shared memory units when under memory
+ pressure.
 
 config ANDROID_TIMED_OUTPUT
bool "Timed output class driver"
@@ -24,19 +25,20 @@ config ANDROID_TIMED_GPIO
depends on ANDROID_TIMED_OUTPUT
default n
 ---help---
- Unlike generic gpio is to allow programs to access and manipulate gpio
- registers from user space, timed output/gpio is a system to allow 
changing
- a gpio pin and restore it automatically after a specified timeout.
+ Unlike generic gpio is to allow programs to access and manipulate
+ gpio registers from user space, timed output/gpio is a system to
+ allow changing a gpio pin and restore it automatically after a
+ specified timeout.
 
 config ANDROID_LOW_MEMORY_KILLER
bool "Android Low Memory Killer"
---help---
- Registers processes to be killed when low memory conditions, this is 
useful
- as there is no particular swap space on android.
+ Registers processes to be killed when low memory conditions, this
+ is useful as there is no particular swap space on android.
 
- The registered process will kills according to the priorities in 
android init
- scripts (/init.rc), and it defines priority values with minimum free 
memory size
- for each priority.
+ The registered process will kills according to the priorities in
+ android init scripts (/init.rc), and it defines priority values with
+ minimum free memory size for each priority.
 
 config SYNC
bool "Synchronization framework"
@@ -44,8 +46,9 @@ config SYNC
select ANON_INODES
select DMA_SHARED_BUFFER
---help---
- This option enables the framework for synchronization between multiple
- drivers.  Sync implementations can take advantage of hardware
+ This option enables the framework for synchronization between
+ multiple drivers.
+ Sync implementations can take advantage of hardware
  synchronization built into devices like GPUs.
 
 config SW_SYNC
@@ -54,7 +57,8 @@ config SW_SYNC
depends on SYNC
---help---
  A sync object driver that uses a 32bit counter to coordinate
- synchronization.  Useful when there is no hardware primitive backing
+ synchronization.
+ Useful when there is no hardware primitive backing
  the synchronization.
 
 config SW_SYNC_USER
-- 
2.5.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 3/3] Staging: comedi: Fixed coding style issues in comedi.h

2015-09-18 Thread Punit Vara
This patch is to the comedi.h file that fixes up following type 
of 42 warning in the file: 

-Blocking comments use a trailing */ on a separate line 
-Block comments use * on subsequent lines 

Signed-off-by: Punit Vara 

---
 drivers/staging/comedi/comedi.h | 183 +++-
 1 file changed, 107 insertions(+), 76 deletions(-)

diff --git a/drivers/staging/comedi/comedi.h b/drivers/staging/comedi/comedi.h
index 66edda1..4bc4b6c 100644
--- a/drivers/staging/comedi/comedi.h
+++ b/drivers/staging/comedi/comedi.h
@@ -1,20 +1,20 @@
-/*
-include/comedi.h (installed as /usr/include/comedi.h)
-header file for comedi
-
-COMEDI - Linux Control and Measurement Device Interface
-Copyright (C) 1998-2001 David A. Schleef 
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU Lesser General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-*/
+/**
+ * include/comedi.h (installed as /usr/include/comedi.h)
+ * header file for comedi
+
+ * COMEDI - Linux Control and Measurement Device Interface
+ * Copyright (C) 1998-2001 David A. Schleef 
+
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
 
 #ifndef _COMEDI_H
 #define _COMEDI_H
@@ -27,17 +27,17 @@
 /* comedi's major device number */
 #define COMEDI_MAJOR 98
 
-/*
-   maximum number of minor devices.  This can be increased, although
-   kernel structures are currently statically allocated, thus you
-   don't want this to be much more than you actually use.
+/**
+ * maximum number of minor devices.  This can be increased, although
+ * kernel structures are currently statically allocated, thus you
+ * don't want this to be much more than you actually use.
  */
 #define COMEDI_NDEVICES 16
 
 /* number of config options in the config structure */
 #define COMEDI_NDEVCONFOPTS 32
 
-/*
+/**
  * NOTE: 'comedi_config --init-data' is deprecated
  *
  * The following indexes in the config options were used by
@@ -298,7 +298,7 @@ enum configuration_ids {
INSN_CONFIG_PWM_GET_H_BRIDGE = 5004
 };
 
-/*
+/**
  * Settings for INSN_CONFIG_DIGITAL_TRIG:
  * data[0] = INSN_CONFIG_DIGITAL_TRIG
  * data[1] = trigger ID
@@ -520,24 +520,24 @@ struct comedi_bufinfo {
 /* everything after this line is ALPHA */
 /**/
 
-/*
-  8254 specific configuration.
+/**
+ * 8254 specific configuration.
 
-  It supports two config commands:
+ * It supports two config commands:
 
-  0 ID: INSN_CONFIG_SET_COUNTER_MODE
-  1 8254 Mode
-I8254_MODE0, I8254_MODE1, ..., I8254_MODE5
-OR'ed with:
-I8254_BCD, I8254_BINARY
+ * 0 ID: INSN_CONFIG_SET_COUNTER_MODE
+ * 1 8254 Mode
+ *   I8254_MODE0, I8254_MODE1, ..., I8254_MODE5
+ *   OR'ed with:
+ *   I8254_BCD, I8254_BINARY
 
-  0 ID: INSN_CONFIG_8254_READ_STATUS
-  1 <-- Status byte returned here.
-B7 = Output
-B6 = NULL Count
-B5 - B0 Current mode.
-
-*/
+ * 0 ID: INSN_CONFIG_8254_READ_STATUS
+ * 1 <-- Status byte returned here.
+ *   B7 = Output
+ *   B6 = NULL Count
+ *   B5 - B0 Current mode.
+ *
+ */
 
 enum i8254_mode {
I8254_MODE0 = (0 << 1), /* Interrupt on terminal count */
@@ -555,8 +555,10 @@ enum i8254_mode {
 #define NI_USUAL_PFI_SELECT(x) (((x) < 10) ? (0x1 + (x)) : (0xb + (x)))
 #define NI_USUAL_RTSI_SELECT(x)(((x) < 7) ? (0xb + (x)) : 0x1b)
 
-/* mode bits for NI general-purpose counters, set with
- * INSN_CONFIG_SET_COUNTER_MODE */
+/**
+ * mode bits for NI general-purpose counters, set with
+ * INSN_CONFIG_SET_COUNTER_MODE
+ */
 #define NI_GPCT_COUNTING_MODE_SHIFT 16
 #define NI_GPCT_INDEX_PHASE_BITSHIFT 20
 #define NI_GPCT_COUNTING_DIRECTION_SHIFT 24
@@ -624,8 +626,10 @@ enum ni_gpct_mode_bits {
NI_GPCT_INVERT_OUTPUT_BIT = 0x2000
 };
 
-/* Bits for setting a clock source with
- * INSN_CONFIG_SET_CLOCK_SRC when using NI general-purpose counters. */
+/**
+ * Bits for setting a clock source with
+ * INSN_CONFIG_SET_CLOCK_SRC when using NI general-purpose counters.
+ */
 enum ni_gpct_clock_source_bits {
NI_GPCT_CLOCK_SRC_SELECT_MASK = 

[PATCH] Staging: comedi: Fixed coding style issues in comedi.h

2015-09-18 Thread Punit Vara
This patch is to the comedi.h file that fixes up following type 
of 42 warning in the file: 

-Blocking comments use a trailing */ on a separate line 
-Block comments use * on subsequent lines 

Signed-off-by: Punit Vara 

---
 drivers/staging/comedi/comedi.h | 183 +++-
 1 file changed, 107 insertions(+), 76 deletions(-)

diff --git a/drivers/staging/comedi/comedi.h b/drivers/staging/comedi/comedi.h
index 66edda1..4bc4b6c 100644
--- a/drivers/staging/comedi/comedi.h
+++ b/drivers/staging/comedi/comedi.h
@@ -1,20 +1,20 @@
-/*
-include/comedi.h (installed as /usr/include/comedi.h)
-header file for comedi
-
-COMEDI - Linux Control and Measurement Device Interface
-Copyright (C) 1998-2001 David A. Schleef 
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU Lesser General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-*/
+/**
+ * include/comedi.h (installed as /usr/include/comedi.h)
+ * header file for comedi
+
+ * COMEDI - Linux Control and Measurement Device Interface
+ * Copyright (C) 1998-2001 David A. Schleef 
+
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
 
 #ifndef _COMEDI_H
 #define _COMEDI_H
@@ -27,17 +27,17 @@
 /* comedi's major device number */
 #define COMEDI_MAJOR 98
 
-/*
-   maximum number of minor devices.  This can be increased, although
-   kernel structures are currently statically allocated, thus you
-   don't want this to be much more than you actually use.
+/**
+ * maximum number of minor devices.  This can be increased, although
+ * kernel structures are currently statically allocated, thus you
+ * don't want this to be much more than you actually use.
  */
 #define COMEDI_NDEVICES 16
 
 /* number of config options in the config structure */
 #define COMEDI_NDEVCONFOPTS 32
 
-/*
+/**
  * NOTE: 'comedi_config --init-data' is deprecated
  *
  * The following indexes in the config options were used by
@@ -298,7 +298,7 @@ enum configuration_ids {
INSN_CONFIG_PWM_GET_H_BRIDGE = 5004
 };
 
-/*
+/**
  * Settings for INSN_CONFIG_DIGITAL_TRIG:
  * data[0] = INSN_CONFIG_DIGITAL_TRIG
  * data[1] = trigger ID
@@ -520,24 +520,24 @@ struct comedi_bufinfo {
 /* everything after this line is ALPHA */
 /**/
 
-/*
-  8254 specific configuration.
+/**
+ * 8254 specific configuration.
 
-  It supports two config commands:
+ * It supports two config commands:
 
-  0 ID: INSN_CONFIG_SET_COUNTER_MODE
-  1 8254 Mode
-I8254_MODE0, I8254_MODE1, ..., I8254_MODE5
-OR'ed with:
-I8254_BCD, I8254_BINARY
+ * 0 ID: INSN_CONFIG_SET_COUNTER_MODE
+ * 1 8254 Mode
+ *   I8254_MODE0, I8254_MODE1, ..., I8254_MODE5
+ *   OR'ed with:
+ *   I8254_BCD, I8254_BINARY
 
-  0 ID: INSN_CONFIG_8254_READ_STATUS
-  1 <-- Status byte returned here.
-B7 = Output
-B6 = NULL Count
-B5 - B0 Current mode.
-
-*/
+ * 0 ID: INSN_CONFIG_8254_READ_STATUS
+ * 1 <-- Status byte returned here.
+ *   B7 = Output
+ *   B6 = NULL Count
+ *   B5 - B0 Current mode.
+ *
+ */
 
 enum i8254_mode {
I8254_MODE0 = (0 << 1), /* Interrupt on terminal count */
@@ -555,8 +555,10 @@ enum i8254_mode {
 #define NI_USUAL_PFI_SELECT(x) (((x) < 10) ? (0x1 + (x)) : (0xb + (x)))
 #define NI_USUAL_RTSI_SELECT(x)(((x) < 7) ? (0xb + (x)) : 0x1b)
 
-/* mode bits for NI general-purpose counters, set with
- * INSN_CONFIG_SET_COUNTER_MODE */
+/**
+ * mode bits for NI general-purpose counters, set with
+ * INSN_CONFIG_SET_COUNTER_MODE
+ */
 #define NI_GPCT_COUNTING_MODE_SHIFT 16
 #define NI_GPCT_INDEX_PHASE_BITSHIFT 20
 #define NI_GPCT_COUNTING_DIRECTION_SHIFT 24
@@ -624,8 +626,10 @@ enum ni_gpct_mode_bits {
NI_GPCT_INVERT_OUTPUT_BIT = 0x2000
 };
 
-/* Bits for setting a clock source with
- * INSN_CONFIG_SET_CLOCK_SRC when using NI general-purpose counters. */
+/**
+ * Bits for setting a clock source with
+ * INSN_CONFIG_SET_CLOCK_SRC when using NI general-purpose counters.
+ */
 enum ni_gpct_clock_source_bits {
NI_GPCT_CLOCK_SRC_SELECT_MASK = 

[PATCH] Staging: comedi: Fixed coding style issue in comedilib.h

2015-09-18 Thread Punit Vara
This patch is to the comedilib.h file that fixes up coding style issues
and following warning:

- Block comments use * on subsequent lines

Signed-off-by: Punit Vara 
---
 drivers/staging/comedi/comedilib.h | 28 ++--
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/comedi/comedilib.h 
b/drivers/staging/comedi/comedilib.h
index 56baf85..45da22b 100644
--- a/drivers/staging/comedi/comedilib.h
+++ b/drivers/staging/comedi/comedilib.h
@@ -1,20 +1,20 @@
-/*
-linux/include/comedilib.h
-header file for kcomedilib
+/**
+ * linux/include/comedilib.h
+ * header file for kcomedilib
 
-COMEDI - Linux Control and Measurement Device Interface
-Copyright (C) 1998-2001 David A. Schleef 
+ * COMEDI - Linux Control and Measurement Device Interface
+ * Copyright (C) 1998-2001 David A. Schleef 
 
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
 
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-*/
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
 
 #ifndef _LINUX_COMEDILIB_H
 #define _LINUX_COMEDILIB_H
-- 
2.5.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] Staging: Comedi: Fix coding style issue in comedi_pcmcia.h

2015-09-18 Thread Punit Vara
This patch is to comedi_pcmcia.h that fixes up warning related
character limitation given by checkpatch.pl.
Warning " line over 80 characters" is removed now.

Signed-off-by: Punit Vara 
---
 drivers/staging/comedi/comedi_pcmcia.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/comedi/comedi_pcmcia.h 
b/drivers/staging/comedi/comedi_pcmcia.h
index 5d3db2b..5a572c2 100644
--- a/drivers/staging/comedi/comedi_pcmcia.h
+++ b/drivers/staging/comedi/comedi_pcmcia.h
@@ -39,7 +39,8 @@ void comedi_pcmcia_driver_unregister(struct comedi_driver *,
 struct pcmcia_driver *);
 
 /**
- * module_comedi_pcmcia_driver() - Helper macro for registering a comedi 
PCMCIA driver
+ * module_comedi_pcmcia_driver() - Helper macro for registering a comedi
+ * PCMCIA driver
  * @__comedi_driver: comedi_driver struct
  * @__pcmcia_driver: pcmcia_driver struct
  *
-- 
2.5.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] Staging: comedi: Fix coding style issues

2015-09-18 Thread Punit Vara
This patch is to comedidev.h file that fixes up following warnings
reported by checkpatch.pl :

-Block comments use a trailing */ on a separate line
-Block comments use * on subsequent lines

Signed-off-by: Punit Vara 
---
 drivers/staging/comedi/comedidev.h | 62 --
 1 file changed, 32 insertions(+), 30 deletions(-)

diff --git a/drivers/staging/comedi/comedidev.h 
b/drivers/staging/comedi/comedidev.h
index 28a5d3a..5b0ab03 100644
--- a/drivers/staging/comedi/comedidev.h
+++ b/drivers/staging/comedi/comedidev.h
@@ -1,20 +1,20 @@
 /*
-include/linux/comedidev.h
-header file for kernel-only structures, variables, and constants
-
-COMEDI - Linux Control and Measurement Device Interface
-Copyright (C) 1997-2000 David A. Schleef 
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-*/
+ * include/linux/comedidev.h
+ * header file for kernel-only structures, variables, and constants
+ *
+ * COMEDI - Linux Control and Measurement Device Interface
+ * Copyright (C) 1997-2000 David A. Schleef 
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
 
 #ifndef _COMEDIDEV_H
 #define _COMEDIDEV_H
@@ -105,7 +105,7 @@ struct comedi_buf_map {
struct kref refcount;
 };
 
-/**
+/*
  * struct comedi_async - control data for asynchronous comedi commands
  * @prealloc_buf:  preallocated buffer
  * @prealloc_bufsz:buffer size (in bytes)
@@ -215,7 +215,7 @@ struct comedi_async {
   unsigned int x);
 };
 
-/**
+/*
  * comedi_async callback "events"
  * @COMEDI_CB_EOS: end-of-scan
  * @COMEDI_CB_EOA: end-of-acquisition/output
@@ -262,9 +262,11 @@ struct comedi_device {
struct device *class_dev;
int minor;
unsigned int detach_count;
-   /* hw_dev is passed to dma_alloc_coherent when allocating async buffers
+   /*
+* hw_dev is passed to dma_alloc_coherent when allocating async buffers
 * for subdevices that have async_dma_dir set to something other than
-* DMA_NONE */
+* DMA_NONE
+*/
struct device *hw_dev;
 
const char *board_name;
@@ -391,7 +393,7 @@ static inline unsigned int comedi_offset_munge(struct 
comedi_subdevice *s,
return val ^ s->maxdata ^ (s->maxdata >> 1);
 }
 
-/**
+/*
  * comedi_bytes_per_sample - determine subdevice sample size
  * @s: comedi_subdevice struct
  *
@@ -405,7 +407,7 @@ static inline unsigned int comedi_bytes_per_sample(struct 
comedi_subdevice *s)
return s->subdev_flags & SDF_LSAMPL ? sizeof(int) : sizeof(short);
 }
 
-/**
+/*
  * comedi_sample_shift - determine log2 of subdevice sample size
  * @s: comedi_subdevice struct
  *
@@ -421,7 +423,7 @@ static inline unsigned int comedi_sample_shift(struct 
comedi_subdevice *s)
return s->subdev_flags & SDF_LSAMPL ? 2 : 1;
 }
 
-/**
+/*
  * comedi_bytes_to_samples - converts a number of bytes to a number of samples
  * @s: comedi_subdevice struct
  * @nbytes:number of bytes
@@ -434,7 +436,7 @@ static inline unsigned int comedi_bytes_to_samples(struct 
comedi_subdevice *s,
return nbytes >> comedi_sample_shift(s);
 }
 
-/**
+/*
  * comedi_samples_to_bytes - converts a number of samples to a number of bytes
  * @s: comedi_subdevice struct
  * @nsamples:  number of samples
@@ -448,7 +450,7 @@ static inline unsigned int comedi_samples_to_bytes(struct 
comedi_subdevice *s,
return nsamples << comedi_sample_shift(s);
 }
 
-/**
+/*
  * comedi_check_trigger_src() - trivially validate a comedi_cmd trigger source
  * @src: pointer to the trigger source to validate
  * @flags: bitmask of valid TRIG_* for the trigger
@@ -469,7 +471,7 @@ static inline int comedi_check_trigger_src(unsigned int 
*src,
return 0;
 }
 
-/**
+/*
  * comedi_check_trigger_is_unique() - make sure a trigger source is unique
  * @src: the trigger source to check
  */
@@ -481,7 +483,7 @@ static inline int comedi_check_trigg

[PATCH] Staging: comedi: Fix trailing */ and * comment warning

2015-09-19 Thread Punit Vara
This patch is to comedidev.h file that fixes up following warnings
reported by checkpatch.pl :

-Block comments use a trailing */ on a separate line
-Block comments use * on subsequent lines

Signed-off-by: Punit Vara 
---
 drivers/staging/comedi/comedidev.h | 62 --
 1 file changed, 32 insertions(+), 30 deletions(-)

diff --git a/drivers/staging/comedi/comedidev.h 
b/drivers/staging/comedi/comedidev.h
index 28a5d3a..5b0ab03 100644
--- a/drivers/staging/comedi/comedidev.h
+++ b/drivers/staging/comedi/comedidev.h
@@ -1,20 +1,20 @@
 /*
-include/linux/comedidev.h
-header file for kernel-only structures, variables, and constants
-
-COMEDI - Linux Control and Measurement Device Interface
-Copyright (C) 1997-2000 David A. Schleef 
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-*/
+ * include/linux/comedidev.h
+ * header file for kernel-only structures, variables, and constants
+ *
+ * COMEDI - Linux Control and Measurement Device Interface
+ * Copyright (C) 1997-2000 David A. Schleef 
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
 
 #ifndef _COMEDIDEV_H
 #define _COMEDIDEV_H
@@ -105,7 +105,7 @@ struct comedi_buf_map {
struct kref refcount;
 };
 
-/**
+/*
  * struct comedi_async - control data for asynchronous comedi commands
  * @prealloc_buf:  preallocated buffer
  * @prealloc_bufsz:buffer size (in bytes)
@@ -215,7 +215,7 @@ struct comedi_async {
   unsigned int x);
 };
 
-/**
+/*
  * comedi_async callback "events"
  * @COMEDI_CB_EOS: end-of-scan
  * @COMEDI_CB_EOA: end-of-acquisition/output
@@ -262,9 +262,11 @@ struct comedi_device {
struct device *class_dev;
int minor;
unsigned int detach_count;
-   /* hw_dev is passed to dma_alloc_coherent when allocating async buffers
+   /*
+* hw_dev is passed to dma_alloc_coherent when allocating async buffers
 * for subdevices that have async_dma_dir set to something other than
-* DMA_NONE */
+* DMA_NONE
+*/
struct device *hw_dev;
 
const char *board_name;
@@ -391,7 +393,7 @@ static inline unsigned int comedi_offset_munge(struct 
comedi_subdevice *s,
return val ^ s->maxdata ^ (s->maxdata >> 1);
 }
 
-/**
+/*
  * comedi_bytes_per_sample - determine subdevice sample size
  * @s: comedi_subdevice struct
  *
@@ -405,7 +407,7 @@ static inline unsigned int comedi_bytes_per_sample(struct 
comedi_subdevice *s)
return s->subdev_flags & SDF_LSAMPL ? sizeof(int) : sizeof(short);
 }
 
-/**
+/*
  * comedi_sample_shift - determine log2 of subdevice sample size
  * @s: comedi_subdevice struct
  *
@@ -421,7 +423,7 @@ static inline unsigned int comedi_sample_shift(struct 
comedi_subdevice *s)
return s->subdev_flags & SDF_LSAMPL ? 2 : 1;
 }
 
-/**
+/*
  * comedi_bytes_to_samples - converts a number of bytes to a number of samples
  * @s: comedi_subdevice struct
  * @nbytes:number of bytes
@@ -434,7 +436,7 @@ static inline unsigned int comedi_bytes_to_samples(struct 
comedi_subdevice *s,
return nbytes >> comedi_sample_shift(s);
 }
 
-/**
+/*
  * comedi_samples_to_bytes - converts a number of samples to a number of bytes
  * @s: comedi_subdevice struct
  * @nsamples:  number of samples
@@ -448,7 +450,7 @@ static inline unsigned int comedi_samples_to_bytes(struct 
comedi_subdevice *s,
return nsamples << comedi_sample_shift(s);
 }
 
-/**
+/*
  * comedi_check_trigger_src() - trivially validate a comedi_cmd trigger source
  * @src: pointer to the trigger source to validate
  * @flags: bitmask of valid TRIG_* for the trigger
@@ -469,7 +471,7 @@ static inline int comedi_check_trigger_src(unsigned int 
*src,
return 0;
 }
 
-/**
+/*
  * comedi_check_trigger_is_unique() - make sure a trigger source is unique
  * @src: the trigger source to check
  */
@@ -481,7 +483,7 @@ static inline int comedi_check_trigg

Re: [PATCH] Staging: comedi: Fix coding style issues

2015-09-19 Thread punit vara
For this patch can I put subject like

[PATCH] Staging: comedi: Fix trailing */ and * comment warning

??
Kindly suggest me as this is my first patch and i am trying to
contribute to linux kernel .

On Fri, Sep 18, 2015 at 10:22 PM, Punit Vara  wrote:
> This patch is to comedidev.h file that fixes up following warnings
> reported by checkpatch.pl :
>
> -Block comments use a trailing */ on a separate line
> -Block comments use * on subsequent lines
>
> Signed-off-by: Punit Vara 
> ---
>  drivers/staging/comedi/comedidev.h | 62 
> --
>  1 file changed, 32 insertions(+), 30 deletions(-)
>
> diff --git a/drivers/staging/comedi/comedidev.h 
> b/drivers/staging/comedi/comedidev.h
> index 28a5d3a..5b0ab03 100644
> --- a/drivers/staging/comedi/comedidev.h
> +++ b/drivers/staging/comedi/comedidev.h
> @@ -1,20 +1,20 @@
>  /*
> -include/linux/comedidev.h
> -header file for kernel-only structures, variables, and constants
> -
> -COMEDI - Linux Control and Measurement Device Interface
> -Copyright (C) 1997-2000 David A. Schleef 
> -
> -This program is free software; you can redistribute it and/or modify
> -it under the terms of the GNU General Public License as published by
> -the Free Software Foundation; either version 2 of the License, or
> -(at your option) any later version.
> -
> -This program is distributed in the hope that it will be useful,
> -but WITHOUT ANY WARRANTY; without even the implied warranty of
> -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> -GNU General Public License for more details.
> -*/
> + * include/linux/comedidev.h
> + * header file for kernel-only structures, variables, and constants
> + *
> + * COMEDI - Linux Control and Measurement Device Interface
> + * Copyright (C) 1997-2000 David A. Schleef 
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation; either version 2 of the License, or
> + * (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + */
>
>  #ifndef _COMEDIDEV_H
>  #define _COMEDIDEV_H
> @@ -105,7 +105,7 @@ struct comedi_buf_map {
> struct kref refcount;
>  };
>
> -/**
> +/*
>   * struct comedi_async - control data for asynchronous comedi commands
>   * @prealloc_buf:  preallocated buffer
>   * @prealloc_bufsz:buffer size (in bytes)
> @@ -215,7 +215,7 @@ struct comedi_async {
>unsigned int x);
>  };
>
> -/**
> +/*
>   * comedi_async callback "events"
>   * @COMEDI_CB_EOS: end-of-scan
>   * @COMEDI_CB_EOA: end-of-acquisition/output
> @@ -262,9 +262,11 @@ struct comedi_device {
> struct device *class_dev;
> int minor;
> unsigned int detach_count;
> -   /* hw_dev is passed to dma_alloc_coherent when allocating async 
> buffers
> +   /*
> +* hw_dev is passed to dma_alloc_coherent when allocating async 
> buffers
>  * for subdevices that have async_dma_dir set to something other than
> -* DMA_NONE */
> +* DMA_NONE
> +*/
> struct device *hw_dev;
>
> const char *board_name;
> @@ -391,7 +393,7 @@ static inline unsigned int comedi_offset_munge(struct 
> comedi_subdevice *s,
> return val ^ s->maxdata ^ (s->maxdata >> 1);
>  }
>
> -/**
> +/*
>   * comedi_bytes_per_sample - determine subdevice sample size
>   * @s: comedi_subdevice struct
>   *
> @@ -405,7 +407,7 @@ static inline unsigned int comedi_bytes_per_sample(struct 
> comedi_subdevice *s)
> return s->subdev_flags & SDF_LSAMPL ? sizeof(int) : sizeof(short);
>  }
>
> -/**
> +/*
>   * comedi_sample_shift - determine log2 of subdevice sample size
>   * @s: comedi_subdevice struct
>   *
> @@ -421,7 +423,7 @@ static inline unsigned int comedi_sample_shift(struct 
> comedi_subdevice *s)
> return s->subdev_flags & SDF_LSAMPL ? 2 : 1;
>  }
>
> -/**
> +/*
>   * comedi_bytes_to_samples - converts a number of bytes to a number of 
> samples
>   * @s: comedi_subdevice struct
>   * @nbytes:number of bytes
> @@ -434,7 +436,7 @@ static inline unsigned int comedi_bytes_to_samples(struct 
> comedi_subdevice *s,
> return nbytes >> comedi_sample_shift(s);
> 

Re: [PATCH] Staging: comedi: Fix coding style issues

2015-09-19 Thread punit vara
[PATCH] Staging: comedi: Fix block comment according to preferred style

[PATCH] Staging: comedi: Fix block comment warning

which would be the better subject for my patch ? anybody can suggest please ?

regards,
punitvara
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] Staging: comedi: Fix coding style issues

2015-09-19 Thread punit vara
On Fri, Sep 18, 2015 at 10:22 PM, Punit Vara  wrote:
> This patch is to comedidev.h file that fixes up following warnings
> reported by checkpatch.pl :
>
> -Block comments use a trailing */ on a separate line
> -Block comments use * on subsequent lines
>
> Signed-off-by: Punit Vara 
> ---
>  drivers/staging/comedi/comedidev.h | 62 
> --
>  1 file changed, 32 insertions(+), 30 deletions(-)
>
> diff --git a/drivers/staging/comedi/comedidev.h 
> b/drivers/staging/comedi/comedidev.h
> index 28a5d3a..5b0ab03 100644
> --- a/drivers/staging/comedi/comedidev.h
> +++ b/drivers/staging/comedi/comedidev.h
> @@ -1,20 +1,20 @@
>  /*
> -include/linux/comedidev.h
> -header file for kernel-only structures, variables, and constants
> -
> -COMEDI - Linux Control and Measurement Device Interface
> -Copyright (C) 1997-2000 David A. Schleef 
> -
> -This program is free software; you can redistribute it and/or modify
> -it under the terms of the GNU General Public License as published by
> -the Free Software Foundation; either version 2 of the License, or
> -(at your option) any later version.
> -
> -This program is distributed in the hope that it will be useful,
> -but WITHOUT ANY WARRANTY; without even the implied warranty of
> -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> -GNU General Public License for more details.
> -*/
> + * include/linux/comedidev.h
> + * header file for kernel-only structures, variables, and constants
> + *
> + * COMEDI - Linux Control and Measurement Device Interface
> + * Copyright (C) 1997-2000 David A. Schleef 
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation; either version 2 of the License, or
> + * (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + */
>
>  #ifndef _COMEDIDEV_H
>  #define _COMEDIDEV_H
> @@ -105,7 +105,7 @@ struct comedi_buf_map {
> struct kref refcount;
>  };
>
> -/**
> +/*
>   * struct comedi_async - control data for asynchronous comedi commands
>   * @prealloc_buf:  preallocated buffer
>   * @prealloc_bufsz:buffer size (in bytes)
> @@ -215,7 +215,7 @@ struct comedi_async {
>unsigned int x);
>  };
>
> -/**
> +/*
>   * comedi_async callback "events"
>   * @COMEDI_CB_EOS: end-of-scan
>   * @COMEDI_CB_EOA: end-of-acquisition/output
> @@ -262,9 +262,11 @@ struct comedi_device {
> struct device *class_dev;
> int minor;
> unsigned int detach_count;
> -   /* hw_dev is passed to dma_alloc_coherent when allocating async 
> buffers
> +   /*
> +* hw_dev is passed to dma_alloc_coherent when allocating async 
> buffers
>  * for subdevices that have async_dma_dir set to something other than
> -* DMA_NONE */
> +* DMA_NONE
> +*/
> struct device *hw_dev;
>
> const char *board_name;
> @@ -391,7 +393,7 @@ static inline unsigned int comedi_offset_munge(struct 
> comedi_subdevice *s,
> return val ^ s->maxdata ^ (s->maxdata >> 1);
>  }
>
> -/**
> +/*
>   * comedi_bytes_per_sample - determine subdevice sample size
>   * @s: comedi_subdevice struct
>   *
> @@ -405,7 +407,7 @@ static inline unsigned int comedi_bytes_per_sample(struct 
> comedi_subdevice *s)
> return s->subdev_flags & SDF_LSAMPL ? sizeof(int) : sizeof(short);
>  }
>
> -/**
> +/*
>   * comedi_sample_shift - determine log2 of subdevice sample size
>   * @s: comedi_subdevice struct
>   *
> @@ -421,7 +423,7 @@ static inline unsigned int comedi_sample_shift(struct 
> comedi_subdevice *s)
> return s->subdev_flags & SDF_LSAMPL ? 2 : 1;
>  }
>
> -/**
> +/*
>   * comedi_bytes_to_samples - converts a number of bytes to a number of 
> samples
>   * @s: comedi_subdevice struct
>   * @nbytes:number of bytes
> @@ -434,7 +436,7 @@ static inline unsigned int comedi_bytes_to_samples(struct 
> comedi_subdevice *s,
> return nbytes >> comedi_sample_shift(s);
>  }
>
> -/**
> +/*
>   * comedi_samples_to_bytes - converts a number of samples to a number of 
> bytes
>   * @s: comedi_subdevice struct
>   * @nsampl

Re: [PATCH] Staging: comedi: Fix coding style issues

2015-09-20 Thread punit vara
On Sun, Sep 20, 2015 at 6:50 AM, Jaime Arrocha  wrote:
>
> On 09/19/2015 01:13 PM, punit vara wrote:
>>
>> [PATCH] Staging: comedi: Fix block comment warning
>
>
> [PATCH] Staging: comedi: Coding style warnings fix for block comments
>


Thank you for suggestion sir .I would appreciate your help.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] Staging: rtl8712: Coding style warning fix for block comment

2015-09-20 Thread Punit Vara
This is a patch to mlme_linux.c that fixes up following warning
reported by checkpatch.pl :

-Block comments use a trailing */ on a separate line

Signed-off-by: Punit Vara 
---
 drivers/staging/rtl8712/mlme_linux.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8712/mlme_linux.c 
b/drivers/staging/rtl8712/mlme_linux.c
index 8c5a475..6d253bf 100644
--- a/drivers/staging/rtl8712/mlme_linux.c
+++ b/drivers/staging/rtl8712/mlme_linux.c
@@ -122,7 +122,8 @@ void r8712_os_indicate_disconnect(struct _adapter *adapter)
r8712_use_tkipkey_handler,
(unsigned long)adapter);
/* Restore the PMK information to securitypriv structure
-* for the following connection. */
+* for the following connection.
+*/
memcpy(&adapter->securitypriv.PMKIDList[0],
&backupPMKIDList[0],
sizeof(struct RT_PMKID_LIST) * NUM_PMKID_CACHE);
-- 
2.5.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] Staging: rts5208: Coding style warnings fix for block comments

2015-09-21 Thread Punit Vara
This is patch to rtsx_chip.c that fixes up following warning
reported by checkpatch.pl :

-Block comments use * on subsequent lines

Signed-off-by: Punit Vara 
---
 drivers/staging/rts5208/rtsx_chip.c | 28 +++-
 1 file changed, 15 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/rts5208/rtsx_chip.c 
b/drivers/staging/rts5208/rtsx_chip.c
index 0df3b9d..c0ce659 100644
--- a/drivers/staging/rts5208/rtsx_chip.c
+++ b/drivers/staging/rts5208/rtsx_chip.c
@@ -521,13 +521,14 @@ int rtsx_reset_chip(struct rtsx_chip *chip)
}
}
 
-   /* Disable cd_pwr_save (u_force_rst_core_en=0, u_cd_rst_core_en=0)
- 0xFE5B
- bit[1]u_cd_rst_core_enrst_value = 0
- bit[2]u_force_rst_core_en rst_value = 0
- bit[5]u_mac_phy_rst_n_dbg rst_value = 1
- bit[4]u_non_sticky_rst_n_dbg  rst_value = 0
-   */
+   /*
+* Disable cd_pwr_save (u_force_rst_core_en=0, u_cd_rst_core_en=0)
+*0xFE5B
+*bit[1]u_cd_rst_core_enrst_value = 0
+*bit[2]u_force_rst_core_en rst_value = 0
+*bit[5]u_mac_phy_rst_n_dbg rst_value = 1
+*bit[4]u_non_sticky_rst_n_dbg  rst_value = 0
+*/
retval = rtsx_write_register(chip, CHANGE_LINK_STATE, 0x16, 0x10);
if (retval) {
rtsx_trace(chip);
@@ -2153,12 +2154,13 @@ int rtsx_pre_handle_interrupt(struct rtsx_chip *chip)
clear_bit(SD_NR, &chip->need_reset);
}
} else {
-   /* If multi-luns, it's possible that
-  when plugging/unplugging one card
-  there is another card which still
-  exists in the slot. In this case,
-  all existed cards should be reset.
-   */
+   /*
+* If multi-luns, it's possible that
+* when plugging/unplugging one card
+* there is another card which still
+* exists in the slot. In this case,
+* all existed cards should be reset.
+*/
if (exit_ss && (status & SD_EXIST))
set_bit(SD_NR, &chip->need_reinit);
}
-- 
2.5.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 3/3] Staging: rts5208: Coding style warnings fix for block comments

2015-09-21 Thread Punit Vara
This patch is to rtsx_chip.h that fixes up following warning reported
by checkpatch.pl :

-Block comments use * on subsequent lines
-Block comments use a trailing */ on a separate line

Signed-off-by: Punit Vara 
---
 drivers/staging/rts5208/rtsx_chip.h | 66 +++--
 1 file changed, 42 insertions(+), 24 deletions(-)

diff --git a/drivers/staging/rts5208/rtsx_chip.h 
b/drivers/staging/rts5208/rtsx_chip.h
index c295b1e..2a6424d 100644
--- a/drivers/staging/rts5208/rtsx_chip.h
+++ b/drivers/staging/rts5208/rtsx_chip.h
@@ -44,8 +44,10 @@
#define MG_SET_ICV_SLOW
/* HW may miss ERR/CMDNK signal when sampling INT status. */
#define MS_SAMPLE_INT_ERR
-   /* HW DO NOT support Wait_INT function during READ_BYTES
-* transfer mode */
+   /*
+* HW DO NOT support Wait_INT function during READ_BYTES
+* transfer mode
+*/
#define READ_BYTES_WAIT_INT
 #endif
 
@@ -102,17 +104,19 @@
 #define TRANSPORT_ERROR3   /* Transport bad (i.e. device dead) 
*/
 
 
-/*---
-Start-Stop-Unit
*/
+/* ---
+ *   Start-Stop-Unit
+ * ---
+ */
 #define STOP_MEDIUM0x00/* access disable */
 #define MAKE_MEDIUM_READY  0x01/* access enable  */
 #define UNLOAD_MEDIUM  0x02/* unload */
 #define LOAD_MEDIUM0x03/* load   */
 
-/*---
-STANDARD_INQUIRY
*/
+/* ---
+ *   STANDARD_INQUIRY
+ * ---
+ */
 #define QULIFIRE0x00
 #define AENC_FNC0x00
 #define TRML_IOP0x00
@@ -130,16 +134,24 @@
 
 /* Dynamic flag definitions: used in set_bit() etc. */
 #define RTSX_FLIDX_TRANS_ACTIVE18  /* 0x0004  transfer is 
active */
-#define RTSX_FLIDX_ABORTING20  /* 0x0010 abort is in
-* progress */
-#define RTSX_FLIDX_DISCONNECTING   21  /* 0x0020 disconnect
-* in progress */
+#define RTSX_FLIDX_ABORTING20  /*
+* 0x0010 abort is in
+* progress
+*/
+#define RTSX_FLIDX_DISCONNECTING   21  /*
+* 0x0020 disconnect
+* in progress
+*/
 #define ABORTING_OR_DISCONNECTING  ((1UL << US_FLIDX_ABORTING) | \
 (1UL << US_FLIDX_DISCONNECTING))
-#define RTSX_FLIDX_RESETTING   22  /* 0x0040 device reset
-* in progress */
-#define RTSX_FLIDX_TIMED_OUT   23  /* 0x0080 SCSI
-* midlayer timed out */
+#define RTSX_FLIDX_RESETTING   22  /*
+* 0x0040 device reset
+* in progress
+*/
+#define RTSX_FLIDX_TIMED_OUT   23  /*
+* 0x0080 SCSI
+* midlayer timed out
+*/
 
 #define DRCT_ACCESS_DEV 0x00/* Direct Access Device  */
 #define RMB_DISC0x80/* The Device is Removable   */
@@ -174,9 +186,10 @@
 #defineFIRST_RESET 0x01
 #defineUSED_EXIST  0x02
 
-/*---
-SENSE_DATA
*/
+/* ---
+ *   SENSE_DATA
+ * ---
+ */
 /* valid */
 #define SENSE_VALID 0x80/* Sense data is valid as SCSI2 */
 #define SENSE_INVALID   0x00/* Sense data is invalid as SCSI2   */
@@ -712,9 +725,12 @@ struct rtsx_chip {
int cur_card;
 
unsigned long   need_release;   /* need release bit map */
-   unsigned long   need_reset; /* need reset
-* bit map */
-   /* Flag to indicate that this card is just resumed from SS state,
+   unsigned long   need_reset; /*
+* need reset
+* bit map
+*/
+   /*
+* Flag to indicate that this card is just resumed from SS state,
 * and need released before be

[PATCH] Staging: rts5208: Coding style warnings fix for block comments

2015-09-21 Thread Punit Vara
This patch is to rtsx_chip.h that fixes up following warning reported
by checkpatch.pl :

-Block comments use * on subsequent lines
-Block comments use a trailing */ on a separate line

Signed-off-by: Punit Vara 
---
 drivers/staging/rts5208/rtsx_chip.h | 66 +++--
 1 file changed, 42 insertions(+), 24 deletions(-)

diff --git a/drivers/staging/rts5208/rtsx_chip.h 
b/drivers/staging/rts5208/rtsx_chip.h
index c295b1e..2a6424d 100644
--- a/drivers/staging/rts5208/rtsx_chip.h
+++ b/drivers/staging/rts5208/rtsx_chip.h
@@ -44,8 +44,10 @@
#define MG_SET_ICV_SLOW
/* HW may miss ERR/CMDNK signal when sampling INT status. */
#define MS_SAMPLE_INT_ERR
-   /* HW DO NOT support Wait_INT function during READ_BYTES
-* transfer mode */
+   /*
+* HW DO NOT support Wait_INT function during READ_BYTES
+* transfer mode
+*/
#define READ_BYTES_WAIT_INT
 #endif
 
@@ -102,17 +104,19 @@
 #define TRANSPORT_ERROR3   /* Transport bad (i.e. device dead) 
*/
 
 
-/*---
-Start-Stop-Unit
*/
+/* ---
+ *   Start-Stop-Unit
+ * ---
+ */
 #define STOP_MEDIUM0x00/* access disable */
 #define MAKE_MEDIUM_READY  0x01/* access enable  */
 #define UNLOAD_MEDIUM  0x02/* unload */
 #define LOAD_MEDIUM0x03/* load   */
 
-/*---
-STANDARD_INQUIRY
*/
+/* ---
+ *   STANDARD_INQUIRY
+ * ---
+ */
 #define QULIFIRE0x00
 #define AENC_FNC0x00
 #define TRML_IOP0x00
@@ -130,16 +134,24 @@
 
 /* Dynamic flag definitions: used in set_bit() etc. */
 #define RTSX_FLIDX_TRANS_ACTIVE18  /* 0x0004  transfer is 
active */
-#define RTSX_FLIDX_ABORTING20  /* 0x0010 abort is in
-* progress */
-#define RTSX_FLIDX_DISCONNECTING   21  /* 0x0020 disconnect
-* in progress */
+#define RTSX_FLIDX_ABORTING20  /*
+* 0x0010 abort is in
+* progress
+*/
+#define RTSX_FLIDX_DISCONNECTING   21  /*
+* 0x0020 disconnect
+* in progress
+*/
 #define ABORTING_OR_DISCONNECTING  ((1UL << US_FLIDX_ABORTING) | \
 (1UL << US_FLIDX_DISCONNECTING))
-#define RTSX_FLIDX_RESETTING   22  /* 0x0040 device reset
-* in progress */
-#define RTSX_FLIDX_TIMED_OUT   23  /* 0x0080 SCSI
-* midlayer timed out */
+#define RTSX_FLIDX_RESETTING   22  /*
+* 0x0040 device reset
+* in progress
+*/
+#define RTSX_FLIDX_TIMED_OUT   23  /*
+* 0x0080 SCSI
+* midlayer timed out
+*/
 
 #define DRCT_ACCESS_DEV 0x00/* Direct Access Device  */
 #define RMB_DISC0x80/* The Device is Removable   */
@@ -174,9 +186,10 @@
 #defineFIRST_RESET 0x01
 #defineUSED_EXIST  0x02
 
-/*---
-SENSE_DATA
*/
+/* ---
+ *   SENSE_DATA
+ * ---
+ */
 /* valid */
 #define SENSE_VALID 0x80/* Sense data is valid as SCSI2 */
 #define SENSE_INVALID   0x00/* Sense data is invalid as SCSI2   */
@@ -712,9 +725,12 @@ struct rtsx_chip {
int cur_card;
 
unsigned long   need_release;   /* need release bit map */
-   unsigned long   need_reset; /* need reset
-* bit map */
-   /* Flag to indicate that this card is just resumed from SS state,
+   unsigned long   need_reset; /*
+* need reset
+* bit map
+*/
+   /*
+* Flag to indicate that this card is just resumed from SS state,
 * and need released before be

[PATCH] Staging: rts5208: Coding style warnings fix for block comments

2015-09-21 Thread Punit Vara
This patch is to the rtsx_transport.c that fixes up following warning
reported by checkpatch.pl :

-Block comments use * subsequent lines
-Block comments use a trailing */ on a separate line

Signed-off-by: Punit Vara 
---
 drivers/staging/rts5208/rtsx_transport.c | 27 ++-
 1 file changed, 18 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/rts5208/rtsx_transport.c 
b/drivers/staging/rts5208/rtsx_transport.c
index f27491e..118fe0e 100644
--- a/drivers/staging/rts5208/rtsx_transport.c
+++ b/drivers/staging/rts5208/rtsx_transport.c
@@ -36,7 +36,8 @@
  * For non-scatter-gather transfers, srb->request_buffer points to the
  * transfer buffer itself and srb->request_bufflen is the buffer's length.)
  * Update the *index and *offset variables so that the next copy will
- * pick up from where this one left off. */
+ * pick up from where this one left off.
+ */
 
 unsigned int rtsx_stor_access_xfer_buf(unsigned char *buffer,
unsigned int buflen, struct scsi_cmnd *srb, unsigned int *index,
@@ -44,8 +45,10 @@ unsigned int rtsx_stor_access_xfer_buf(unsigned char *buffer,
 {
unsigned int cnt;
 
-   /* If not using scatter-gather, just transfer the data directly.
-* Make certain it will fit in the available buffer space. */
+   /*
+* If not using scatter-gather, just transfer the data directly.
+* Make certain it will fit in the available buffer space.
+*/
if (scsi_sg_count(srb) == 0) {
if (*offset >= scsi_bufflen(srb))
return 0;
@@ -58,22 +61,26 @@ unsigned int rtsx_stor_access_xfer_buf(unsigned char 
*buffer,
*offset, cnt);
*offset += cnt;
 
-   /* Using scatter-gather.  We have to go through the list one entry
+   /*
+* Using scatter-gather.  We have to go through the list one entry
 * at a time.  Each s-g entry contains some number of pages, and
 * each page has to be kmap()'ed separately.  If the page is already
 * in kernel-addressable memory then kmap() will return its address.
 * If the page is not directly accessible -- such as a user buffer
 * located in high memory -- then kmap() will map it to a temporary
-* position in the kernel's virtual address space. */
+* position in the kernel's virtual address space.
+*/
} else {
struct scatterlist *sg =
(struct scatterlist *) scsi_sglist(srb)
+ *index;
 
-   /* This loop handles a single s-g list entry, which may
+   /*
+* This loop handles a single s-g list entry, which may
 * include multiple pages.  Find the initial page structure
 * and the starting offset within the page, and update
-* the *offset and *index values for the next loop. */
+* the *offset and *index values for the next loop.
+*/
cnt = 0;
while (cnt < buflen && *index < scsi_sg_count(srb)) {
struct page *page = sg_page(sg) +
@@ -95,9 +102,11 @@ unsigned int rtsx_stor_access_xfer_buf(unsigned char 
*buffer,
++sg;
}
 
-   /* Transfer the data for all the pages in this
+   /*
+* Transfer the data for all the pages in this
 * s-g entry.  For each page: call kmap(), do the
-* transfer, and call kunmap() immediately after. */
+* transfer, and call kunmap() immediately after.
+*/
while (sglen > 0) {
unsigned int plen = min(sglen, (unsigned int)
PAGE_SIZE - poff);
-- 
2.5.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 5/6] Staging: rtl8712: Coding style warnings fix for block comment

2015-09-22 Thread Punit Vara
This patch is to the drv_types.h that fixes up following warnings
reported by checkpatch.pl :

-Block comments use  a trailing */ on a separate line
-Block comments use * on subsequent lines

Signed-off-by: Punit Vara 
---
 drivers/staging/rtl8712/drv_types.h | 11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8712/drv_types.h 
b/drivers/staging/rtl8712/drv_types.h
index e62543d..3d64fee 100644
--- a/drivers/staging/rtl8712/drv_types.h
+++ b/drivers/staging/rtl8712/drv_types.h
@@ -23,11 +23,12 @@
  * Larry Finger 
  *
  
**/
-/*-
-
-   For type defines and data structure defines
-
*/
+/* -
+ *
+ * For type defines and data structure defines
+ *
+ * -
+ */
 #ifndef __DRV_TYPES_H__
 #define __DRV_TYPES_H__
 
-- 
2.5.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] Staging: rtl8712: Coding style warnings fix for block comments

2015-09-22 Thread Punit Vara
This patch is to the hal_init.c that fixes up following warning
reported by checkpatch.pl :

-Block comments use * subsequent lines
-Block comments use a trailing */ on a separate line

Signed-off-by: Punit Vara 
---
 drivers/staging/rtl8712/hal_init.c | 24 
 1 file changed, 16 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/rtl8712/hal_init.c 
b/drivers/staging/rtl8712/hal_init.c
index 0a1c631..87e7ab3 100644
--- a/drivers/staging/rtl8712/hal_init.c
+++ b/drivers/staging/rtl8712/hal_init.c
@@ -296,8 +296,10 @@ static u8 rtl8712_dl_fw(struct _adapter *padapter)
goto exit_fail;
 
tmp8 = r8712_read8(padapter, 0x1025000A);
-   if (tmp8 & BIT(4)) /* When boot from EEPROM,
-   & FW need more time to read EEPROM */
+   if (tmp8 & BIT(4)) /*
+   * When boot from EEPROM,
+   * & FW need more time to read EEPROM
+   */
i = 60;
else/* boot from EFUSE */
i = 30;
@@ -330,8 +332,10 @@ uint rtl8712_hal_init(struct _adapter *padapter)
netdev_info(padapter->pnetdev, "1 RCR=0x%x\n",
r8712_read32(padapter, RCR));
val32 = r8712_read32(padapter, RCR);
-   r8712_write32(padapter, RCR, (val32 | BIT(26))); /* Enable RX TCP
-   Checksum offload */
+   r8712_write32(padapter, RCR, (val32 | BIT(26))); /*
+ * Enable RX TCP
+ * Checksum offload
+ */
netdev_info(padapter->pnetdev, "2 RCR=0x%x\n",
r8712_read32(padapter, RCR));
val32 = r8712_read32(padapter, RCR);
@@ -344,8 +348,10 @@ uint rtl8712_hal_init(struct _adapter *padapter)
   BIT(0)); /* page = 128bytes */
r8712_write8(padapter, 0x102500BD, r8712_read8(padapter, 0x102500BD) |
   BIT(7)); /* enable usb rx aggregation */
-   r8712_write8(padapter, 0x102500D9, 1); /* TH=1 => means that invalidate
-   *  usb rx aggregation */
+   r8712_write8(padapter, 0x102500D9, 1); /*
+   * TH=1 => means that invalidate
+   * usb rx aggregation
+   */
r8712_write8(padapter, 0x1025FE5B, 0x04); /* 1.7ms/4 */
/* Fix the RX FIFO issue(USB error) */
r8712_write8(padapter, 0x1025fe5C, r8712_read8(padapter, 0x1025fe5C)
@@ -365,8 +371,10 @@ uint rtl8712_hal_deinit(struct _adapter *padapter)
r8712_write8(padapter, SYS_CLKR+1, 0x38); /* Switch Control Path */
r8712_write8(padapter, SYS_FUNC_EN+1, 0x70);
r8712_write8(padapter, PMC_FSM, 0x06);  /* Enable Loader Data Keep */
-   r8712_write8(padapter, SYS_ISO_CTRL, 0xF9); /* Isolation signals from
-* CORE, PLL */
+   r8712_write8(padapter, SYS_ISO_CTRL, 0xF9); /*
+* Isolation signals from
+* CORE, PLL
+*/
r8712_write8(padapter, SYS_ISO_CTRL+1, 0xe8); /* Enable EFUSE 1.2V */
r8712_write8(padapter, AFE_PLL_CTRL, 0x00); /* Disable AFE PLL. */
r8712_write8(padapter, LDOA15_CTRL, 0x54);  /* Disable A15V */
-- 
2.5.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] Staging: rtl8712: Coding style warnings fix for block comment

2015-09-22 Thread Punit Vara
This patch is to the drv_types.h that fixes up following warnings
reported by checkpatch.pl :

-Block comments use  a trailing */ on a separate line
-Block comments use * on subsequent lines

Signed-off-by: Punit Vara 
---
 drivers/staging/rtl8712/drv_types.h | 11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8712/drv_types.h 
b/drivers/staging/rtl8712/drv_types.h
index e62543d..3d64fee 100644
--- a/drivers/staging/rtl8712/drv_types.h
+++ b/drivers/staging/rtl8712/drv_types.h
@@ -23,11 +23,12 @@
  * Larry Finger 
  *
  
**/
-/*-
-
-   For type defines and data structure defines
-
*/
+/* -
+ *
+ * For type defines and data structure defines
+ *
+ * -
+ */
 #ifndef __DRV_TYPES_H__
 #define __DRV_TYPES_H__
 
-- 
2.5.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] Staging: rtl8712: ieee80211.c Coding style warnings fix for block comment

2015-09-22 Thread Punit Vara
This patch is to the ieee80211.c that fixes up following
warnings reported by checkpatch.pl :
-Block comments use * on subsequent lines
-Block comments use a trailing */ on a separate line

Signed-off-by: Punit Vara 
---
 drivers/staging/rtl8712/ieee80211.c | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8712/ieee80211.c 
b/drivers/staging/rtl8712/ieee80211.c
index c5527c1..6b25938 100644
--- a/drivers/staging/rtl8712/ieee80211.c
+++ b/drivers/staging/rtl8712/ieee80211.c
@@ -107,9 +107,10 @@ u8 *r8712_set_ie(u8 *pbuf, sint index, uint len, u8 
*source, uint *frlen)
return pbuf + len + 2;
 }
 
-/*
-index: the information element id index, limit is the limit for search
--*/
+/* 
+ * index: the information element id index, limit is the limit for search
+ * 
+ */
 u8 *r8712_get_ie(u8 *pbuf, sint index, sint *len, sint limit)
 {
sint tmp, i;
-- 
2.5.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] Staging: rtl8712: ieee80211.h: Coding style warnings fix for block comments

2015-09-22 Thread Punit Vara
This patch is to the ieee80211.h that fixes up following
warnings reported by checkpatch.pl :

-Block comments use * on subsequent lines
-Block comments use a trailing */ on a separate line

Signed-off-by: Punit Vara 
---
 drivers/staging/rtl8712/ieee80211.h | 59 +
 1 file changed, 33 insertions(+), 26 deletions(-)

diff --git a/drivers/staging/rtl8712/ieee80211.h 
b/drivers/staging/rtl8712/ieee80211.h
index 6e813a9..bc1040d 100644
--- a/drivers/staging/rtl8712/ieee80211.h
+++ b/drivers/staging/rtl8712/ieee80211.h
@@ -119,13 +119,15 @@ struct ieee_param {
 };
 
 #define IEEE80211_DATA_LEN 2304
-/* Maximum size for the MA-UNITDATA primitive, 802.11 standard section
-   6.2.1.1.2.
-
-   The figure in section 7.1.2 suggests a body size of up to 2312
-   bytes is allowed, which is a bit confusing, I suspect this
-   represents the 2304 bytes of real data, plus a possible 8 bytes of
-   WEP IV and ICV. (this interpretation suggested by Ramiro Barreiro) */
+/*
+ * Maximum size for the MA-UNITDATA primitive, 802.11 standard section
+ * 6.2.1.1.2.
+ *
+ * The figure in section 7.1.2 suggests a body size of up to 2312
+ * bytes is allowed, which is a bit confusing, I suspect this
+ * represents the 2304 bytes of real data, plus a possible 8 bytes of
+ * WEP IV and ICV. (this interpretation suggested by Ramiro Barreiro)
+ */
 
 #define IEEE80211_HLEN 30
 #define IEEE80211_FRAME_LEN(IEEE80211_DATA_LEN + IEEE80211_HLEN)
@@ -403,9 +405,11 @@ struct ieee80211_snap_hdr {
 
 
 
-/* NOTE: This data is for statistical purposes; not all hardware provides this
+/*
+ * NOTE: This data is for statistical purposes; not all hardware provides this
  *   information for frames received.  Not setting these will not cause
- *   any adverse affects. */
+ *   any adverse affects.
+ */
 struct ieee80211_rx_stats {
s8 rssi;
u8 signal;
@@ -417,10 +421,12 @@ struct ieee80211_rx_stats {
u16 len;
 };
 
-/* IEEE 802.11 requires that STA supports concurrent reception of at least
+/*
+ * IEEE 802.11 requires that STA supports concurrent reception of at least
  * three fragmented frames. This define can be increased to support more
  * concurrent frames, but it should be noted that each entry can consume about
- * 2 kB of RAM and increasing cache size will slow down frame reassembly. */
+ * 2 kB of RAM and increasing cache size will slow down frame reassembly.
+ */
 #define IEEE80211_FRAG_CACHE_LEN 4
 
 struct ieee80211_frag_entry {
@@ -510,19 +516,18 @@ struct ieee80211_security {
 } __packed;
 
 /*
-
- 802.11 data frame from AP
-
-  ,---.
-Bytes |  2   |  2   |6|6|6|  2   | 0..2312 |   4  |
-  |--|--|-|-|-|--|-|--|
-Desc. | ctrl | dura |  DA/RA  |   TA|SA   | Sequ |  frame  |  fcs |
-  |  | tion | (BSSID) | | | ence |  data   |  |
-  `---'
-
-Total: 28-2340 bytes
-
-*/
+ *
+ *   802.11 data frame from AP
+ *
+ * 
,---.
+ *   Bytes |  2   |  2   |6|6|6|  2   | 0..2312 |   4  
|
+ * 
|--|--|-|-|-|--|-|--|
+ *   Desc. | ctrl | dura |  DA/RA  |   TA|SA   | Sequ |  frame  |  fcs 
|
+ * |  | tion | (BSSID) | | | ence |  data   |  
|
+ * 
`---'
+ *
+ *   Total: 28-2340 bytes
+ */
 
 struct ieee80211_header_data {
u16 frame_ctl;
@@ -625,10 +630,12 @@ struct ieee80211_txb {
 /* SWEEP TABLE ENTRIES NUMBER*/
 #define MAX_SWEEP_TAB_ENTRIES42
 #define MAX_SWEEP_TAB_ENTRIES_PER_PACKET  7
-/* MAX_RATES_LENGTH needs to be 12.  The spec says 8, and many APs
+/*
+ * MAX_RATES_LENGTH needs to be 12.  The spec says 8, and many APs
  * only use 8, and then use extended rates for the remaining supported
  * rates.  Other APs, however, stick all of their supported rates on the
- * main rates information element... */
+ * main rates information element...
+ */
 #define MAX_RATES_LENGTH  ((u8)12)
 #define MAX_RATES_EX_LENGTH   ((u8)16)
 #define MAX_NETWORK_COUNT  128
-- 
2.5.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] Staging: rtl8712: os_intfs.c: Coding style warning fix for block comment

2015-09-22 Thread Punit Vara
This patch is to the os_intfs.c that fixes up warning
reported by checkpatch.pl :

-Block commens use a trailing */ on a separate line

Signed-off-by: Punit Vara 
---
 drivers/staging/rtl8712/os_intfs.c | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8712/os_intfs.c 
b/drivers/staging/rtl8712/os_intfs.c
index 5d551a1..ebbcd9b0 100644
--- a/drivers/staging/rtl8712/os_intfs.c
+++ b/drivers/staging/rtl8712/os_intfs.c
@@ -365,8 +365,10 @@ static void enable_video_mode(struct _adapter *padapter, 
int cbw40_value)
u32  intcmd = 0xf4000500;   /* enable bit8, bit10*/
 
if (cbw40_value) {
-   /* if the driver supports the 40M bandwidth,
-* we can enable the bit 9.*/
+   /*
+* if the driver supports the 40M bandwidth,
+* we can enable the bit 9.
+*/
intcmd |= 0x200;
}
r8712_fw_cmd(padapter, intcmd);
-- 
2.5.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] Staging: rtl8712: recv_linux.c: Coding style warning fix for block comment

2015-09-22 Thread Punit Vara
This is the patch to recv_linux.c file that fixes up following warning
reported by checkpatch.pl :

-Block comments use a trailing */ on a separate line

Signed-off-by: Punit Vara 
---
 drivers/staging/rtl8712/recv_linux.c | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8712/recv_linux.c 
b/drivers/staging/rtl8712/recv_linux.c
index 4201ce7..c4eef1c 100644
--- a/drivers/staging/rtl8712/recv_linux.c
+++ b/drivers/staging/rtl8712/recv_linux.c
@@ -126,8 +126,10 @@ void r8712_recv_indicatepkt(struct _adapter *padapter,
skb->dev = padapter->pnetdev;
skb->protocol = eth_type_trans(skb, padapter->pnetdev);
netif_rx(skb);
-   precv_frame->u.hdr.pkt = NULL; /* pointers to NULL before
-   * r8712_free_recvframe() */
+   precv_frame->u.hdr.pkt = NULL; /*
+   * pointers to NULL before
+   * r8712_free_recvframe()
+   */
r8712_free_recvframe(precv_frame, pfree_recv_queue);
return;
 _recv_indicatepkt_drop:
-- 
2.5.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] Staging: rtl8712: rtl8712_cmd.c: Coding style warnings fix for block comments

2015-09-22 Thread Punit Vara
This patch is to the rtl8712_cmd.c file that fixes up warnings
reported by checkpatch.pl :

-Block comments use a trailing */ on a separate line

Signed-off-by: Punit Vara 
---
 drivers/staging/rtl8712/rtl8712_cmd.c | 24 
 1 file changed, 16 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/rtl8712/rtl8712_cmd.c 
b/drivers/staging/rtl8712/rtl8712_cmd.c
index 007f0a3..a8b6d20 100644
--- a/drivers/staging/rtl8712/rtl8712_cmd.c
+++ b/drivers/staging/rtl8712/rtl8712_cmd.c
@@ -63,20 +63,26 @@ static void check_hw_pbc(struct _adapter *padapter)
if (tmp1byte == 0xff)
return;
if (tmp1byte&HAL_8192S_HW_GPIO_WPS_BIT) {
-   /* Here we only set bPbcPressed to true
-* After trigger PBC, the variable will be set to false */
+   /*
+* Here we only set bPbcPressed to true
+* After trigger PBC, the variable will be set to false
+*/
DBG_8712("CheckPbcGPIO - PBC is pressed \n");
-   /* 0 is the default value and it means the application monitors
-* the HW PBC doesn't provide its pid to driver. */
+   /*
+* 0 is the default value and it means the application monitors
+* the HW PBC doesn't provide its pid to driver.
+*/
if (padapter->pid == 0)
return;
kill_pid(find_vpid(padapter->pid), SIGUSR1, 1);
}
 }
 
-/* query rx phy status from fw.
+/*
+ * query rx phy status from fw.
  * Adhoc mode: beacon.
- * Infrastructure mode: beacon , data. */
+ * Infrastructure mode: beacon , data.
+ */
 static void query_fw_rx_phy_status(struct _adapter *padapter)
 {
u32 val32 = 0;
@@ -254,10 +260,12 @@ static struct cmd_obj *cmd_hdl_filter(struct _adapter 
*padapter,
break;
case GEN_CMD_CODE(_JoinBss):
r8712_joinbss_reset(padapter);
-   /* Before set JoinBss_CMD to FW, driver must ensure FW is in
+   /*
+* Before set JoinBss_CMD to FW, driver must ensure FW is in
 * PS_MODE_ACTIVE. Directly write rpwm to radio on and assign
 * new pwr_mode to Driver, instead of use workitem to change
-* state. */
+* state.
+*/
if (padapter->pwrctrlpriv.pwr_mode > PS_MODE_ACTIVE) {
padapter->pwrctrlpriv.pwr_mode = PS_MODE_ACTIVE;
_enter_pwrlock(&(padapter->pwrctrlpriv.lock));
-- 
2.5.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] Staging: rtl8712: Coding style warning fix for block comment

2015-09-22 Thread Punit Vara
This is the patch to recv_linux.c file that fixes up following warning
reported by checkpatch.pl :

-Block comments use a trailing */ on a separate line

Signed-off-by: Punit Vara 
---
 drivers/staging/rtl8712/rtl8712_cmdctrl_bitdef.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8712/rtl8712_cmdctrl_bitdef.h 
b/drivers/staging/rtl8712/rtl8712_cmdctrl_bitdef.h
index 8dffe10..b7dda90 100644
--- a/drivers/staging/rtl8712/rtl8712_cmdctrl_bitdef.h
+++ b/drivers/staging/rtl8712/rtl8712_cmdctrl_bitdef.h
@@ -21,7 +21,8 @@
 #define __RTL8712_CMDCTRL_BITDEF_H__
 
 /*
- * 2. Command Control Registers (Offset: 0x0040 - 0x004F)*/
+ * 2. Command Control Registers (Offset: 0x0040 - 0x004F)
+ */
 /*--*/
 /*   8192S (CMD) command register bits (Offset 0x40, 16 bits)*/
 /*--*/
-- 
2.5.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 13/13] Staging: rtl8712: Coding style warning fix for block comment

2015-09-22 Thread Punit Vara
This patch is to rtl8712_gp_bitdef.h file that fixes up following
warning reported by checkpatch :

-Block comments use a trailing */ on a separate line

Signed-off-by: Punit Vara 
---
 drivers/staging/rtl8712/rtl8712_gp_bitdef.h | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8712/rtl8712_gp_bitdef.h 
b/drivers/staging/rtl8712/rtl8712_gp_bitdef.h
index 138ea45..266b6172d 100644
--- a/drivers/staging/rtl8712/rtl8712_gp_bitdef.h
+++ b/drivers/staging/rtl8712/rtl8712_gp_bitdef.h
@@ -62,9 +62,11 @@
 
 
/**/
 
-#defineGPIOMUX_EN  BIT(3)  /* When this bit is set to "1",
+#defineGPIOMUX_EN  BIT(3)  /*
+* When this bit is set to "1",
 * GPIO PINs will switch to MAC
-* GPIO Function*/
+* GPIO Function
+*/
 #defineGPIOSEL_GPIO0   /* UART or JTAG or pure GPIO*/
 #defineGPIOSEL_PHYDBG  1   /* PHYDBG*/
 #defineGPIOSEL_BT  2   /* BT_coex*/
-- 
2.5.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] Staging: rtl8712: rtl8712_hal.h: Coding style warnings fix for block comments

2015-09-22 Thread Punit Vara
This is the patch to rtl8712_hal.h file that fixes up following warning
reported by checkpatch.pl :

-Block comments use a trailing */ on a separate line

Signed-off-by: Punit Vara 
---
 drivers/staging/rtl8712/rtl8712_hal.h | 24 
 1 file changed, 16 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/rtl8712/rtl8712_hal.h 
b/drivers/staging/rtl8712/rtl8712_hal.h
index 4c51fa3..5585c5b 100644
--- a/drivers/staging/rtl8712/rtl8712_hal.h
+++ b/drivers/staging/rtl8712/rtl8712_hal.h
@@ -67,13 +67,17 @@ struct fw_priv {   /*8-bytes alignment required*/
/*--- long word 0 */
unsigned char signature_0;  /*0x12: CE product, 0x92: IT product*/
unsigned char signature_1;  /*0x87: CE product, 0x81: IT product*/
-   unsigned char hci_sel; /*0x81: PCI-AP, 01:PCIe, 02: 92S-U, 0x82: USB-AP,
-   * 0x12: 72S-U, 03:SDIO*/
+   unsigned char hci_sel; /*
+   * 0x81: PCI-AP, 01:PCIe, 02: 92S-U, 0x82:
+   * USB-AP,0x12: 72S-U, 03:SDIO
+   */
unsigned char chip_version; /*the same value as register value*/
unsigned char customer_ID_0; /*customer  ID low byte*/
unsigned char customer_ID_1; /*customer  ID high byte*/
-   unsigned char rf_config;  /*0x11:  1T1R, 0x12: 1T2R, 0x92: 1T2R turbo,
-* 0x22: 2T2R*/
+   unsigned char rf_config;  /*
+  * 0x11:  1T1R, 0x12: 1T2R, 0x92: 1T2R turbo,
+  * 0x22: 2T2R
+  */
unsigned char usb_ep_num;  /* 4: 4EP, 6: 6EP, 11: 11EP*/
/*--- long word 1 */
unsigned char regulatory_class_0; /*regulatory class bit map 0*/
@@ -96,8 +100,10 @@ struct fw_priv {   /*8-bytes alignment required*/
/*--- long word 3 */
unsigned char qos_en;/*1: QoS enable*/
unsigned char bw_40MHz_en;   /*1: 40MHz BW enable*/
-   unsigned char AMSDU2AMPDU_en;   /*1: 4181 convert AMSDU to AMPDU,
-  * 0: disable*/
+   unsigned char AMSDU2AMPDU_en;   /*
+* 1: 4181 convert AMSDU to AMPDU,
+* 0: disable
+*/
unsigned char AMPDU_en;   /*1: 11n AMPDU enable*/
unsigned char rate_control_offload; /*1: FW offloads,0: driver handles*/
unsigned char aggregation_offload;  /*1: FW offloads,0: driver handles*/
@@ -125,8 +131,10 @@ struct fw_priv {   /*8-bytes alignment required*/
 
 struct fw_hdr {/*8-byte alignment required*/
unsigned short  signature;
-   unsigned short  version;/*0x8000 ~ 0x8FFF for FPGA version,
-*0x ~ 0x7FFF for ASIC version,*/
+   unsigned short  version;/*
+* 0x8000 ~ 0x8FFF for FPGA version,
+* 0x ~ 0x7FFF for ASIC version,
+*/
unsigned intdmem_size;/*define the size of boot loader*/
unsigned intimg_IMEM_size; /*define the size of FW in IMEM*/
unsigned intimg_SRAM_size; /*define the size of FW in SRAM*/
-- 
2.5.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] Staging: rtl8712: Coding style warning fix for block comment

2015-09-22 Thread Punit Vara
This is the patch to rtl8712_cmdctrl_bitdef.h file that fixes up
following warning reported by checkpatch.pl :

-Block comments use a trailing */ on a separate line

Signed-off-by: Punit Vara 
---
 drivers/staging/rtl8712/rtl8712_cmdctrl_bitdef.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8712/rtl8712_cmdctrl_bitdef.h 
b/drivers/staging/rtl8712/rtl8712_cmdctrl_bitdef.h
index 8dffe10..b7dda90 100644
--- a/drivers/staging/rtl8712/rtl8712_cmdctrl_bitdef.h
+++ b/drivers/staging/rtl8712/rtl8712_cmdctrl_bitdef.h
@@ -21,7 +21,8 @@
 #define __RTL8712_CMDCTRL_BITDEF_H__
 
 /*
- * 2. Command Control Registers (Offset: 0x0040 - 0x004F)*/
+ * 2. Command Control Registers (Offset: 0x0040 - 0x004F)
+ */
 /*--*/
 /*   8192S (CMD) command register bits (Offset 0x40, 16 bits)*/
 /*--*/
-- 
2.5.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] Staging: rtl8712: rtl8712_led.c: Coding style warnings fix for block comments

2015-09-22 Thread Punit Vara
This is patch to the rtl8712_led.c that fixes up following
warnings reported by checkpatch.pl :

-Block comments use a trailing */ on a separate line

Signed-off-by: Punit Vara 
---
 drivers/staging/rtl8712/rtl8712_led.c | 12 
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8712/rtl8712_led.c 
b/drivers/staging/rtl8712/rtl8712_led.c
index ada8d5d..1460b07 100644
--- a/drivers/staging/rtl8712/rtl8712_led.c
+++ b/drivers/staging/rtl8712/rtl8712_led.c
@@ -56,9 +56,11 @@ enum _LED_STATE_871x {
LED_BLINK_NORMAL = 3,
LED_BLINK_SLOWLY = 4,
LED_POWER_ON_BLINK = 5,
-   LED_SCAN_BLINK = 6, /* LED is blinking during scanning period,
+   LED_SCAN_BLINK = 6, /*
+* LED is blinking during scanning period,
 * the # of times to blink is depend on time
-* for scanning. */
+* for scanning.
+*/
LED_NO_LINK_BLINK = 7, /* LED is blinking during no link state. */
LED_BLINK_StartToBlink = 8,/* Customized for Sercomm Printer
* Server case */
@@ -109,8 +111,10 @@ static void InitLed871x(struct _adapter *padapter, struct 
LED_871x *pLed,
 static void DeInitLed871x(struct LED_871x *pLed)
 {
del_timer_sync(&pLed->BlinkTimer);
-   /* We should reset bLedBlinkInProgress if we cancel
-* the LedControlTimer, */
+   /*
+* We should reset bLedBlinkInProgress if we cancel
+* the LedControlTimer,
+*/
pLed->bLedBlinkInProgress = false;
 }
 
-- 
2.5.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] Staging: rtl8712: rtl8712_recv.c: Coding Style warnings fix for block comments

2015-09-22 Thread Punit Vara
This patch is to the rtl8712_recv.c file that fixes up following warning
reported by checkpatch.pl :

-Block comments use a trailing */ on a separate line

Signed-off-by: Punit Vara 
---
 drivers/staging/rtl8712/rtl8712_recv.c | 111 ++---
 1 file changed, 74 insertions(+), 37 deletions(-)

diff --git a/drivers/staging/rtl8712/rtl8712_recv.c 
b/drivers/staging/rtl8712/rtl8712_recv.c
index 4fa2540..2da2548 100644
--- a/drivers/staging/rtl8712/rtl8712_recv.c
+++ b/drivers/staging/rtl8712/rtl8712_recv.c
@@ -162,8 +162,10 @@ static void update_recvframe_attrib_from_recvstat(struct 
rx_pkt_attrib *pattrib,
 
drvinfo_sz = (le32_to_cpu(prxstat->rxdw0)&0x000f)>>16;
drvinfo_sz <<= 3;
-   /*TODO:
-* Offset 0 */
+   /*
+* TODO:
+* Offset 0
+*/
pattrib->bdecrypted = ((le32_to_cpu(prxstat->rxdw0) & BIT(27)) >> 27)
 ? 0 : 1;
pattrib->crc_err = (le32_to_cpu(prxstat->rxdw0) & BIT(14)) >> 14;
@@ -208,8 +210,10 @@ static union recv_frame *recvframe_defrag(struct _adapter 
*adapter,
pfhdr = &prframe->u.hdr;
curfragnum = 0;
if (curfragnum != pfhdr->attrib.frag_num) {
-   /*the first fragment number must be 0
-*free the whole queue*/
+   /*
+* the first fragment number must be 0
+* free the whole queue
+*/
r8712_free_recvframe(prframe, pfree_recv_queue);
r8712_free_recvframe_queue(defrag_q, pfree_recv_queue);
return NULL;
@@ -222,19 +226,25 @@ static union recv_frame *recvframe_defrag(struct _adapter 
*adapter,
pnfhdr = &pnextrframe->u.hdr;
/*check the fragment sequence  (2nd ~n fragment frame) */
if (curfragnum != pnfhdr->attrib.frag_num) {
-   /* the fragment number must increase  (after decache)
-* release the defrag_q & prframe */
+   /*
+* the fragment number must increase  (after decache)
+* release the defrag_q & prframe
+*/
r8712_free_recvframe(prframe, pfree_recv_queue);
r8712_free_recvframe_queue(defrag_q, pfree_recv_queue);
return NULL;
}
curfragnum++;
-   /* copy the 2nd~n fragment frame's payload to the first fragment
-* get the 2nd~last fragment frame's payload */
+   /*
+* copy the 2nd~n fragment frame's payload to the first fragment
+* get the 2nd~last fragment frame's payload
+*/
wlanhdr_offset = pnfhdr->attrib.hdrlen + pnfhdr->attrib.iv_len;
recvframe_pull(pnextrframe, wlanhdr_offset);
-   /* append  to first fragment frame's tail (if privacy frame,
-* pull the ICV) */
+   /*
+* append  to first fragment frame's tail (if privacy frame,
+* pull the ICV)
+*/
recvframe_pull_tail(prframe, pfhdr->attrib.icv_len);
memcpy(pfhdr->rx_tail, pnfhdr->rx_data, pnfhdr->len);
recvframe_put(prframe, pnfhdr->len);
@@ -276,8 +286,10 @@ union recv_frame *r8712_recvframe_chk_defrag(struct 
_adapter *padapter,
if ((ismfrag == 0) && (fragnum == 0))
prtnframe = precv_frame;/*isn't a fragment frame*/
if (ismfrag == 1) {
-   /* 0~(n-1) fragment frame
-* enqueue to defraf_g */
+   /*
+* 0~(n-1) fragment frame
+* enqueue to defraf_g
+*/
if (pdefrag_q != NULL) {
if (fragnum == 0) {
/*the first fragment*/
@@ -292,16 +304,20 @@ union recv_frame *r8712_recvframe_chk_defrag(struct 
_adapter *padapter,
list_add_tail(&pfhdr->list, phead);
prtnframe = NULL;
} else {
-   /* can't find this ta's defrag_queue, so free this
-* recv_frame */
+   /*
+* can't find this ta's defrag_queue, so free this
+* recv_frame
+*/
r8712_free_recvframe(precv_frame, pfree_recv_queue);
prtnframe = NULL;
}
 
}
if ((ismfrag == 0) && (fragnum != 0)) {
-   /* the last fragment frame
-* enqueue the last fragment */
+   /*
+* t

[PATCH] Staging: rtl8712: rtl8712_recv.c: Fix typo error "cacluated"

2015-09-22 Thread Punit Vara
This patch is to the rtl8712_rercv.c that fixes up typo error in word
"calculated"

Signed-off-by: Punit Vara 
---
 drivers/staging/rtl8712/rtl8712_recv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8712/rtl8712_recv.c 
b/drivers/staging/rtl8712/rtl8712_recv.c
index 2da2548..97f45a0 100644
--- a/drivers/staging/rtl8712/rtl8712_recv.c
+++ b/drivers/staging/rtl8712/rtl8712_recv.c
@@ -864,7 +864,7 @@ static void query_rx_phy_status(struct _adapter *padapter,
total_rssi += rssi;
}
/*
-* (2)PWDB, Average PWDB cacluated by hardware (for
+* (2)PWDB, Average PWDB calculated by hardware (for
 * rate adaptive)
 */
rx_pwr_all = (((pphy_head[PHY_STAT_PWDB_ALL_SHT]) >> 1) & 0x7f)
-- 
2.5.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 13/13] Staging: rtl8712: Coding style warning fix for block comment

2015-09-23 Thread punit vara
On Wed, Sep 23, 2015 at 12:55 PM, Jaime Arrocha  wrote:
>
> On 09/23/2015 12:31 AM, Sudip Mukherjee wrote:
>>
>> On Wed, Sep 23, 2015 at 02:03:56AM +0530, Punit Vara wrote:
>>>
>>> This patch is to rtl8712_gp_bitdef.h file that fixes up following
>>> warning reported by checkpatch :
>>>
>>> -Block comments use a trailing */ on a separate line
>>>
>>> Signed-off-by: Punit Vara 
>>> ---
>>
>> I am getting confused. One of your previous patch showed PATCH 5/6, this
>> one shows 13/13, but i am not seeing the other patches of these two
>> series. Is it the problem with my mail filters or you are not sending?
>>
>> regards
>> sudip
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>> the body of a message to majord...@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>> Please read the FAQ at  http://www.tux.org/lkml/
>
> I think the sender is not clearing the patch folder before sending a new
> one. Thus her/his diff program thinks these patches belong to a series.
>
> -Jaime
>

Sorry for inconvenience. I have forgot to change the subject of two
patches in between. So I have resent the same patches with right
subject so please do not consider those patches whose subject
represent part of series.


It would be better if someone suggest me how to create independent
patch when already I have few patches in directory .  Or is it
necessary to clear directory every time whenever we work on new
problems ?

TIA
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 13/13] Staging: rtl8712: Coding style warning fix for block comment

2015-09-23 Thread punit vara
On Wed, Sep 23, 2015 at 9:04 PM, Sudip Mukherjee
 wrote:
> On Wed, Sep 23, 2015 at 07:32:52PM +0530, punit vara wrote:
>> On Wed, Sep 23, 2015 at 12:55 PM, Jaime Arrocha  wrote:
>> >
>> > On 09/23/2015 12:31 AM, Sudip Mukherjee wrote:
>> >>
>> >> On Wed, Sep 23, 2015 at 02:03:56AM +0530, Punit Vara wrote:
> 
>>
>>
>> It would be better if someone suggest me how to create independent
>> patch when already I have few patches in directory .  Or is it
>> necessary to clear directory every time whenever we work on new
>> problems ?
> I think I have already told you how to use git format-patch to generate
> single patch when you mailed me offlist.
>
> regards
> sudip



Yes sir I remembered your advice . But  it was creating all the time
patch starting from 0001-... that is why It was difficult to remember
different patches for me so I used to change last number accordingly.
Thank you again for remind me .I would follow that from now onward
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 13/13] Staging: rtl8712: Coding style warning fix for block comment

2015-09-23 Thread punit vara
Thank you very much sir I will definitely follow that. I have seen so
many people fixing patches over here. Now I know process of submitting
patches.I am able to fix several patches created by checkpatch.pl .
But can you suggest me any driver to fix API or another small TODO
task. I have seen so many TODO but confuse where to start . Can you
give me some initial idea or though or any driver to fix bugs  ? :-)
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] Staging: rtl8712: rtl8712_recv.h: Coding style warnings fix for block comments

2015-09-23 Thread Punit Vara
This patch is to the rtl8712_recv.h that fixes up following warnings
generated by checkpatch.pl :

-Block comments use * on subsequent lines
-Block comments use a trailing */ on a separate line

Signed-off-by: Punit Vara 
---
 drivers/staging/rtl8712/rtl8712_recv.h | 20 +++-
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/rtl8712/rtl8712_recv.h 
b/drivers/staging/rtl8712/rtl8712_recv.h
index fd9e3fc..9943f8d 100644
--- a/drivers/staging/rtl8712/rtl8712_recv.h
+++ b/drivers/staging/rtl8712/rtl8712_recv.h
@@ -59,9 +59,11 @@ struct recv_stat {
 };
 
 struct phy_cck_rx_status {
-   /* For CCK rate descriptor. This is a unsigned 8:1 variable.
+   /*
+* For CCK rate descriptor. This is a unsigned 8:1 variable.
 * LSB bit present 0.5. And MSB 7 bts present a signed value.
-* Range from -64~+63.5. */
+* Range from -64~+63.5.
+*/
u8  adc_pwdb_X[4];
u8  sq_rpt;
u8  cck_agc_rpt;
@@ -116,13 +118,13 @@ struct recv_buf {
 };
 
 /*
-   head  ->
-   data  ->
-   payload
-   tail  ->
-   end   ->
-   len = (unsigned int )(tail - data);
-*/
+ * head  ->
+ * data  ->
+ * payload
+ * tail  ->
+ * end   ->
+ * len = (unsigned int )(tail - data);
+ */
 struct recv_frame_hdr {
struct list_head list;
_pkt*pkt;
-- 
2.5.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


  1   2   >