Re: [PATCH 2/2] staging: sm750fb: removed line continuations in quoted strings

2017-04-03 Thread Prasant Jalan
On Sat, Apr 1, 2017 at 12:40 AM, Prasant Jalan <prasant.ja...@gmail.com> wrote:
> checkpatch gives WARNING: Avoid line continuations in quoted strings.
>
> Trivial fix by removing line continuations and adding another quote at
> the start of next line.
>
> Signed-off-by: Prasant Jalan <prasant.ja...@gmail.com>
> ---
>  drivers/staging/sm750fb/sm750.c | 18 +-
>  1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
> index 445c68d..386d4ad 100644
> --- a/drivers/staging/sm750fb/sm750.c
> +++ b/drivers/staging/sm750fb/sm750.c
> @@ -837,15 +837,15 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int 
> index)
>
> /* some member of info->var had been set by fb_find_mode */
>
> -   pr_info("Member of info->var is :\n\
> -   xres=%d\n\
> -   yres=%d\n\
> -   xres_virtual=%d\n\
> -   yres_virtual=%d\n\
> -   xoffset=%d\n\
> -   yoffset=%d\n\
> -   bits_per_pixel=%d\n \
> -   ...\n",
> +   pr_info("Member of info->var is :\n"
> +   "xres=%d\n"
> +   "yres=%d\n"
> +   "xres_virtual=%d\n"
> +   "yres_virtual=%d\n"
> +   "xoffset=%d\n"
> +   "yoffset=%d\n"
> +   "bits_per_pixel=%d\n"
> +   " ...\n",
> var->xres,
> var->yres,
> var->xres_virtual,
> --
> 2.7.4
>

Hi All,


A gentle reminder for my patches.
Any comments or updates will be helpful!


Regards, Prasant


Re: [PATCH 2/2] staging: sm750fb: removed line continuations in quoted strings

2017-04-03 Thread Prasant Jalan
On Sat, Apr 1, 2017 at 12:40 AM, Prasant Jalan  wrote:
> checkpatch gives WARNING: Avoid line continuations in quoted strings.
>
> Trivial fix by removing line continuations and adding another quote at
> the start of next line.
>
> Signed-off-by: Prasant Jalan 
> ---
>  drivers/staging/sm750fb/sm750.c | 18 +-
>  1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
> index 445c68d..386d4ad 100644
> --- a/drivers/staging/sm750fb/sm750.c
> +++ b/drivers/staging/sm750fb/sm750.c
> @@ -837,15 +837,15 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int 
> index)
>
> /* some member of info->var had been set by fb_find_mode */
>
> -   pr_info("Member of info->var is :\n\
> -   xres=%d\n\
> -   yres=%d\n\
> -   xres_virtual=%d\n\
> -   yres_virtual=%d\n\
> -   xoffset=%d\n\
> -   yoffset=%d\n\
> -   bits_per_pixel=%d\n \
> -   ...\n",
> +   pr_info("Member of info->var is :\n"
> +   "xres=%d\n"
> +   "yres=%d\n"
> +   "xres_virtual=%d\n"
> +   "yres_virtual=%d\n"
> +   "xoffset=%d\n"
> +   "yoffset=%d\n"
> +   "bits_per_pixel=%d\n"
> +   " ...\n",
> var->xres,
> var->yres,
> var->xres_virtual,
> --
> 2.7.4
>

Hi All,


A gentle reminder for my patches.
Any comments or updates will be helpful!


Regards, Prasant


[PATCH v2] staging: rtl8712: fixed multiple line derefence issue

2017-04-03 Thread Prasant Jalan
Checkpatch emits WARNING: Avoid multiple line dereference.

Checkpatch warning is fixed by:
* Trivial indentation improvement and
* Using += instead of + helps shortening the statement.

Signed-off-by: Prasant Jalan <prasant.ja...@gmail.com>
---

  v2:
* Used += instead of + (pointed out by Joe Perches)
* Rebased to the latest next tree

 drivers/staging/rtl8712/rtl871x_xmit.c | 11 +--
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8712/rtl871x_xmit.c 
b/drivers/staging/rtl8712/rtl871x_xmit.c
index de88819..eda2aee 100644
--- a/drivers/staging/rtl8712/rtl871x_xmit.c
+++ b/drivers/staging/rtl8712/rtl871x_xmit.c
@@ -213,8 +213,9 @@ sint r8712_update_attrib(struct _adapter *padapter, _pkt 
*pkt,
if (padapter->pwrctrlpriv.pwr_mode !=
padapter->registrypriv.power_mgnt) {
del_timer_sync(>dhcp_timer);
-   r8712_set_ps_mode(padapter, padapter->registrypriv.
-   power_mgnt, padapter->registrypriv.smart_ps);
+   r8712_set_ps_mode(padapter,
+ padapter->registrypriv.power_mgnt,
+ padapter->registrypriv.smart_ps);
}
}
 }
@@ -416,15 +417,13 @@ static sint xmitframe_addmic(struct _adapter *padapter,
   [10], 6);
}
if (pqospriv->qos_option == 1)
-   priority[0] = (u8)pxmitframe->
- attrib.priority;
+   priority[0] = (u8)pxmitframe->attrib.priority;
r8712_secmicappend(, [0], 4);
payload = pframe;
for (curfragnum = 0; curfragnum < pattrib->nr_frags;
 curfragnum++) {
payload = (u8 *)RND4((addr_t)(payload));
-   payload = payload + pattrib->
- hdrlen + pattrib->iv_len;
+   payload += pattrib->hdrlen + pattrib->iv_len;
if ((curfragnum + 1) == pattrib->nr_frags) {
length = pattrib->last_txcmdsz -
  pattrib->hdrlen -
-- 
2.7.4



[PATCH v2] staging: rtl8712: fixed multiple line derefence issue

2017-04-03 Thread Prasant Jalan
Checkpatch emits WARNING: Avoid multiple line dereference.

Checkpatch warning is fixed by:
* Trivial indentation improvement and
* Using += instead of + helps shortening the statement.

Signed-off-by: Prasant Jalan 
---

  v2:
* Used += instead of + (pointed out by Joe Perches)
* Rebased to the latest next tree

 drivers/staging/rtl8712/rtl871x_xmit.c | 11 +--
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8712/rtl871x_xmit.c 
b/drivers/staging/rtl8712/rtl871x_xmit.c
index de88819..eda2aee 100644
--- a/drivers/staging/rtl8712/rtl871x_xmit.c
+++ b/drivers/staging/rtl8712/rtl871x_xmit.c
@@ -213,8 +213,9 @@ sint r8712_update_attrib(struct _adapter *padapter, _pkt 
*pkt,
if (padapter->pwrctrlpriv.pwr_mode !=
padapter->registrypriv.power_mgnt) {
del_timer_sync(>dhcp_timer);
-   r8712_set_ps_mode(padapter, padapter->registrypriv.
-   power_mgnt, padapter->registrypriv.smart_ps);
+   r8712_set_ps_mode(padapter,
+ padapter->registrypriv.power_mgnt,
+ padapter->registrypriv.smart_ps);
}
}
 }
@@ -416,15 +417,13 @@ static sint xmitframe_addmic(struct _adapter *padapter,
   [10], 6);
}
if (pqospriv->qos_option == 1)
-   priority[0] = (u8)pxmitframe->
- attrib.priority;
+   priority[0] = (u8)pxmitframe->attrib.priority;
r8712_secmicappend(, [0], 4);
payload = pframe;
for (curfragnum = 0; curfragnum < pattrib->nr_frags;
 curfragnum++) {
payload = (u8 *)RND4((addr_t)(payload));
-   payload = payload + pattrib->
- hdrlen + pattrib->iv_len;
+   payload += pattrib->hdrlen + pattrib->iv_len;
if ((curfragnum + 1) == pattrib->nr_frags) {
length = pattrib->last_txcmdsz -
  pattrib->hdrlen -
-- 
2.7.4



Re: [PATCH] staging: rtl8712: fixed multiple line derefence issue

2017-04-03 Thread Prasant Jalan
On Mon, Apr 3, 2017 at 10:27 AM, Joe Perches <j...@perches.com> wrote:
> On Mon, 2017-04-03 at 09:43 +0530, Prasant Jalan wrote:
>> On Thu, Mar 30, 2017 at 12:03 AM, Prasant Jalan <prasant.ja...@gmail.com> 
>> wrote:
>> > Checkpatch emits WARNING: Avoid multiple line dereference.
>> >
>> > Trivial indentation improvement helps fix the checkpatch warning.
> []
>> > diff --git a/drivers/staging/rtl8712/rtl871x_xmit.c 
>> > b/drivers/staging/rtl8712/rtl871x_xmit.c
> []
>> > @@ -416,15 +417,14 @@ static sint xmitframe_addmic(struct _adapter 
>> > *padapter,
>> >[10], 6);
>> > }
>> > if (pqospriv->qos_option == 1)
>> > -   priority[0] = (u8)pxmitframe->
>> > - attrib.priority;
>> > +   priority[0] = 
>> > (u8)pxmitframe->attrib.priority;
>> > r8712_secmicappend(, [0], 4);
>> > payload = pframe;
>> > for (curfragnum = 0; curfragnum < 
>> > pattrib->nr_frags;
>> >  curfragnum++) {
>> > payload = (u8 *)RND4((addr_t)(payload));
>> > -   payload = payload + pattrib->
>> > - hdrlen + pattrib->iv_len;
>> > +   payload = payload + pattrib->hdrlen +
>> > + pattrib->iv_len;
>
> += would be shorter

Hi Joe,

Looks like back to school for me for overlooking such a trivial thing.

Thanks for the pointer, I will update the patch and resend.


Regards, Prasant


Re: [PATCH] staging: rtl8712: fixed multiple line derefence issue

2017-04-03 Thread Prasant Jalan
On Mon, Apr 3, 2017 at 10:27 AM, Joe Perches  wrote:
> On Mon, 2017-04-03 at 09:43 +0530, Prasant Jalan wrote:
>> On Thu, Mar 30, 2017 at 12:03 AM, Prasant Jalan  
>> wrote:
>> > Checkpatch emits WARNING: Avoid multiple line dereference.
>> >
>> > Trivial indentation improvement helps fix the checkpatch warning.
> []
>> > diff --git a/drivers/staging/rtl8712/rtl871x_xmit.c 
>> > b/drivers/staging/rtl8712/rtl871x_xmit.c
> []
>> > @@ -416,15 +417,14 @@ static sint xmitframe_addmic(struct _adapter 
>> > *padapter,
>> >[10], 6);
>> > }
>> > if (pqospriv->qos_option == 1)
>> > -   priority[0] = (u8)pxmitframe->
>> > - attrib.priority;
>> > +   priority[0] = 
>> > (u8)pxmitframe->attrib.priority;
>> > r8712_secmicappend(, [0], 4);
>> > payload = pframe;
>> > for (curfragnum = 0; curfragnum < 
>> > pattrib->nr_frags;
>> >  curfragnum++) {
>> > payload = (u8 *)RND4((addr_t)(payload));
>> > -   payload = payload + pattrib->
>> > - hdrlen + pattrib->iv_len;
>> > +   payload = payload + pattrib->hdrlen +
>> > + pattrib->iv_len;
>
> += would be shorter

Hi Joe,

Looks like back to school for me for overlooking such a trivial thing.

Thanks for the pointer, I will update the patch and resend.


Regards, Prasant


Re: [PATCH] staging: rtl8712: fixed multiple line derefence issue

2017-04-02 Thread Prasant Jalan
On Thu, Mar 30, 2017 at 12:03 AM, Prasant Jalan <prasant.ja...@gmail.com> wrote:
> Checkpatch emits WARNING: Avoid multiple line dereference.
>
> Trivial indentation improvement helps fix the checkpatch warning.
>
> Signed-off-by: Prasant Jalan <prasant.ja...@gmail.com>
> ---
>  drivers/staging/rtl8712/rtl871x_xmit.c | 12 ++--
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/staging/rtl8712/rtl871x_xmit.c 
> b/drivers/staging/rtl8712/rtl871x_xmit.c
> index de88819..10edf00 100644
> --- a/drivers/staging/rtl8712/rtl871x_xmit.c
> +++ b/drivers/staging/rtl8712/rtl871x_xmit.c
> @@ -213,8 +213,9 @@ sint r8712_update_attrib(struct _adapter *padapter, _pkt 
> *pkt,
> if (padapter->pwrctrlpriv.pwr_mode !=
> padapter->registrypriv.power_mgnt) {
> del_timer_sync(>dhcp_timer);
> -   r8712_set_ps_mode(padapter, padapter->registrypriv.
> -   power_mgnt, padapter->registrypriv.smart_ps);
> +   r8712_set_ps_mode(padapter,
> + padapter->registrypriv.power_mgnt,
> + padapter->registrypriv.smart_ps);
> }
> }
>  }
> @@ -416,15 +417,14 @@ static sint xmitframe_addmic(struct _adapter *padapter,
>[10], 6);
> }
> if (pqospriv->qos_option == 1)
> -   priority[0] = (u8)pxmitframe->
> - attrib.priority;
> +   priority[0] = (u8)pxmitframe->attrib.priority;
> r8712_secmicappend(, [0], 4);
> payload = pframe;
> for (curfragnum = 0; curfragnum < pattrib->nr_frags;
>  curfragnum++) {
> payload = (u8 *)RND4((addr_t)(payload));
> -   payload = payload + pattrib->
> - hdrlen + pattrib->iv_len;
> +   payload = payload + pattrib->hdrlen +
> + pattrib->iv_len;
> if ((curfragnum + 1) == pattrib->nr_frags) {
> length = pattrib->last_txcmdsz -
>   pattrib->hdrlen -
> --
> 2.7.4
>


Hi all,


A gentle reminder for my small patch. Some comments will be most helpful.


Regards, Prasant Jalan


Re: [PATCH] staging: rtl8712: fixed multiple line derefence issue

2017-04-02 Thread Prasant Jalan
On Thu, Mar 30, 2017 at 12:03 AM, Prasant Jalan  wrote:
> Checkpatch emits WARNING: Avoid multiple line dereference.
>
> Trivial indentation improvement helps fix the checkpatch warning.
>
> Signed-off-by: Prasant Jalan 
> ---
>  drivers/staging/rtl8712/rtl871x_xmit.c | 12 ++--
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/staging/rtl8712/rtl871x_xmit.c 
> b/drivers/staging/rtl8712/rtl871x_xmit.c
> index de88819..10edf00 100644
> --- a/drivers/staging/rtl8712/rtl871x_xmit.c
> +++ b/drivers/staging/rtl8712/rtl871x_xmit.c
> @@ -213,8 +213,9 @@ sint r8712_update_attrib(struct _adapter *padapter, _pkt 
> *pkt,
> if (padapter->pwrctrlpriv.pwr_mode !=
> padapter->registrypriv.power_mgnt) {
> del_timer_sync(>dhcp_timer);
> -   r8712_set_ps_mode(padapter, padapter->registrypriv.
> -   power_mgnt, padapter->registrypriv.smart_ps);
> +   r8712_set_ps_mode(padapter,
> + padapter->registrypriv.power_mgnt,
> + padapter->registrypriv.smart_ps);
> }
> }
>  }
> @@ -416,15 +417,14 @@ static sint xmitframe_addmic(struct _adapter *padapter,
>[10], 6);
> }
> if (pqospriv->qos_option == 1)
> -   priority[0] = (u8)pxmitframe->
> - attrib.priority;
> +   priority[0] = (u8)pxmitframe->attrib.priority;
> r8712_secmicappend(, [0], 4);
> payload = pframe;
> for (curfragnum = 0; curfragnum < pattrib->nr_frags;
>  curfragnum++) {
> payload = (u8 *)RND4((addr_t)(payload));
> -   payload = payload + pattrib->
> - hdrlen + pattrib->iv_len;
> +   payload = payload + pattrib->hdrlen +
> + pattrib->iv_len;
> if ((curfragnum + 1) == pattrib->nr_frags) {
> length = pattrib->last_txcmdsz -
>   pattrib->hdrlen -
> --
> 2.7.4
>


Hi all,


A gentle reminder for my small patch. Some comments will be most helpful.


Regards, Prasant Jalan


[PATCH 2/2] staging: sm750fb: removed line continuations in quoted strings

2017-03-31 Thread Prasant Jalan
checkpatch gives WARNING: Avoid line continuations in quoted strings.

Trivial fix by removing line continuations and adding another quote at
the start of next line.

Signed-off-by: Prasant Jalan <prasant.ja...@gmail.com>
---
 drivers/staging/sm750fb/sm750.c | 18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
index 445c68d..386d4ad 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -837,15 +837,15 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int 
index)
 
/* some member of info->var had been set by fb_find_mode */
 
-   pr_info("Member of info->var is :\n\
-   xres=%d\n\
-   yres=%d\n\
-   xres_virtual=%d\n\
-   yres_virtual=%d\n\
-   xoffset=%d\n\
-   yoffset=%d\n\
-   bits_per_pixel=%d\n \
-   ...\n",
+   pr_info("Member of info->var is :\n"
+   "xres=%d\n"
+   "yres=%d\n"
+   "xres_virtual=%d\n"
+   "yres_virtual=%d\n"
+   "xoffset=%d\n"
+   "yoffset=%d\n"
+   "bits_per_pixel=%d\n"
+   " ...\n",
var->xres,
var->yres,
var->xres_virtual,
-- 
2.7.4



[PATCH 2/2] staging: sm750fb: removed line continuations in quoted strings

2017-03-31 Thread Prasant Jalan
checkpatch gives WARNING: Avoid line continuations in quoted strings.

Trivial fix by removing line continuations and adding another quote at
the start of next line.

Signed-off-by: Prasant Jalan 
---
 drivers/staging/sm750fb/sm750.c | 18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
index 445c68d..386d4ad 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -837,15 +837,15 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int 
index)
 
/* some member of info->var had been set by fb_find_mode */
 
-   pr_info("Member of info->var is :\n\
-   xres=%d\n\
-   yres=%d\n\
-   xres_virtual=%d\n\
-   yres_virtual=%d\n\
-   xoffset=%d\n\
-   yoffset=%d\n\
-   bits_per_pixel=%d\n \
-   ...\n",
+   pr_info("Member of info->var is :\n"
+   "xres=%d\n"
+   "yres=%d\n"
+   "xres_virtual=%d\n"
+   "yres_virtual=%d\n"
+   "xoffset=%d\n"
+   "yoffset=%d\n"
+   "bits_per_pixel=%d\n"
+   " ...\n",
var->xres,
var->yres,
var->xres_virtual,
-- 
2.7.4



[PATCH 1/2] staging: sm750fb: fixing function return with lock held

2017-03-31 Thread Prasant Jalan
lynxfb_suspend() & lynxfb_resume() return on errors while holding
console_lock.

Adding 'goto' such that proper cleanups can be done before returning
from function and therefore console_lock can be released before
returning.

Signed-off-by: Prasant Jalan <prasant.ja...@gmail.com>
---
 drivers/staging/sm750fb/sm750.c | 12 
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
index c618c56..445c68d 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -419,7 +419,7 @@ static int lynxfb_suspend(struct pci_dev *pdev, 
pm_message_t mesg)
if (ret) {
dev_err(>dev,
"error:%d occurred in pci_save_state\n", ret);
-   return ret;
+   goto lynxfb_suspend_err;
}
 
ret = pci_set_power_state(pdev, pci_choose_state(pdev, mesg));
@@ -427,11 +427,13 @@ static int lynxfb_suspend(struct pci_dev *pdev, 
pm_message_t mesg)
dev_err(>dev,
"error:%d occurred in pci_set_power_state\n",
ret);
-   return ret;
+   goto lynxfb_suspend_err;
}
}
 
pdev->dev.power.power_state = mesg;
+
+lynxfb_suspend_err:
console_unlock();
return ret;
 }
@@ -456,7 +458,7 @@ static int lynxfb_resume(struct pci_dev *pdev)
if (ret) {
dev_err(>dev,
"error:%d occurred in pci_set_power_state\n", ret);
-   return ret;
+   goto lynxfb_resume_err;
}
 
if (pdev->dev.power.power_state.event != PM_EVENT_FREEZE) {
@@ -466,7 +468,7 @@ static int lynxfb_resume(struct pci_dev *pdev)
dev_err(>dev,
"error:%d occurred in pci_enable_device\n",
ret);
-   return ret;
+   goto lynxfb_resume_err;
}
pci_set_master(pdev);
}
@@ -498,6 +500,8 @@ static int lynxfb_resume(struct pci_dev *pdev)
}
 
pdev->dev.power.power_state.event = PM_EVENT_RESUME;
+
+lynxfb_resume_err:
console_unlock();
return ret;
 }
-- 
2.7.4



[PATCH 1/2] staging: sm750fb: fixing function return with lock held

2017-03-31 Thread Prasant Jalan
lynxfb_suspend() & lynxfb_resume() return on errors while holding
console_lock.

Adding 'goto' such that proper cleanups can be done before returning
from function and therefore console_lock can be released before
returning.

Signed-off-by: Prasant Jalan 
---
 drivers/staging/sm750fb/sm750.c | 12 
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
index c618c56..445c68d 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -419,7 +419,7 @@ static int lynxfb_suspend(struct pci_dev *pdev, 
pm_message_t mesg)
if (ret) {
dev_err(>dev,
"error:%d occurred in pci_save_state\n", ret);
-   return ret;
+   goto lynxfb_suspend_err;
}
 
ret = pci_set_power_state(pdev, pci_choose_state(pdev, mesg));
@@ -427,11 +427,13 @@ static int lynxfb_suspend(struct pci_dev *pdev, 
pm_message_t mesg)
dev_err(>dev,
"error:%d occurred in pci_set_power_state\n",
ret);
-   return ret;
+   goto lynxfb_suspend_err;
}
}
 
pdev->dev.power.power_state = mesg;
+
+lynxfb_suspend_err:
console_unlock();
return ret;
 }
@@ -456,7 +458,7 @@ static int lynxfb_resume(struct pci_dev *pdev)
if (ret) {
dev_err(>dev,
"error:%d occurred in pci_set_power_state\n", ret);
-   return ret;
+   goto lynxfb_resume_err;
}
 
if (pdev->dev.power.power_state.event != PM_EVENT_FREEZE) {
@@ -466,7 +468,7 @@ static int lynxfb_resume(struct pci_dev *pdev)
dev_err(>dev,
"error:%d occurred in pci_enable_device\n",
ret);
-   return ret;
+   goto lynxfb_resume_err;
}
pci_set_master(pdev);
}
@@ -498,6 +500,8 @@ static int lynxfb_resume(struct pci_dev *pdev)
}
 
pdev->dev.power.power_state.event = PM_EVENT_RESUME;
+
+lynxfb_resume_err:
console_unlock();
return ret;
 }
-- 
2.7.4



[PATCH] staging: rtl8712: fixed multiple line derefence issue

2017-03-29 Thread Prasant Jalan
Checkpatch emits WARNING: Avoid multiple line dereference.

Trivial indentation improvement helps fix the checkpatch warning.

Signed-off-by: Prasant Jalan <prasant.ja...@gmail.com>
---
 drivers/staging/rtl8712/rtl871x_xmit.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8712/rtl871x_xmit.c 
b/drivers/staging/rtl8712/rtl871x_xmit.c
index de88819..10edf00 100644
--- a/drivers/staging/rtl8712/rtl871x_xmit.c
+++ b/drivers/staging/rtl8712/rtl871x_xmit.c
@@ -213,8 +213,9 @@ sint r8712_update_attrib(struct _adapter *padapter, _pkt 
*pkt,
if (padapter->pwrctrlpriv.pwr_mode !=
padapter->registrypriv.power_mgnt) {
del_timer_sync(>dhcp_timer);
-   r8712_set_ps_mode(padapter, padapter->registrypriv.
-   power_mgnt, padapter->registrypriv.smart_ps);
+   r8712_set_ps_mode(padapter,
+ padapter->registrypriv.power_mgnt,
+ padapter->registrypriv.smart_ps);
}
}
 }
@@ -416,15 +417,14 @@ static sint xmitframe_addmic(struct _adapter *padapter,
   [10], 6);
}
if (pqospriv->qos_option == 1)
-   priority[0] = (u8)pxmitframe->
- attrib.priority;
+   priority[0] = (u8)pxmitframe->attrib.priority;
r8712_secmicappend(, [0], 4);
payload = pframe;
for (curfragnum = 0; curfragnum < pattrib->nr_frags;
 curfragnum++) {
payload = (u8 *)RND4((addr_t)(payload));
-   payload = payload + pattrib->
- hdrlen + pattrib->iv_len;
+   payload = payload + pattrib->hdrlen +
+ pattrib->iv_len;
if ((curfragnum + 1) == pattrib->nr_frags) {
length = pattrib->last_txcmdsz -
  pattrib->hdrlen -
-- 
2.7.4



[PATCH] staging: rtl8712: fixed multiple line derefence issue

2017-03-29 Thread Prasant Jalan
Checkpatch emits WARNING: Avoid multiple line dereference.

Trivial indentation improvement helps fix the checkpatch warning.

Signed-off-by: Prasant Jalan 
---
 drivers/staging/rtl8712/rtl871x_xmit.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8712/rtl871x_xmit.c 
b/drivers/staging/rtl8712/rtl871x_xmit.c
index de88819..10edf00 100644
--- a/drivers/staging/rtl8712/rtl871x_xmit.c
+++ b/drivers/staging/rtl8712/rtl871x_xmit.c
@@ -213,8 +213,9 @@ sint r8712_update_attrib(struct _adapter *padapter, _pkt 
*pkt,
if (padapter->pwrctrlpriv.pwr_mode !=
padapter->registrypriv.power_mgnt) {
del_timer_sync(>dhcp_timer);
-   r8712_set_ps_mode(padapter, padapter->registrypriv.
-   power_mgnt, padapter->registrypriv.smart_ps);
+   r8712_set_ps_mode(padapter,
+ padapter->registrypriv.power_mgnt,
+ padapter->registrypriv.smart_ps);
}
}
 }
@@ -416,15 +417,14 @@ static sint xmitframe_addmic(struct _adapter *padapter,
   [10], 6);
}
if (pqospriv->qos_option == 1)
-   priority[0] = (u8)pxmitframe->
- attrib.priority;
+   priority[0] = (u8)pxmitframe->attrib.priority;
r8712_secmicappend(, [0], 4);
payload = pframe;
for (curfragnum = 0; curfragnum < pattrib->nr_frags;
 curfragnum++) {
payload = (u8 *)RND4((addr_t)(payload));
-   payload = payload + pattrib->
- hdrlen + pattrib->iv_len;
+   payload = payload + pattrib->hdrlen +
+ pattrib->iv_len;
if ((curfragnum + 1) == pattrib->nr_frags) {
length = pattrib->last_txcmdsz -
  pattrib->hdrlen -
-- 
2.7.4



Re: [PATCH v2] staging: vt6656: fixed an indentation coding style issue

2017-03-27 Thread Prasant Jalan
On Sat, Mar 25, 2017 at 6:28 PM, Prasant Jalan <prasant.ja...@gmail.com> wrote:
> On Sat, Mar 25, 2017 at 6:01 PM, Arushi Singhal
> <arushisinghal19971...@gmail.com> wrote:
>>
>>
>> On Sat, Mar 25, 2017 at 5:40 PM, Prasant Jalan <prasant.ja...@gmail.com>
>> wrote:
>>>
>>>
>>> Replacing spaces with tabs for indetation to fix checkpatch.pl error
>>> "code indent should use tabs where possible".
>>
>> I think the commit message should be much more clear as for "code
>> indentation"
>> you are even adding and deleting spaces.
>>>
>>>
>
> Hi Arushi,
>
> Thanks for comments and sorry to bother with a coding style fix patch.
> I'm just trying to learn and felt its an easy one.
>
> I did not understand your comment "adding and deleting spaces".
> I'm only deleting spaces and replacing it with tabs.
> I'm not adding spaces. Could you please clarify.
>
> Regards, Prasant
>
>>>
>>> Signed-off-by: Prasant Jalan <prasant.ja...@gmail.com>
>>> ---
>>>
>>>   v2:
>>> - improved changelog comments
>>> - fixed only one issue
>>>
>>>
>>>  drivers/staging/vt6656/rxtx.c | 35 +++
>>>  1 file changed, 19 insertions(+), 16 deletions(-)
>>>
>>> diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c
>>> index 1835cd1..7ebd1ee 100644
>>> --- a/drivers/staging/vt6656/rxtx.c
>>> +++ b/drivers/staging/vt6656/rxtx.c
>>> @@ -114,7 +114,7 @@ static __le16 vnt_time_stamp_off(struct vnt_private
>>> *priv, u16 rate)
>>>  }
>>>
>>>  static u32 vnt_get_rsvtime(struct vnt_private *priv, u8 pkt_type,
>>> -   u32 frame_length, u16 rate, int need_ack)
>>> +   u32 frame_length, u16 rate, int need_ack)
>>>  {
>>> u32 data_time, ack_time;
>>>
>>> @@ -135,14 +135,16 @@ static u32 vnt_get_rsvtime(struct vnt_private *priv,
>>> u8 pkt_type,
>>>  }
>>>
>>>  static __le16 vnt_rxtx_rsvtime_le16(struct vnt_private *priv, u8
>>> pkt_type,
>>> -u32 frame_length, u16 rate, int
>>> need_ack)
>>> +   u32 frame_length, u16 rate,
>>> +   int need_ack)
>>>  {
>>> return cpu_to_le16((u16)vnt_get_rsvtime(priv, pkt_type,
>>> frame_length, rate, need_ack));
>>>  }
>>>
>>>  static __le16 vnt_get_rtscts_rsvtime_le(struct vnt_private *priv,
>>> -u8 rsv_type, u8 pkt_type, u32
>>> frame_length, u16 current_rate)
>>> +   u8 rsv_type, u8 pkt_type,
>>> +   u32 frame_length, u16
>>> current_rate)
>>>  {
>>> u32 rrv_time, rts_time, cts_time, ack_time, data_time;
>>>
>>> @@ -160,19 +162,19 @@ static __le16 vnt_get_rtscts_rsvtime_le(struct
>>> vnt_private *priv,
>>> rts_time = vnt_get_frame_time(priv->preamble_type,
>>> pkt_type, 20, priv->top_cck_basic_rate);
>>> cts_time = vnt_get_frame_time(priv->preamble_type,
>>> pkt_type,
>>> - 14,
>>> priv->top_cck_basic_rate);
>>> +   14,
>>> priv->top_cck_basic_rate);
>>> ack_time = vnt_get_frame_time(priv->preamble_type,
>>> pkt_type,
>>> - 14,
>>> priv->top_ofdm_basic_rate);
>>> +   14,
>>> priv->top_ofdm_basic_rate);
>>> } else if (rsv_type == 2) {
>>> rts_time = vnt_get_frame_time(priv->preamble_type,
>>> pkt_type,
>>> - 20,
>>> priv->top_ofdm_basic_rate);
>>> +   20,
>>> priv->top_ofdm_basic_rate);
>>> cts_time = ack_time =
>>> vnt_get_frame_time(priv->preamble_type,
>>> pkt_type, 14, priv->top_ofdm_basic_rate);
>>> } else if (rsv_type == 3) {
>>> cts_time = vnt_get_frame_time(priv->preamble_type,
>>> pkt_type,
>>&g

Re: [PATCH v2] staging: vt6656: fixed an indentation coding style issue

2017-03-27 Thread Prasant Jalan
On Sat, Mar 25, 2017 at 6:28 PM, Prasant Jalan  wrote:
> On Sat, Mar 25, 2017 at 6:01 PM, Arushi Singhal
>  wrote:
>>
>>
>> On Sat, Mar 25, 2017 at 5:40 PM, Prasant Jalan 
>> wrote:
>>>
>>>
>>> Replacing spaces with tabs for indetation to fix checkpatch.pl error
>>> "code indent should use tabs where possible".
>>
>> I think the commit message should be much more clear as for "code
>> indentation"
>> you are even adding and deleting spaces.
>>>
>>>
>
> Hi Arushi,
>
> Thanks for comments and sorry to bother with a coding style fix patch.
> I'm just trying to learn and felt its an easy one.
>
> I did not understand your comment "adding and deleting spaces".
> I'm only deleting spaces and replacing it with tabs.
> I'm not adding spaces. Could you please clarify.
>
> Regards, Prasant
>
>>>
>>> Signed-off-by: Prasant Jalan 
>>> ---
>>>
>>>   v2:
>>> - improved changelog comments
>>> - fixed only one issue
>>>
>>>
>>>  drivers/staging/vt6656/rxtx.c | 35 +++
>>>  1 file changed, 19 insertions(+), 16 deletions(-)
>>>
>>> diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c
>>> index 1835cd1..7ebd1ee 100644
>>> --- a/drivers/staging/vt6656/rxtx.c
>>> +++ b/drivers/staging/vt6656/rxtx.c
>>> @@ -114,7 +114,7 @@ static __le16 vnt_time_stamp_off(struct vnt_private
>>> *priv, u16 rate)
>>>  }
>>>
>>>  static u32 vnt_get_rsvtime(struct vnt_private *priv, u8 pkt_type,
>>> -   u32 frame_length, u16 rate, int need_ack)
>>> +   u32 frame_length, u16 rate, int need_ack)
>>>  {
>>> u32 data_time, ack_time;
>>>
>>> @@ -135,14 +135,16 @@ static u32 vnt_get_rsvtime(struct vnt_private *priv,
>>> u8 pkt_type,
>>>  }
>>>
>>>  static __le16 vnt_rxtx_rsvtime_le16(struct vnt_private *priv, u8
>>> pkt_type,
>>> -u32 frame_length, u16 rate, int
>>> need_ack)
>>> +   u32 frame_length, u16 rate,
>>> +   int need_ack)
>>>  {
>>> return cpu_to_le16((u16)vnt_get_rsvtime(priv, pkt_type,
>>> frame_length, rate, need_ack));
>>>  }
>>>
>>>  static __le16 vnt_get_rtscts_rsvtime_le(struct vnt_private *priv,
>>> -u8 rsv_type, u8 pkt_type, u32
>>> frame_length, u16 current_rate)
>>> +   u8 rsv_type, u8 pkt_type,
>>> +   u32 frame_length, u16
>>> current_rate)
>>>  {
>>> u32 rrv_time, rts_time, cts_time, ack_time, data_time;
>>>
>>> @@ -160,19 +162,19 @@ static __le16 vnt_get_rtscts_rsvtime_le(struct
>>> vnt_private *priv,
>>> rts_time = vnt_get_frame_time(priv->preamble_type,
>>> pkt_type, 20, priv->top_cck_basic_rate);
>>> cts_time = vnt_get_frame_time(priv->preamble_type,
>>> pkt_type,
>>> - 14,
>>> priv->top_cck_basic_rate);
>>> +   14,
>>> priv->top_cck_basic_rate);
>>> ack_time = vnt_get_frame_time(priv->preamble_type,
>>> pkt_type,
>>> - 14,
>>> priv->top_ofdm_basic_rate);
>>> +   14,
>>> priv->top_ofdm_basic_rate);
>>> } else if (rsv_type == 2) {
>>> rts_time = vnt_get_frame_time(priv->preamble_type,
>>> pkt_type,
>>> - 20,
>>> priv->top_ofdm_basic_rate);
>>> +   20,
>>> priv->top_ofdm_basic_rate);
>>> cts_time = ack_time =
>>> vnt_get_frame_time(priv->preamble_type,
>>> pkt_type, 14, priv->top_ofdm_basic_rate);
>>> } else if (rsv_type == 3) {
>>> cts_time = vnt_get_frame_time(priv->preamble_type,
>>> pkt_type,
>>> - 14,
>>> priv->top_cck_basic_rate);
>>> +   

Re: [PATCH v2] staging: vt6656: fixed an indentation coding style issue

2017-03-25 Thread Prasant Jalan
On Sat, Mar 25, 2017 at 6:01 PM, Arushi Singhal
<arushisinghal19971...@gmail.com> wrote:
>
>
> On Sat, Mar 25, 2017 at 5:40 PM, Prasant Jalan <prasant.ja...@gmail.com>
> wrote:
>>
>>
>> Replacing spaces with tabs for indetation to fix checkpatch.pl error
>> "code indent should use tabs where possible".
>
> I think the commit message should be much more clear as for "code
> indentation"
> you are even adding and deleting spaces.
>>
>>

Hi Arushi,

Thanks for comments and sorry to bother with a coding style fix patch.
I'm just trying to learn and felt its an easy one.

I did not understand your comment "adding and deleting spaces".
I'm only deleting spaces and replacing it with tabs.
I'm not adding spaces. Could you please clarify.

Regards, Prasant

>>
>> Signed-off-by: Prasant Jalan <prasant.ja...@gmail.com>
>> ---
>>
>>   v2:
>> - improved changelog comments
>> - fixed only one issue
>>
>>
>>  drivers/staging/vt6656/rxtx.c | 35 +++
>>  1 file changed, 19 insertions(+), 16 deletions(-)
>>
>> diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c
>> index 1835cd1..7ebd1ee 100644
>> --- a/drivers/staging/vt6656/rxtx.c
>> +++ b/drivers/staging/vt6656/rxtx.c
>> @@ -114,7 +114,7 @@ static __le16 vnt_time_stamp_off(struct vnt_private
>> *priv, u16 rate)
>>  }
>>
>>  static u32 vnt_get_rsvtime(struct vnt_private *priv, u8 pkt_type,
>> -   u32 frame_length, u16 rate, int need_ack)
>> +   u32 frame_length, u16 rate, int need_ack)
>>  {
>> u32 data_time, ack_time;
>>
>> @@ -135,14 +135,16 @@ static u32 vnt_get_rsvtime(struct vnt_private *priv,
>> u8 pkt_type,
>>  }
>>
>>  static __le16 vnt_rxtx_rsvtime_le16(struct vnt_private *priv, u8
>> pkt_type,
>> -u32 frame_length, u16 rate, int
>> need_ack)
>> +   u32 frame_length, u16 rate,
>> +   int need_ack)
>>  {
>> return cpu_to_le16((u16)vnt_get_rsvtime(priv, pkt_type,
>> frame_length, rate, need_ack));
>>  }
>>
>>  static __le16 vnt_get_rtscts_rsvtime_le(struct vnt_private *priv,
>> -u8 rsv_type, u8 pkt_type, u32
>> frame_length, u16 current_rate)
>> +   u8 rsv_type, u8 pkt_type,
>> +   u32 frame_length, u16
>> current_rate)
>>  {
>> u32 rrv_time, rts_time, cts_time, ack_time, data_time;
>>
>> @@ -160,19 +162,19 @@ static __le16 vnt_get_rtscts_rsvtime_le(struct
>> vnt_private *priv,
>> rts_time = vnt_get_frame_time(priv->preamble_type,
>> pkt_type, 20, priv->top_cck_basic_rate);
>> cts_time = vnt_get_frame_time(priv->preamble_type,
>> pkt_type,
>> - 14,
>> priv->top_cck_basic_rate);
>> +   14,
>> priv->top_cck_basic_rate);
>> ack_time = vnt_get_frame_time(priv->preamble_type,
>> pkt_type,
>> - 14,
>> priv->top_ofdm_basic_rate);
>> +   14,
>> priv->top_ofdm_basic_rate);
>> } else if (rsv_type == 2) {
>> rts_time = vnt_get_frame_time(priv->preamble_type,
>> pkt_type,
>> - 20,
>> priv->top_ofdm_basic_rate);
>> +   20,
>> priv->top_ofdm_basic_rate);
>> cts_time = ack_time =
>> vnt_get_frame_time(priv->preamble_type,
>> pkt_type, 14, priv->top_ofdm_basic_rate);
>> } else if (rsv_type == 3) {
>> cts_time = vnt_get_frame_time(priv->preamble_type,
>> pkt_type,
>> - 14,
>> priv->top_cck_basic_rate);
>> +   14,
>> priv->top_cck_basic_rate);
>> ack_time = vnt_get_frame_time(priv->preamble_type,
>> pkt_type,
>> - 14,
>> priv->top_ofdm_basic_rate);
>> +   14,
>> priv->top_ofdm_basic_rate);
>>
>> 

Re: [PATCH v2] staging: vt6656: fixed an indentation coding style issue

2017-03-25 Thread Prasant Jalan
On Sat, Mar 25, 2017 at 6:01 PM, Arushi Singhal
 wrote:
>
>
> On Sat, Mar 25, 2017 at 5:40 PM, Prasant Jalan 
> wrote:
>>
>>
>> Replacing spaces with tabs for indetation to fix checkpatch.pl error
>> "code indent should use tabs where possible".
>
> I think the commit message should be much more clear as for "code
> indentation"
> you are even adding and deleting spaces.
>>
>>

Hi Arushi,

Thanks for comments and sorry to bother with a coding style fix patch.
I'm just trying to learn and felt its an easy one.

I did not understand your comment "adding and deleting spaces".
I'm only deleting spaces and replacing it with tabs.
I'm not adding spaces. Could you please clarify.

Regards, Prasant

>>
>> Signed-off-by: Prasant Jalan 
>> ---
>>
>>   v2:
>> - improved changelog comments
>> - fixed only one issue
>>
>>
>>  drivers/staging/vt6656/rxtx.c | 35 +++
>>  1 file changed, 19 insertions(+), 16 deletions(-)
>>
>> diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c
>> index 1835cd1..7ebd1ee 100644
>> --- a/drivers/staging/vt6656/rxtx.c
>> +++ b/drivers/staging/vt6656/rxtx.c
>> @@ -114,7 +114,7 @@ static __le16 vnt_time_stamp_off(struct vnt_private
>> *priv, u16 rate)
>>  }
>>
>>  static u32 vnt_get_rsvtime(struct vnt_private *priv, u8 pkt_type,
>> -   u32 frame_length, u16 rate, int need_ack)
>> +   u32 frame_length, u16 rate, int need_ack)
>>  {
>> u32 data_time, ack_time;
>>
>> @@ -135,14 +135,16 @@ static u32 vnt_get_rsvtime(struct vnt_private *priv,
>> u8 pkt_type,
>>  }
>>
>>  static __le16 vnt_rxtx_rsvtime_le16(struct vnt_private *priv, u8
>> pkt_type,
>> -u32 frame_length, u16 rate, int
>> need_ack)
>> +   u32 frame_length, u16 rate,
>> +   int need_ack)
>>  {
>> return cpu_to_le16((u16)vnt_get_rsvtime(priv, pkt_type,
>> frame_length, rate, need_ack));
>>  }
>>
>>  static __le16 vnt_get_rtscts_rsvtime_le(struct vnt_private *priv,
>> -u8 rsv_type, u8 pkt_type, u32
>> frame_length, u16 current_rate)
>> +   u8 rsv_type, u8 pkt_type,
>> +   u32 frame_length, u16
>> current_rate)
>>  {
>> u32 rrv_time, rts_time, cts_time, ack_time, data_time;
>>
>> @@ -160,19 +162,19 @@ static __le16 vnt_get_rtscts_rsvtime_le(struct
>> vnt_private *priv,
>> rts_time = vnt_get_frame_time(priv->preamble_type,
>> pkt_type, 20, priv->top_cck_basic_rate);
>> cts_time = vnt_get_frame_time(priv->preamble_type,
>> pkt_type,
>> - 14,
>> priv->top_cck_basic_rate);
>> +   14,
>> priv->top_cck_basic_rate);
>> ack_time = vnt_get_frame_time(priv->preamble_type,
>> pkt_type,
>> - 14,
>> priv->top_ofdm_basic_rate);
>> +   14,
>> priv->top_ofdm_basic_rate);
>> } else if (rsv_type == 2) {
>> rts_time = vnt_get_frame_time(priv->preamble_type,
>> pkt_type,
>> - 20,
>> priv->top_ofdm_basic_rate);
>> +   20,
>> priv->top_ofdm_basic_rate);
>> cts_time = ack_time =
>> vnt_get_frame_time(priv->preamble_type,
>> pkt_type, 14, priv->top_ofdm_basic_rate);
>> } else if (rsv_type == 3) {
>> cts_time = vnt_get_frame_time(priv->preamble_type,
>> pkt_type,
>> - 14,
>> priv->top_cck_basic_rate);
>> +   14,
>> priv->top_cck_basic_rate);
>> ack_time = vnt_get_frame_time(priv->preamble_type,
>> pkt_type,
>> - 14,
>> priv->top_ofdm_basic_rate);
>> +   14,
>> priv->top_ofdm_basic_rate);
>>
>> rrv_time = cts_time + ack_time + data_time + 2 *
>> priv->sifs;
>>
>> 

[PATCH v2] staging: vt6656: fixed an indentation coding style issue

2017-03-25 Thread Prasant Jalan

Replacing spaces with tabs for indetation to fix checkpatch.pl error
"code indent should use tabs where possible".


Signed-off-by: Prasant Jalan <prasant.ja...@gmail.com>
---

  v2:
- improved changelog comments
- fixed only one issue


 drivers/staging/vt6656/rxtx.c | 35 +++
 1 file changed, 19 insertions(+), 16 deletions(-)

diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c
index 1835cd1..7ebd1ee 100644
--- a/drivers/staging/vt6656/rxtx.c
+++ b/drivers/staging/vt6656/rxtx.c
@@ -114,7 +114,7 @@ static __le16 vnt_time_stamp_off(struct vnt_private *priv, 
u16 rate)
 }
 
 static u32 vnt_get_rsvtime(struct vnt_private *priv, u8 pkt_type,
-   u32 frame_length, u16 rate, int need_ack)
+   u32 frame_length, u16 rate, int need_ack)
 {
u32 data_time, ack_time;
 
@@ -135,14 +135,16 @@ static u32 vnt_get_rsvtime(struct vnt_private *priv, u8 
pkt_type,
 }
 
 static __le16 vnt_rxtx_rsvtime_le16(struct vnt_private *priv, u8 pkt_type,
-u32 frame_length, u16 rate, int need_ack)
+   u32 frame_length, u16 rate,
+   int need_ack)
 {
return cpu_to_le16((u16)vnt_get_rsvtime(priv, pkt_type,
frame_length, rate, need_ack));
 }
 
 static __le16 vnt_get_rtscts_rsvtime_le(struct vnt_private *priv,
-u8 rsv_type, u8 pkt_type, u32 
frame_length, u16 current_rate)
+   u8 rsv_type, u8 pkt_type,
+   u32 frame_length, u16 current_rate)
 {
u32 rrv_time, rts_time, cts_time, ack_time, data_time;
 
@@ -160,19 +162,19 @@ static __le16 vnt_get_rtscts_rsvtime_le(struct 
vnt_private *priv,
rts_time = vnt_get_frame_time(priv->preamble_type,
pkt_type, 20, priv->top_cck_basic_rate);
cts_time = vnt_get_frame_time(priv->preamble_type, pkt_type,
- 14, priv->top_cck_basic_rate);
+   14, priv->top_cck_basic_rate);
ack_time = vnt_get_frame_time(priv->preamble_type, pkt_type,
- 14, priv->top_ofdm_basic_rate);
+   14, priv->top_ofdm_basic_rate);
} else if (rsv_type == 2) {
rts_time = vnt_get_frame_time(priv->preamble_type, pkt_type,
- 20, priv->top_ofdm_basic_rate);
+   20, priv->top_ofdm_basic_rate);
cts_time = ack_time = vnt_get_frame_time(priv->preamble_type,
pkt_type, 14, priv->top_ofdm_basic_rate);
} else if (rsv_type == 3) {
cts_time = vnt_get_frame_time(priv->preamble_type, pkt_type,
- 14, priv->top_cck_basic_rate);
+   14, priv->top_cck_basic_rate);
ack_time = vnt_get_frame_time(priv->preamble_type, pkt_type,
- 14, priv->top_ofdm_basic_rate);
+   14, priv->top_ofdm_basic_rate);
 
rrv_time = cts_time + ack_time + data_time + 2 * priv->sifs;
 
@@ -227,7 +229,8 @@ static __le16 vnt_get_rtscts_duration_le(struct 
vnt_usb_send_context *context,
case RTSDUR_AA_F0:
case RTSDUR_AA_F1:
cts_time = vnt_get_frame_time(priv->preamble_type,
- pkt_type, 14, 
priv->top_ofdm_basic_rate);
+   pkt_type, 14,
+   priv->top_ofdm_basic_rate);
dur_time = cts_time + 2 * priv->sifs +
vnt_get_rsvtime(priv, pkt_type,
frame_length, rate, need_ack);
@@ -410,7 +413,7 @@ static u16 vnt_rxtx_rts_g_head(struct vnt_usb_send_context 
*tx_context,
u16 current_rate = tx_context->tx_rate;
 
vnt_get_phy_field(priv, rts_frame_len, priv->top_cck_basic_rate,
- PK_TYPE_11B, >b);
+   PK_TYPE_11B, >b);
vnt_get_phy_field(priv, rts_frame_len, priv->top_ofdm_basic_rate,
  tx_context->pkt_type, >a);
 
@@ -437,7 +440,7 @@ static u16 vnt_rxtx_rts_g_fb_head(struct 
vnt_usb_send_context *tx_context,
u16 rts_frame_len = 20;
 
vnt_get_phy_field(priv, rts_frame_len, priv->top_cck_basic_rate,
- PK_TYPE_11B, >b);
+   PK_TYPE_11B, >b);
vnt_get_phy_field(priv, rts_frame_len, priv->top_

[PATCH v2] staging: vt6656: fixed an indentation coding style issue

2017-03-25 Thread Prasant Jalan

Replacing spaces with tabs for indetation to fix checkpatch.pl error
"code indent should use tabs where possible".


Signed-off-by: Prasant Jalan 
---

  v2:
- improved changelog comments
- fixed only one issue


 drivers/staging/vt6656/rxtx.c | 35 +++
 1 file changed, 19 insertions(+), 16 deletions(-)

diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c
index 1835cd1..7ebd1ee 100644
--- a/drivers/staging/vt6656/rxtx.c
+++ b/drivers/staging/vt6656/rxtx.c
@@ -114,7 +114,7 @@ static __le16 vnt_time_stamp_off(struct vnt_private *priv, 
u16 rate)
 }
 
 static u32 vnt_get_rsvtime(struct vnt_private *priv, u8 pkt_type,
-   u32 frame_length, u16 rate, int need_ack)
+   u32 frame_length, u16 rate, int need_ack)
 {
u32 data_time, ack_time;
 
@@ -135,14 +135,16 @@ static u32 vnt_get_rsvtime(struct vnt_private *priv, u8 
pkt_type,
 }
 
 static __le16 vnt_rxtx_rsvtime_le16(struct vnt_private *priv, u8 pkt_type,
-u32 frame_length, u16 rate, int need_ack)
+   u32 frame_length, u16 rate,
+   int need_ack)
 {
return cpu_to_le16((u16)vnt_get_rsvtime(priv, pkt_type,
frame_length, rate, need_ack));
 }
 
 static __le16 vnt_get_rtscts_rsvtime_le(struct vnt_private *priv,
-u8 rsv_type, u8 pkt_type, u32 
frame_length, u16 current_rate)
+   u8 rsv_type, u8 pkt_type,
+   u32 frame_length, u16 current_rate)
 {
u32 rrv_time, rts_time, cts_time, ack_time, data_time;
 
@@ -160,19 +162,19 @@ static __le16 vnt_get_rtscts_rsvtime_le(struct 
vnt_private *priv,
rts_time = vnt_get_frame_time(priv->preamble_type,
pkt_type, 20, priv->top_cck_basic_rate);
cts_time = vnt_get_frame_time(priv->preamble_type, pkt_type,
- 14, priv->top_cck_basic_rate);
+   14, priv->top_cck_basic_rate);
ack_time = vnt_get_frame_time(priv->preamble_type, pkt_type,
- 14, priv->top_ofdm_basic_rate);
+   14, priv->top_ofdm_basic_rate);
} else if (rsv_type == 2) {
rts_time = vnt_get_frame_time(priv->preamble_type, pkt_type,
- 20, priv->top_ofdm_basic_rate);
+   20, priv->top_ofdm_basic_rate);
cts_time = ack_time = vnt_get_frame_time(priv->preamble_type,
pkt_type, 14, priv->top_ofdm_basic_rate);
} else if (rsv_type == 3) {
cts_time = vnt_get_frame_time(priv->preamble_type, pkt_type,
- 14, priv->top_cck_basic_rate);
+   14, priv->top_cck_basic_rate);
ack_time = vnt_get_frame_time(priv->preamble_type, pkt_type,
- 14, priv->top_ofdm_basic_rate);
+   14, priv->top_ofdm_basic_rate);
 
rrv_time = cts_time + ack_time + data_time + 2 * priv->sifs;
 
@@ -227,7 +229,8 @@ static __le16 vnt_get_rtscts_duration_le(struct 
vnt_usb_send_context *context,
case RTSDUR_AA_F0:
case RTSDUR_AA_F1:
cts_time = vnt_get_frame_time(priv->preamble_type,
- pkt_type, 14, 
priv->top_ofdm_basic_rate);
+   pkt_type, 14,
+   priv->top_ofdm_basic_rate);
dur_time = cts_time + 2 * priv->sifs +
vnt_get_rsvtime(priv, pkt_type,
frame_length, rate, need_ack);
@@ -410,7 +413,7 @@ static u16 vnt_rxtx_rts_g_head(struct vnt_usb_send_context 
*tx_context,
u16 current_rate = tx_context->tx_rate;
 
vnt_get_phy_field(priv, rts_frame_len, priv->top_cck_basic_rate,
- PK_TYPE_11B, >b);
+   PK_TYPE_11B, >b);
vnt_get_phy_field(priv, rts_frame_len, priv->top_ofdm_basic_rate,
  tx_context->pkt_type, >a);
 
@@ -437,7 +440,7 @@ static u16 vnt_rxtx_rts_g_fb_head(struct 
vnt_usb_send_context *tx_context,
u16 rts_frame_len = 20;
 
vnt_get_phy_field(priv, rts_frame_len, priv->top_cck_basic_rate,
- PK_TYPE_11B, >b);
+   PK_TYPE_11B, >b);
vnt_get_phy_field(priv, rts_frame_len, priv->top_ofdm_basic_rate,
  

Re: [PATCH] staging: vt6656: removed coding style errors

2017-03-23 Thread Prasant Jalan
On Thu, Mar 23, 2017 at 1:02 PM, Greg KH <gre...@linuxfoundation.org> wrote:
>
> On Wed, Mar 22, 2017 at 09:39:24PM +0530, Prasant Jalan wrote:
> > The patch replaces spaces with tabs as required by kernel coding
> > standards.
> >
> > Signed-off-by: Prasant Jalan <prasant.ja...@gmail.com>
> > ---
> >  drivers/staging/vt6656/rxtx.c | 40 ++--
> >  1 file changed, 22 insertions(+), 18 deletions(-)
>
> As this seems to be identical to the previous patch you sent, and I
> don't see a difference in the changelog comments, I'm dropping it from
> my queue.  Please note that all pending patches from you have been
> dropped, please resend all of them that still apply.
>

Hi Greg,

I'm sorry that I sent a bad patch again and thanks so much for your comments.

Should I be sending the patch with more verbose commit message?


Regards, Prasant


Re: [PATCH] staging: vt6656: removed coding style errors

2017-03-23 Thread Prasant Jalan
On Thu, Mar 23, 2017 at 1:02 PM, Greg KH  wrote:
>
> On Wed, Mar 22, 2017 at 09:39:24PM +0530, Prasant Jalan wrote:
> > The patch replaces spaces with tabs as required by kernel coding
> > standards.
> >
> > Signed-off-by: Prasant Jalan 
> > ---
> >  drivers/staging/vt6656/rxtx.c | 40 ++--
> >  1 file changed, 22 insertions(+), 18 deletions(-)
>
> As this seems to be identical to the previous patch you sent, and I
> don't see a difference in the changelog comments, I'm dropping it from
> my queue.  Please note that all pending patches from you have been
> dropped, please resend all of them that still apply.
>

Hi Greg,

I'm sorry that I sent a bad patch again and thanks so much for your comments.

Should I be sending the patch with more verbose commit message?


Regards, Prasant


[PATCH] staging: vt6656: removed coding style errors

2017-03-22 Thread Prasant Jalan
The patch replaces spaces with tabs as required by kernel coding
standards.

Signed-off-by: Prasant Jalan <prasant.ja...@gmail.com>
---
 drivers/staging/vt6656/rxtx.c | 40 ++--
 1 file changed, 22 insertions(+), 18 deletions(-)

diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c
index 1835cd1..0f89d4f 100644
--- a/drivers/staging/vt6656/rxtx.c
+++ b/drivers/staging/vt6656/rxtx.c
@@ -114,7 +114,7 @@ static __le16 vnt_time_stamp_off(struct vnt_private *priv, 
u16 rate)
 }
 
 static u32 vnt_get_rsvtime(struct vnt_private *priv, u8 pkt_type,
-   u32 frame_length, u16 rate, int need_ack)
+   u32 frame_length, u16 rate, int need_ack)
 {
u32 data_time, ack_time;
 
@@ -123,10 +123,12 @@ static u32 vnt_get_rsvtime(struct vnt_private *priv, u8 
pkt_type,
 
if (pkt_type == PK_TYPE_11B)
ack_time = vnt_get_frame_time(priv->preamble_type, pkt_type,
- 14, 
(u16)priv->top_cck_basic_rate);
+   14,
+   (u16)priv->top_cck_basic_rate);
else
ack_time = vnt_get_frame_time(priv->preamble_type, pkt_type,
- 14, 
(u16)priv->top_ofdm_basic_rate);
+   14,
+   (u16)priv->top_ofdm_basic_rate);
 
if (need_ack)
return data_time + priv->sifs + ack_time;
@@ -135,14 +137,15 @@ static u32 vnt_get_rsvtime(struct vnt_private *priv, u8 
pkt_type,
 }
 
 static __le16 vnt_rxtx_rsvtime_le16(struct vnt_private *priv, u8 pkt_type,
-u32 frame_length, u16 rate, int need_ack)
+   u32 frame_length, u16 rate, int need_ack)
 {
return cpu_to_le16((u16)vnt_get_rsvtime(priv, pkt_type,
frame_length, rate, need_ack));
 }
 
 static __le16 vnt_get_rtscts_rsvtime_le(struct vnt_private *priv,
-u8 rsv_type, u8 pkt_type, u32 
frame_length, u16 current_rate)
+   u8 rsv_type, u8 pkt_type,
+   u32 frame_length, u16 current_rate)
 {
u32 rrv_time, rts_time, cts_time, ack_time, data_time;
 
@@ -160,19 +163,19 @@ static __le16 vnt_get_rtscts_rsvtime_le(struct 
vnt_private *priv,
rts_time = vnt_get_frame_time(priv->preamble_type,
pkt_type, 20, priv->top_cck_basic_rate);
cts_time = vnt_get_frame_time(priv->preamble_type, pkt_type,
- 14, priv->top_cck_basic_rate);
+   14, priv->top_cck_basic_rate);
ack_time = vnt_get_frame_time(priv->preamble_type, pkt_type,
- 14, priv->top_ofdm_basic_rate);
+   14, priv->top_ofdm_basic_rate);
} else if (rsv_type == 2) {
rts_time = vnt_get_frame_time(priv->preamble_type, pkt_type,
- 20, priv->top_ofdm_basic_rate);
+   20, priv->top_ofdm_basic_rate);
cts_time = ack_time = vnt_get_frame_time(priv->preamble_type,
pkt_type, 14, priv->top_ofdm_basic_rate);
} else if (rsv_type == 3) {
cts_time = vnt_get_frame_time(priv->preamble_type, pkt_type,
- 14, priv->top_cck_basic_rate);
+   14, priv->top_cck_basic_rate);
ack_time = vnt_get_frame_time(priv->preamble_type, pkt_type,
- 14, priv->top_ofdm_basic_rate);
+   14, priv->top_ofdm_basic_rate);
 
rrv_time = cts_time + ack_time + data_time + 2 * priv->sifs;
 
@@ -227,7 +230,8 @@ static __le16 vnt_get_rtscts_duration_le(struct 
vnt_usb_send_context *context,
case RTSDUR_AA_F0:
case RTSDUR_AA_F1:
cts_time = vnt_get_frame_time(priv->preamble_type,
- pkt_type, 14, 
priv->top_ofdm_basic_rate);
+   pkt_type, 14,
+   priv->top_ofdm_basic_rate);
dur_time = cts_time + 2 * priv->sifs +
vnt_get_rsvtime(priv, pkt_type,
frame_length, rate, need_ack);
@@ -410,7 +414,7 @@ static u16 vnt_rxtx_rts_g_head(struct vnt_usb_send_context 
*tx_context,
u16 current_rate = tx_context->tx_rate;
 
vnt_

[PATCH] staging: vt6656: removed coding style errors

2017-03-22 Thread Prasant Jalan
The patch replaces spaces with tabs as required by kernel coding
standards.

Signed-off-by: Prasant Jalan 
---
 drivers/staging/vt6656/rxtx.c | 40 ++--
 1 file changed, 22 insertions(+), 18 deletions(-)

diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c
index 1835cd1..0f89d4f 100644
--- a/drivers/staging/vt6656/rxtx.c
+++ b/drivers/staging/vt6656/rxtx.c
@@ -114,7 +114,7 @@ static __le16 vnt_time_stamp_off(struct vnt_private *priv, 
u16 rate)
 }
 
 static u32 vnt_get_rsvtime(struct vnt_private *priv, u8 pkt_type,
-   u32 frame_length, u16 rate, int need_ack)
+   u32 frame_length, u16 rate, int need_ack)
 {
u32 data_time, ack_time;
 
@@ -123,10 +123,12 @@ static u32 vnt_get_rsvtime(struct vnt_private *priv, u8 
pkt_type,
 
if (pkt_type == PK_TYPE_11B)
ack_time = vnt_get_frame_time(priv->preamble_type, pkt_type,
- 14, 
(u16)priv->top_cck_basic_rate);
+   14,
+   (u16)priv->top_cck_basic_rate);
else
ack_time = vnt_get_frame_time(priv->preamble_type, pkt_type,
- 14, 
(u16)priv->top_ofdm_basic_rate);
+   14,
+   (u16)priv->top_ofdm_basic_rate);
 
if (need_ack)
return data_time + priv->sifs + ack_time;
@@ -135,14 +137,15 @@ static u32 vnt_get_rsvtime(struct vnt_private *priv, u8 
pkt_type,
 }
 
 static __le16 vnt_rxtx_rsvtime_le16(struct vnt_private *priv, u8 pkt_type,
-u32 frame_length, u16 rate, int need_ack)
+   u32 frame_length, u16 rate, int need_ack)
 {
return cpu_to_le16((u16)vnt_get_rsvtime(priv, pkt_type,
frame_length, rate, need_ack));
 }
 
 static __le16 vnt_get_rtscts_rsvtime_le(struct vnt_private *priv,
-u8 rsv_type, u8 pkt_type, u32 
frame_length, u16 current_rate)
+   u8 rsv_type, u8 pkt_type,
+   u32 frame_length, u16 current_rate)
 {
u32 rrv_time, rts_time, cts_time, ack_time, data_time;
 
@@ -160,19 +163,19 @@ static __le16 vnt_get_rtscts_rsvtime_le(struct 
vnt_private *priv,
rts_time = vnt_get_frame_time(priv->preamble_type,
pkt_type, 20, priv->top_cck_basic_rate);
cts_time = vnt_get_frame_time(priv->preamble_type, pkt_type,
- 14, priv->top_cck_basic_rate);
+   14, priv->top_cck_basic_rate);
ack_time = vnt_get_frame_time(priv->preamble_type, pkt_type,
- 14, priv->top_ofdm_basic_rate);
+   14, priv->top_ofdm_basic_rate);
} else if (rsv_type == 2) {
rts_time = vnt_get_frame_time(priv->preamble_type, pkt_type,
- 20, priv->top_ofdm_basic_rate);
+   20, priv->top_ofdm_basic_rate);
cts_time = ack_time = vnt_get_frame_time(priv->preamble_type,
pkt_type, 14, priv->top_ofdm_basic_rate);
} else if (rsv_type == 3) {
cts_time = vnt_get_frame_time(priv->preamble_type, pkt_type,
- 14, priv->top_cck_basic_rate);
+   14, priv->top_cck_basic_rate);
ack_time = vnt_get_frame_time(priv->preamble_type, pkt_type,
- 14, priv->top_ofdm_basic_rate);
+   14, priv->top_ofdm_basic_rate);
 
rrv_time = cts_time + ack_time + data_time + 2 * priv->sifs;
 
@@ -227,7 +230,8 @@ static __le16 vnt_get_rtscts_duration_le(struct 
vnt_usb_send_context *context,
case RTSDUR_AA_F0:
case RTSDUR_AA_F1:
cts_time = vnt_get_frame_time(priv->preamble_type,
- pkt_type, 14, 
priv->top_ofdm_basic_rate);
+   pkt_type, 14,
+   priv->top_ofdm_basic_rate);
dur_time = cts_time + 2 * priv->sifs +
vnt_get_rsvtime(priv, pkt_type,
frame_length, rate, need_ack);
@@ -410,7 +414,7 @@ static u16 vnt_rxtx_rts_g_head(struct vnt_usb_send_context 
*tx_context,
u16 current_rate = tx_context->tx_rate;
 
vnt_get_ph

[PATCH] drivers: staging: vt6656: fixed coding style errors

2017-03-21 Thread Prasant Jalan
This patch replaces spaces with tabs for indentation as per kernel
coding standards.

Signed-off-by: Prasant Jalan <prasant.ja...@gmail.com>
---
 drivers/staging/vt6656/rf.c | 11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/vt6656/rf.c b/drivers/staging/vt6656/rf.c
index 068c1c8..0e3a62a 100644
--- a/drivers/staging/vt6656/rf.c
+++ b/drivers/staging/vt6656/rf.c
@@ -876,7 +876,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr1, length1);
 
vnt_control_out(priv, MESSAGE_TYPE_WRITE, 0,
-   MESSAGE_REQUEST_RF_INIT, length1, array);
+   MESSAGE_REQUEST_RF_INIT, length1, array);
 
/* Channel Table 0 */
value = 0;
@@ -889,7 +889,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr2, length);
 
vnt_control_out(priv, MESSAGE_TYPE_WRITE,
-   value, MESSAGE_REQUEST_RF_CH0, length, array);
+   value, MESSAGE_REQUEST_RF_CH0, length, array);
 
length2 -= length;
value += length;
@@ -907,7 +907,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr3, length);
 
vnt_control_out(priv, MESSAGE_TYPE_WRITE,
-   value, MESSAGE_REQUEST_RF_CH1, length, array);
+   value, MESSAGE_REQUEST_RF_CH1, length, array);
 
length3 -= length;
value += length;
@@ -924,7 +924,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
 
/* Init Table 2 */
vnt_control_out(priv, MESSAGE_TYPE_WRITE,
-   0, MESSAGE_REQUEST_RF_INIT2, length1, array);
+   0, MESSAGE_REQUEST_RF_INIT2, length1, array);
 
/* Channel Table 0 */
value = 0;
@@ -937,7 +937,8 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr2, length);
 
vnt_control_out(priv, MESSAGE_TYPE_WRITE,
-   value, MESSAGE_REQUEST_RF_CH2, length, 
array);
+   value, MESSAGE_REQUEST_RF_CH2, length,
+   array);
 
length2 -= length;
value += length;
-- 
2.7.4



[PATCH] drivers: staging: vt6656: fixed coding style errors

2017-03-21 Thread Prasant Jalan
This patch replaces spaces with tabs for indentation as per kernel
coding standards.

Signed-off-by: Prasant Jalan 
---
 drivers/staging/vt6656/rf.c | 11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/vt6656/rf.c b/drivers/staging/vt6656/rf.c
index 068c1c8..0e3a62a 100644
--- a/drivers/staging/vt6656/rf.c
+++ b/drivers/staging/vt6656/rf.c
@@ -876,7 +876,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr1, length1);
 
vnt_control_out(priv, MESSAGE_TYPE_WRITE, 0,
-   MESSAGE_REQUEST_RF_INIT, length1, array);
+   MESSAGE_REQUEST_RF_INIT, length1, array);
 
/* Channel Table 0 */
value = 0;
@@ -889,7 +889,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr2, length);
 
vnt_control_out(priv, MESSAGE_TYPE_WRITE,
-   value, MESSAGE_REQUEST_RF_CH0, length, array);
+   value, MESSAGE_REQUEST_RF_CH0, length, array);
 
length2 -= length;
value += length;
@@ -907,7 +907,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr3, length);
 
vnt_control_out(priv, MESSAGE_TYPE_WRITE,
-   value, MESSAGE_REQUEST_RF_CH1, length, array);
+   value, MESSAGE_REQUEST_RF_CH1, length, array);
 
length3 -= length;
value += length;
@@ -924,7 +924,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
 
/* Init Table 2 */
vnt_control_out(priv, MESSAGE_TYPE_WRITE,
-   0, MESSAGE_REQUEST_RF_INIT2, length1, array);
+   0, MESSAGE_REQUEST_RF_INIT2, length1, array);
 
/* Channel Table 0 */
value = 0;
@@ -937,7 +937,8 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr2, length);
 
vnt_control_out(priv, MESSAGE_TYPE_WRITE,
-   value, MESSAGE_REQUEST_RF_CH2, length, 
array);
+   value, MESSAGE_REQUEST_RF_CH2, length,
+   array);
 
length2 -= length;
value += length;
-- 
2.7.4



[PATCH v2] drivers: staging: vt6656: fixed coding style errors

2017-03-21 Thread Prasant Jalan
This patch replaces spaces with tabs for indentation as per kernel
coding standards.

Signed-off-by: Prasant Jalan <prasant.ja...@gmail.com>
---
 drivers/staging/vt6656/rf.c | 11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/vt6656/rf.c b/drivers/staging/vt6656/rf.c
index 068c1c8..0e3a62a 100644
--- a/drivers/staging/vt6656/rf.c
+++ b/drivers/staging/vt6656/rf.c
@@ -876,7 +876,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr1, length1);
 
vnt_control_out(priv, MESSAGE_TYPE_WRITE, 0,
-   MESSAGE_REQUEST_RF_INIT, length1, array);
+   MESSAGE_REQUEST_RF_INIT, length1, array);
 
/* Channel Table 0 */
value = 0;
@@ -889,7 +889,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr2, length);
 
vnt_control_out(priv, MESSAGE_TYPE_WRITE,
-   value, MESSAGE_REQUEST_RF_CH0, length, array);
+   value, MESSAGE_REQUEST_RF_CH0, length, array);
 
length2 -= length;
value += length;
@@ -907,7 +907,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr3, length);
 
vnt_control_out(priv, MESSAGE_TYPE_WRITE,
-   value, MESSAGE_REQUEST_RF_CH1, length, array);
+   value, MESSAGE_REQUEST_RF_CH1, length, array);
 
length3 -= length;
value += length;
@@ -924,7 +924,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
 
/* Init Table 2 */
vnt_control_out(priv, MESSAGE_TYPE_WRITE,
-   0, MESSAGE_REQUEST_RF_INIT2, length1, array);
+   0, MESSAGE_REQUEST_RF_INIT2, length1, array);
 
/* Channel Table 0 */
value = 0;
@@ -937,7 +937,8 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr2, length);
 
vnt_control_out(priv, MESSAGE_TYPE_WRITE,
-   value, MESSAGE_REQUEST_RF_CH2, length, 
array);
+   value, MESSAGE_REQUEST_RF_CH2, length,
+   array);
 
length2 -= length;
value += length;
-- 
2.7.4



[PATCH v2] drivers: staging: vt6656: fixed coding style errors

2017-03-21 Thread Prasant Jalan
This patch replaces spaces with tabs for indentation as per kernel
coding standards.

Signed-off-by: Prasant Jalan 
---
 drivers/staging/vt6656/rf.c | 11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/vt6656/rf.c b/drivers/staging/vt6656/rf.c
index 068c1c8..0e3a62a 100644
--- a/drivers/staging/vt6656/rf.c
+++ b/drivers/staging/vt6656/rf.c
@@ -876,7 +876,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr1, length1);
 
vnt_control_out(priv, MESSAGE_TYPE_WRITE, 0,
-   MESSAGE_REQUEST_RF_INIT, length1, array);
+   MESSAGE_REQUEST_RF_INIT, length1, array);
 
/* Channel Table 0 */
value = 0;
@@ -889,7 +889,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr2, length);
 
vnt_control_out(priv, MESSAGE_TYPE_WRITE,
-   value, MESSAGE_REQUEST_RF_CH0, length, array);
+   value, MESSAGE_REQUEST_RF_CH0, length, array);
 
length2 -= length;
value += length;
@@ -907,7 +907,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr3, length);
 
vnt_control_out(priv, MESSAGE_TYPE_WRITE,
-   value, MESSAGE_REQUEST_RF_CH1, length, array);
+   value, MESSAGE_REQUEST_RF_CH1, length, array);
 
length3 -= length;
value += length;
@@ -924,7 +924,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
 
/* Init Table 2 */
vnt_control_out(priv, MESSAGE_TYPE_WRITE,
-   0, MESSAGE_REQUEST_RF_INIT2, length1, array);
+   0, MESSAGE_REQUEST_RF_INIT2, length1, array);
 
/* Channel Table 0 */
value = 0;
@@ -937,7 +937,8 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr2, length);
 
vnt_control_out(priv, MESSAGE_TYPE_WRITE,
-   value, MESSAGE_REQUEST_RF_CH2, length, 
array);
+   value, MESSAGE_REQUEST_RF_CH2, length,
+   array);
 
length2 -= length;
value += length;
-- 
2.7.4



[PATCH] drivers: staging: vt6656: fixed coding style errors

2017-03-21 Thread Prasant Jalan
This patch replaces spaces with tabs for indentation as per kernel
coding standards.

Signed-off-by: Prasant Jalan <prasant.ja...@gmail.com>
---
 drivers/staging/vt6656/rf.c | 11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/vt6656/rf.c b/drivers/staging/vt6656/rf.c
index 068c1c8..0e3a62a 100644
--- a/drivers/staging/vt6656/rf.c
+++ b/drivers/staging/vt6656/rf.c
@@ -876,7 +876,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr1, length1);
 
vnt_control_out(priv, MESSAGE_TYPE_WRITE, 0,
-   MESSAGE_REQUEST_RF_INIT, length1, array);
+   MESSAGE_REQUEST_RF_INIT, length1, array);
 
/* Channel Table 0 */
value = 0;
@@ -889,7 +889,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr2, length);
 
vnt_control_out(priv, MESSAGE_TYPE_WRITE,
-   value, MESSAGE_REQUEST_RF_CH0, length, array);
+   value, MESSAGE_REQUEST_RF_CH0, length, array);
 
length2 -= length;
value += length;
@@ -907,7 +907,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr3, length);
 
vnt_control_out(priv, MESSAGE_TYPE_WRITE,
-   value, MESSAGE_REQUEST_RF_CH1, length, array);
+   value, MESSAGE_REQUEST_RF_CH1, length, array);
 
length3 -= length;
value += length;
@@ -924,7 +924,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
 
/* Init Table 2 */
vnt_control_out(priv, MESSAGE_TYPE_WRITE,
-   0, MESSAGE_REQUEST_RF_INIT2, length1, array);
+   0, MESSAGE_REQUEST_RF_INIT2, length1, array);
 
/* Channel Table 0 */
value = 0;
@@ -937,7 +937,8 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr2, length);
 
vnt_control_out(priv, MESSAGE_TYPE_WRITE,
-   value, MESSAGE_REQUEST_RF_CH2, length, 
array);
+   value, MESSAGE_REQUEST_RF_CH2, length,
+   array);
 
length2 -= length;
value += length;
-- 
2.7.4



[PATCH] drivers: staging: vt6656: fixed coding style errors

2017-03-21 Thread Prasant Jalan
This patch replaces spaces with tabs for indentation as per kernel
coding standards.

Signed-off-by: Prasant Jalan 
---
 drivers/staging/vt6656/rf.c | 11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/vt6656/rf.c b/drivers/staging/vt6656/rf.c
index 068c1c8..0e3a62a 100644
--- a/drivers/staging/vt6656/rf.c
+++ b/drivers/staging/vt6656/rf.c
@@ -876,7 +876,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr1, length1);
 
vnt_control_out(priv, MESSAGE_TYPE_WRITE, 0,
-   MESSAGE_REQUEST_RF_INIT, length1, array);
+   MESSAGE_REQUEST_RF_INIT, length1, array);
 
/* Channel Table 0 */
value = 0;
@@ -889,7 +889,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr2, length);
 
vnt_control_out(priv, MESSAGE_TYPE_WRITE,
-   value, MESSAGE_REQUEST_RF_CH0, length, array);
+   value, MESSAGE_REQUEST_RF_CH0, length, array);
 
length2 -= length;
value += length;
@@ -907,7 +907,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr3, length);
 
vnt_control_out(priv, MESSAGE_TYPE_WRITE,
-   value, MESSAGE_REQUEST_RF_CH1, length, array);
+   value, MESSAGE_REQUEST_RF_CH1, length, array);
 
length3 -= length;
value += length;
@@ -924,7 +924,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
 
/* Init Table 2 */
vnt_control_out(priv, MESSAGE_TYPE_WRITE,
-   0, MESSAGE_REQUEST_RF_INIT2, length1, array);
+   0, MESSAGE_REQUEST_RF_INIT2, length1, array);
 
/* Channel Table 0 */
value = 0;
@@ -937,7 +937,8 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr2, length);
 
vnt_control_out(priv, MESSAGE_TYPE_WRITE,
-   value, MESSAGE_REQUEST_RF_CH2, length, 
array);
+   value, MESSAGE_REQUEST_RF_CH2, length,
+   array);
 
length2 -= length;
value += length;
-- 
2.7.4



[PATCH] drivers: staging: vt6656: fxed coding style errors

2017-03-21 Thread Prasant Jalan
This patch replaces spaces with tabs for indentation as per kernel
coding standards.

Signed-off-by: Prasant Jalan <prasant.ja...@gmail.com>
---
 drivers/staging/vt6656/rf.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/vt6656/rf.c b/drivers/staging/vt6656/rf.c
index 068c1c8..f69bced 100644
--- a/drivers/staging/vt6656/rf.c
+++ b/drivers/staging/vt6656/rf.c
@@ -876,7 +876,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr1, length1);
 
vnt_control_out(priv, MESSAGE_TYPE_WRITE, 0,
-   MESSAGE_REQUEST_RF_INIT, length1, array);
+   MESSAGE_REQUEST_RF_INIT, length1, array);
 
/* Channel Table 0 */
value = 0;
@@ -889,7 +889,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr2, length);
 
vnt_control_out(priv, MESSAGE_TYPE_WRITE,
-   value, MESSAGE_REQUEST_RF_CH0, length, array);
+   value, MESSAGE_REQUEST_RF_CH0, length, array);
 
length2 -= length;
value += length;
@@ -907,7 +907,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr3, length);
 
vnt_control_out(priv, MESSAGE_TYPE_WRITE,
-   value, MESSAGE_REQUEST_RF_CH1, length, array);
+   value, MESSAGE_REQUEST_RF_CH1, length, array);
 
length3 -= length;
value += length;
@@ -924,7 +924,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
 
/* Init Table 2 */
vnt_control_out(priv, MESSAGE_TYPE_WRITE,
-   0, MESSAGE_REQUEST_RF_INIT2, length1, array);
+   0, MESSAGE_REQUEST_RF_INIT2, length1, array);
 
/* Channel Table 0 */
value = 0;
@@ -937,7 +937,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr2, length);
 
vnt_control_out(priv, MESSAGE_TYPE_WRITE,
-   value, MESSAGE_REQUEST_RF_CH2, length, 
array);
+   value, MESSAGE_REQUEST_RF_CH2, length, array);
 
length2 -= length;
value += length;
-- 
2.7.4



[PATCH] drivers: staging: vt6656: fxed coding style errors

2017-03-21 Thread Prasant Jalan
This patch replaces spaces with tabs for indentation as per kernel
coding standards.

Signed-off-by: Prasant Jalan 
---
 drivers/staging/vt6656/rf.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/vt6656/rf.c b/drivers/staging/vt6656/rf.c
index 068c1c8..f69bced 100644
--- a/drivers/staging/vt6656/rf.c
+++ b/drivers/staging/vt6656/rf.c
@@ -876,7 +876,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr1, length1);
 
vnt_control_out(priv, MESSAGE_TYPE_WRITE, 0,
-   MESSAGE_REQUEST_RF_INIT, length1, array);
+   MESSAGE_REQUEST_RF_INIT, length1, array);
 
/* Channel Table 0 */
value = 0;
@@ -889,7 +889,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr2, length);
 
vnt_control_out(priv, MESSAGE_TYPE_WRITE,
-   value, MESSAGE_REQUEST_RF_CH0, length, array);
+   value, MESSAGE_REQUEST_RF_CH0, length, array);
 
length2 -= length;
value += length;
@@ -907,7 +907,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr3, length);
 
vnt_control_out(priv, MESSAGE_TYPE_WRITE,
-   value, MESSAGE_REQUEST_RF_CH1, length, array);
+   value, MESSAGE_REQUEST_RF_CH1, length, array);
 
length3 -= length;
value += length;
@@ -924,7 +924,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
 
/* Init Table 2 */
vnt_control_out(priv, MESSAGE_TYPE_WRITE,
-   0, MESSAGE_REQUEST_RF_INIT2, length1, array);
+   0, MESSAGE_REQUEST_RF_INIT2, length1, array);
 
/* Channel Table 0 */
value = 0;
@@ -937,7 +937,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr2, length);
 
vnt_control_out(priv, MESSAGE_TYPE_WRITE,
-   value, MESSAGE_REQUEST_RF_CH2, length, 
array);
+   value, MESSAGE_REQUEST_RF_CH2, length, array);
 
length2 -= length;
value += length;
-- 
2.7.4



[PATCH] drivers: staging: vt6656: fixed coding style errors

2017-03-21 Thread Prasant Jalan
This patch fixes the following:
- Replace spaces with tabs for indentation
- adds spaces around symbol '-'
- uses __func__ macro to print function name
- truncated the line such that it is within 80 char limit
as per kernel coding standards.

Signed-off-by: Prasant Jalan <prasant.ja...@gmail.com>
---
 drivers/staging/vt6656/rf.c | 19 ++-
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/vt6656/rf.c b/drivers/staging/vt6656/rf.c
index 068c1c8..3a9d19a 100644
--- a/drivers/staging/vt6656/rf.c
+++ b/drivers/staging/vt6656/rf.c
@@ -611,7 +611,7 @@ int vnt_rf_write_embedded(struct vnt_private *priv, u32 
data)
reg_data[3] = (u8)(data >> 24);
 
vnt_control_out(priv, MESSAGE_TYPE_WRITE_IFRF,
-   0, 0, ARRAY_SIZE(reg_data), reg_data);
+   0, 0, ARRAY_SIZE(reg_data), reg_data);
 
return true;
 }
@@ -643,9 +643,9 @@ int vnt_rf_setpower(struct vnt_private *priv, u32 rate, u32 
channel)
case RATE_48M:
case RATE_54M:
if (channel > CB_MAX_CHANNEL_24G)
-   power = priv->ofdm_a_pwr_tbl[channel-15];
+   power = priv->ofdm_a_pwr_tbl[channel - 15];
else
-   power = priv->ofdm_pwr_tbl[channel-1];
+   power = priv->ofdm_pwr_tbl[channel - 1];
break;
}
 
@@ -771,7 +771,7 @@ int vnt_rf_set_txpower(struct vnt_private *priv, u8 power, 
u32 rate)
ret &= vnt_rf_write_embedded(priv, 0x015C0800);
} else {
dev_dbg(>usb->dev,
-   " vnt_rf_set_txpower> 11G mode\n");
+   " %s> 11G mode\n", __func__);
 
power_setting = ((0x3f - power) << 20) | (0x7 << 8);
 
@@ -876,7 +876,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr1, length1);
 
vnt_control_out(priv, MESSAGE_TYPE_WRITE, 0,
-   MESSAGE_REQUEST_RF_INIT, length1, array);
+   MESSAGE_REQUEST_RF_INIT, length1, array);
 
/* Channel Table 0 */
value = 0;
@@ -889,7 +889,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr2, length);
 
vnt_control_out(priv, MESSAGE_TYPE_WRITE,
-   value, MESSAGE_REQUEST_RF_CH0, length, array);
+   value, MESSAGE_REQUEST_RF_CH0, length, array);
 
length2 -= length;
value += length;
@@ -907,7 +907,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr3, length);
 
vnt_control_out(priv, MESSAGE_TYPE_WRITE,
-   value, MESSAGE_REQUEST_RF_CH1, length, array);
+   value, MESSAGE_REQUEST_RF_CH1, length, array);
 
length3 -= length;
value += length;
@@ -924,7 +924,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
 
/* Init Table 2 */
vnt_control_out(priv, MESSAGE_TYPE_WRITE,
-   0, MESSAGE_REQUEST_RF_INIT2, length1, array);
+   0, MESSAGE_REQUEST_RF_INIT2, length1, array);
 
/* Channel Table 0 */
value = 0;
@@ -937,7 +937,8 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr2, length);
 
vnt_control_out(priv, MESSAGE_TYPE_WRITE,
-   value, MESSAGE_REQUEST_RF_CH2, length, 
array);
+   value, MESSAGE_REQUEST_RF_CH2,
+   length, array);
 
length2 -= length;
value += length;
-- 
2.7.4



[PATCH] drivers: staging: vt6656: fixed coding style errors

2017-03-21 Thread Prasant Jalan
This patch fixes the following:
- Replace spaces with tabs for indentation
- adds spaces around symbol '-'
- uses __func__ macro to print function name
- truncated the line such that it is within 80 char limit
as per kernel coding standards.

Signed-off-by: Prasant Jalan 
---
 drivers/staging/vt6656/rf.c | 19 ++-
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/vt6656/rf.c b/drivers/staging/vt6656/rf.c
index 068c1c8..3a9d19a 100644
--- a/drivers/staging/vt6656/rf.c
+++ b/drivers/staging/vt6656/rf.c
@@ -611,7 +611,7 @@ int vnt_rf_write_embedded(struct vnt_private *priv, u32 
data)
reg_data[3] = (u8)(data >> 24);
 
vnt_control_out(priv, MESSAGE_TYPE_WRITE_IFRF,
-   0, 0, ARRAY_SIZE(reg_data), reg_data);
+   0, 0, ARRAY_SIZE(reg_data), reg_data);
 
return true;
 }
@@ -643,9 +643,9 @@ int vnt_rf_setpower(struct vnt_private *priv, u32 rate, u32 
channel)
case RATE_48M:
case RATE_54M:
if (channel > CB_MAX_CHANNEL_24G)
-   power = priv->ofdm_a_pwr_tbl[channel-15];
+   power = priv->ofdm_a_pwr_tbl[channel - 15];
else
-   power = priv->ofdm_pwr_tbl[channel-1];
+   power = priv->ofdm_pwr_tbl[channel - 1];
break;
}
 
@@ -771,7 +771,7 @@ int vnt_rf_set_txpower(struct vnt_private *priv, u8 power, 
u32 rate)
ret &= vnt_rf_write_embedded(priv, 0x015C0800);
} else {
dev_dbg(>usb->dev,
-   " vnt_rf_set_txpower> 11G mode\n");
+   " %s> 11G mode\n", __func__);
 
power_setting = ((0x3f - power) << 20) | (0x7 << 8);
 
@@ -876,7 +876,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr1, length1);
 
vnt_control_out(priv, MESSAGE_TYPE_WRITE, 0,
-   MESSAGE_REQUEST_RF_INIT, length1, array);
+   MESSAGE_REQUEST_RF_INIT, length1, array);
 
/* Channel Table 0 */
value = 0;
@@ -889,7 +889,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr2, length);
 
vnt_control_out(priv, MESSAGE_TYPE_WRITE,
-   value, MESSAGE_REQUEST_RF_CH0, length, array);
+   value, MESSAGE_REQUEST_RF_CH0, length, array);
 
length2 -= length;
value += length;
@@ -907,7 +907,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr3, length);
 
vnt_control_out(priv, MESSAGE_TYPE_WRITE,
-   value, MESSAGE_REQUEST_RF_CH1, length, array);
+   value, MESSAGE_REQUEST_RF_CH1, length, array);
 
length3 -= length;
value += length;
@@ -924,7 +924,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
 
/* Init Table 2 */
vnt_control_out(priv, MESSAGE_TYPE_WRITE,
-   0, MESSAGE_REQUEST_RF_INIT2, length1, array);
+   0, MESSAGE_REQUEST_RF_INIT2, length1, array);
 
/* Channel Table 0 */
value = 0;
@@ -937,7 +937,8 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr2, length);
 
vnt_control_out(priv, MESSAGE_TYPE_WRITE,
-   value, MESSAGE_REQUEST_RF_CH2, length, 
array);
+   value, MESSAGE_REQUEST_RF_CH2,
+   length, array);
 
length2 -= length;
value += length;
-- 
2.7.4



[PATCH] drivers: staging: vt6656: fixed coding style errors

2017-03-21 Thread Prasant Jalan
Fixed coding style errors. No errors with checkpatch.pl

Signed-off-by: Prasant Jalan <prasant.ja...@gmail.com>
---
 drivers/staging/vt6656/rf.c | 19 ++-
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/vt6656/rf.c b/drivers/staging/vt6656/rf.c
index 068c1c8..3a9d19a 100644
--- a/drivers/staging/vt6656/rf.c
+++ b/drivers/staging/vt6656/rf.c
@@ -611,7 +611,7 @@ int vnt_rf_write_embedded(struct vnt_private *priv, u32 
data)
reg_data[3] = (u8)(data >> 24);
 
vnt_control_out(priv, MESSAGE_TYPE_WRITE_IFRF,
-   0, 0, ARRAY_SIZE(reg_data), reg_data);
+   0, 0, ARRAY_SIZE(reg_data), reg_data);
 
return true;
 }
@@ -643,9 +643,9 @@ int vnt_rf_setpower(struct vnt_private *priv, u32 rate, u32 
channel)
case RATE_48M:
case RATE_54M:
if (channel > CB_MAX_CHANNEL_24G)
-   power = priv->ofdm_a_pwr_tbl[channel-15];
+   power = priv->ofdm_a_pwr_tbl[channel - 15];
else
-   power = priv->ofdm_pwr_tbl[channel-1];
+   power = priv->ofdm_pwr_tbl[channel - 1];
break;
}
 
@@ -771,7 +771,7 @@ int vnt_rf_set_txpower(struct vnt_private *priv, u8 power, 
u32 rate)
ret &= vnt_rf_write_embedded(priv, 0x015C0800);
} else {
dev_dbg(>usb->dev,
-   " vnt_rf_set_txpower> 11G mode\n");
+   " %s> 11G mode\n", __func__);
 
power_setting = ((0x3f - power) << 20) | (0x7 << 8);
 
@@ -876,7 +876,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr1, length1);
 
vnt_control_out(priv, MESSAGE_TYPE_WRITE, 0,
-   MESSAGE_REQUEST_RF_INIT, length1, array);
+   MESSAGE_REQUEST_RF_INIT, length1, array);
 
/* Channel Table 0 */
value = 0;
@@ -889,7 +889,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr2, length);
 
vnt_control_out(priv, MESSAGE_TYPE_WRITE,
-   value, MESSAGE_REQUEST_RF_CH0, length, array);
+   value, MESSAGE_REQUEST_RF_CH0, length, array);
 
length2 -= length;
value += length;
@@ -907,7 +907,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr3, length);
 
vnt_control_out(priv, MESSAGE_TYPE_WRITE,
-   value, MESSAGE_REQUEST_RF_CH1, length, array);
+   value, MESSAGE_REQUEST_RF_CH1, length, array);
 
length3 -= length;
value += length;
@@ -924,7 +924,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
 
/* Init Table 2 */
vnt_control_out(priv, MESSAGE_TYPE_WRITE,
-   0, MESSAGE_REQUEST_RF_INIT2, length1, array);
+   0, MESSAGE_REQUEST_RF_INIT2, length1, array);
 
/* Channel Table 0 */
value = 0;
@@ -937,7 +937,8 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr2, length);
 
vnt_control_out(priv, MESSAGE_TYPE_WRITE,
-   value, MESSAGE_REQUEST_RF_CH2, length, 
array);
+   value, MESSAGE_REQUEST_RF_CH2,
+   length, array);
 
length2 -= length;
value += length;
-- 
2.7.4



[PATCH] drivers: staging: vt6656: fixed coding style errors

2017-03-21 Thread Prasant Jalan
Fixed coding style errors. No errors with checkpatch.pl

Signed-off-by: Prasant Jalan 
---
 drivers/staging/vt6656/rf.c | 19 ++-
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/vt6656/rf.c b/drivers/staging/vt6656/rf.c
index 068c1c8..3a9d19a 100644
--- a/drivers/staging/vt6656/rf.c
+++ b/drivers/staging/vt6656/rf.c
@@ -611,7 +611,7 @@ int vnt_rf_write_embedded(struct vnt_private *priv, u32 
data)
reg_data[3] = (u8)(data >> 24);
 
vnt_control_out(priv, MESSAGE_TYPE_WRITE_IFRF,
-   0, 0, ARRAY_SIZE(reg_data), reg_data);
+   0, 0, ARRAY_SIZE(reg_data), reg_data);
 
return true;
 }
@@ -643,9 +643,9 @@ int vnt_rf_setpower(struct vnt_private *priv, u32 rate, u32 
channel)
case RATE_48M:
case RATE_54M:
if (channel > CB_MAX_CHANNEL_24G)
-   power = priv->ofdm_a_pwr_tbl[channel-15];
+   power = priv->ofdm_a_pwr_tbl[channel - 15];
else
-   power = priv->ofdm_pwr_tbl[channel-1];
+   power = priv->ofdm_pwr_tbl[channel - 1];
break;
}
 
@@ -771,7 +771,7 @@ int vnt_rf_set_txpower(struct vnt_private *priv, u8 power, 
u32 rate)
ret &= vnt_rf_write_embedded(priv, 0x015C0800);
} else {
dev_dbg(>usb->dev,
-   " vnt_rf_set_txpower> 11G mode\n");
+   " %s> 11G mode\n", __func__);
 
power_setting = ((0x3f - power) << 20) | (0x7 << 8);
 
@@ -876,7 +876,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr1, length1);
 
vnt_control_out(priv, MESSAGE_TYPE_WRITE, 0,
-   MESSAGE_REQUEST_RF_INIT, length1, array);
+   MESSAGE_REQUEST_RF_INIT, length1, array);
 
/* Channel Table 0 */
value = 0;
@@ -889,7 +889,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr2, length);
 
vnt_control_out(priv, MESSAGE_TYPE_WRITE,
-   value, MESSAGE_REQUEST_RF_CH0, length, array);
+   value, MESSAGE_REQUEST_RF_CH0, length, array);
 
length2 -= length;
value += length;
@@ -907,7 +907,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr3, length);
 
vnt_control_out(priv, MESSAGE_TYPE_WRITE,
-   value, MESSAGE_REQUEST_RF_CH1, length, array);
+   value, MESSAGE_REQUEST_RF_CH1, length, array);
 
length3 -= length;
value += length;
@@ -924,7 +924,7 @@ void vnt_rf_table_download(struct vnt_private *priv)
 
/* Init Table 2 */
vnt_control_out(priv, MESSAGE_TYPE_WRITE,
-   0, MESSAGE_REQUEST_RF_INIT2, length1, array);
+   0, MESSAGE_REQUEST_RF_INIT2, length1, array);
 
/* Channel Table 0 */
value = 0;
@@ -937,7 +937,8 @@ void vnt_rf_table_download(struct vnt_private *priv)
memcpy(array, addr2, length);
 
vnt_control_out(priv, MESSAGE_TYPE_WRITE,
-   value, MESSAGE_REQUEST_RF_CH2, length, 
array);
+   value, MESSAGE_REQUEST_RF_CH2,
+   length, array);
 
length2 -= length;
value += length;
-- 
2.7.4