RE: [PATCH] staging:rtl8723au: core: Fix Warning reported by checkpatch.

2014-11-07 Thread Sharma, Sanjeev
-Original Message-
From: Greg KH [mailto:gre...@linuxfoundation.org] 
Sent: Thursday, November 06, 2014 9:13 PM
To: Sharma, Sanjeev
Cc: larry.fin...@lwfinger.net; jes.soren...@redhat.com; 
de...@driverdev.osuosl.org; linux-wirel...@vger.kernel.org; 
linux-ker...@vger.kernel.org
Subject: Re: [PATCH] staging:rtl8723au: core: Fix Warning reported by 
checkpatch.

On Thu, Nov 06, 2014 at 12:06:36PM +0530, Sanjeev Sharma wrote:
> This is a patch to the rtw_cmd.c file that fixes following Warning by 
> introducing temporary structure.
> 
> WARNING: line over 80 characters
> 
> Signed-off-by: Sanjeev Sharma 
> ---
>  drivers/staging/rtl8723au/core/rtw_cmd.c | 123 
> +++
>  1 file changed, 60 insertions(+), 63 deletions(-)

Same as the other patch, give us a hint as to the warning in the subject.

This patch is Fix of Warning introduced in Previous patch while fixing " ERROR: 
spaces required around that '>' (ctx:WxV)".Can I mentioned dependency or hint 
in subject line or do we have
another way to described these type of fix.(One patch introduced another 
Warning/Error)

> 
> diff --git a/drivers/staging/rtl8723au/core/rtw_cmd.c 
> b/drivers/staging/rtl8723au/core/rtw_cmd.c
> index 4eaa502..6186575 100644
> --- a/drivers/staging/rtl8723au/core/rtw_cmd.c
> +++ b/drivers/staging/rtl8723au/core/rtw_cmd.c
> @@ -919,34 +919,34 @@ static void traffic_status_watchdog(struct rtw_adapter 
> *padapter)
>   u8 bHigherBusyTxTraffic = false;
>   struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
>   int BusyThreshold = 100;
> + struct rt_link_detect *ldi = &pmlmepriv->LinkDetectInfo;
> +
>   /*  */
>   /*  Determine if our traffic is busy now */
>   /*  */
>   if (check_fwstate(pmlmepriv, _FW_LINKED)) {
>   if (rtl8723a_BT_coexist(padapter))
>   BusyThreshold = 50;
> - else if (pmlmepriv->LinkDetectInfo.bBusyTraffic)
> + else if (ldi->bBusyTraffic)
>   BusyThreshold = 75;
>   /*  if we raise bBusyTraffic in last watchdog, using
>   lower threshold. */
> - if (pmlmepriv->LinkDetectInfo.NumRxOkInPeriod > BusyThreshold ||
> - pmlmepriv->LinkDetectInfo.NumTxOkInPeriod > BusyThreshold) {
> + if (ldi->NumRxOkInPeriod > BusyThreshold ||
> + ldi->NumTxOkInPeriod > BusyThreshold) {
>   bBusyTraffic = true;
>  
> - if (pmlmepriv->LinkDetectInfo.NumRxOkInPeriod >
> - pmlmepriv->LinkDetectInfo.NumTxOkInPeriod)
> + if (ldi->NumRxOkInPeriod > ldi->NumTxOkInPeriod)
>   bRxBusyTraffic = true;
>   else
>   bTxBusyTraffic = true;
>   }
>  
>   /*  Higher Tx/Rx data. */
> - if (pmlmepriv->LinkDetectInfo.NumRxOkInPeriod > 4000 ||
> - pmlmepriv->LinkDetectInfo.NumTxOkInPeriod > 4000) {
> + if (ldi->NumRxOkInPeriod > 4000 ||
> + ldi->NumTxOkInPeriod > 4000) {
>   bHigherBusyTraffic = true;
>  
> - if (pmlmepriv->LinkDetectInfo.NumRxOkInPeriod >
> - pmlmepriv->LinkDetectInfo.NumTxOkInPeriod)
> + if (ldi->NumRxOkInPeriod > ldi->NumTxOkInPeriod)
>   bHigherBusyRxTraffic = true;
>   else
>   bHigherBusyTxTraffic = true;
> @@ -955,9 +955,9 @@ static void traffic_status_watchdog(struct rtw_adapter 
> *padapter)
>   if (!rtl8723a_BT_coexist(padapter) ||
>   !rtl8723a_BT_using_antenna_1(padapter)) {
>   /*  check traffic for  powersaving. */
> - if (((pmlmepriv->LinkDetectInfo.NumRxUnicastOkInPeriod +
> -   pmlmepriv->LinkDetectInfo.NumTxOkInPeriod) > 8) ||
> - pmlmepriv->LinkDetectInfo.NumRxUnicastOkInPeriod >2)
> + if (((ldi->NumRxUnicastOkInPeriod +
> +   ldi->NumTxOkInPeriod) > 8) ||
> + ldi->NumRxUnicastOkInPeriod > 2)
>   bEnterPS = false;
>   else
>   bEnterPS = true;
> @@ -971,15 +971,15 @@ static void traffic_status_watchdog(struct rtw_adapter 
> *padapter)
>   } else
>   LPS_Leave23a(padapter);
>  
> - pmlmepriv->LinkDetectInfo.NumRxOkInPeriod = 0;
>

RE: [PATCH] staging:rtl8723au: core: Fix error reported by checkpatch.

2014-11-07 Thread Sharma, Sanjeev
-Original Message-
From: Greg KH [mailto:gre...@linuxfoundation.org] 
Sent: Thursday, November 06, 2014 9:11 PM
To: Sharma, Sanjeev
Cc: larry.fin...@lwfinger.net; jes.soren...@redhat.com; 
de...@driverdev.osuosl.org; linux-wirel...@vger.kernel.org; 
linux-ker...@vger.kernel.org
Subject: Re: [PATCH] staging:rtl8723au: core: Fix error reported by checkpatch.

Please specify the "error" in the subject in some way.

On Thu, Nov 06, 2014 at 11:46:13AM +0530, Sanjeev Sharma wrote:
> This is a patch to the rtw_cmd.c file that fixes following error.
> 
> ERROR: spaces required around that '>' (ctx:WxV)
> ERROR: that open brace { should be on the previous line
> 
> Signed-off-by: Sanjeev Sharma 
> ---
>  drivers/staging/rtl8723au/core/rtw_cmd.c | 83 
> +++-
>  1 file changed, 40 insertions(+), 43 deletions(-)

This does two different things, please make it different patches.

For individual Error, is Separate patch needed. If Error has been mentioned in 
description. then it should be OK IMO. 

And you sent 2 patches, with no hint as to which one comes before which.
Please resend all of them, correctly numbered in a series, so that I have a 
chance to get the order correct when applying them.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


RE: [PATCH v2] staging:rtl8723au: core: Fix error reported by checkpatch.

2014-11-05 Thread Sharma, Sanjeev
-Original Message-
From: Greg KH [mailto:gre...@linuxfoundation.org] 
Sent: Wednesday, November 05, 2014 9:58 PM
To: Sharma, Sanjeev
Cc: larry.fin...@lwfinger.net; jes.soren...@redhat.com; 
de...@driverdev.osuosl.org; linux-wirel...@vger.kernel.org; 
linux-ker...@vger.kernel.org
Subject: Re: [PATCH v2] staging:rtl8723au: core: Fix error reported by 
checkpatch.

On Wed, Nov 05, 2014 at 05:05:03PM +0530, Sanjeev Sharma wrote:
> This is a patch to the rtw_cmd.c file that fixes Error reported by 
> checkpatch.

What error are you "fixing"?  Please be specific.

Submitted individual patch with detail of fix.

thanks,

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


RE: [PATCH v2] staging:rtl8723au: core: Fix error reported by checkpatch.

2014-11-05 Thread Sharma, Sanjeev
-Original Message-
From: Joe Perches [mailto:j...@perches.com] 
Sent: Wednesday, November 05, 2014 10:46 PM
To: Sharma, Sanjeev
Cc: larry.fin...@lwfinger.net; jes.soren...@redhat.com; 
gre...@linuxfoundation.org; linux-wirel...@vger.kernel.org; 
de...@driverdev.osuosl.org; linux-ker...@vger.kernel.org
Subject: Re: [PATCH v2] staging:rtl8723au: core: Fix error reported by 
checkpatch.

On Wed, 2014-11-05 at 17:05 +0530, Sanjeev Sharma wrote:
> This is a patch to the rtw_cmd.c file that fixes Error reported by 
> checkpatch.

Please run your patches through checkpatch before sending them.

In this patch I am fixing error reported by check patch since Error has higher 
priority. 

WARNING: suspect code indent for conditional statements (24, 24)
#178: FILE: drivers/staging/rtl8723au/core/rtw_cmd.c:1025:
+   if (check_fwstate(pmlmepriv, _FW_LINKED))
LPS_Leave23a(padapter);

Also, there are a couple of different things you changing here.

This should be 2 separate patches.

Ok I will come up with 2 patch separately.

One to use the temporary for:
+   struct rt_link_detect *ldi = &pmlmepriv->LinkDetectInfo;

(and that bit has a defect here:


+   } else {
LPS_Leave23a(padapter);
+   }

where the indentation for the last close brace is wrong)

and another for the whitespace only changes


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


RE: [PATCH] staging:rtl8723au: core: Fix error reported by checkpatch.

2014-11-05 Thread Sharma, Sanjeev
-Original Message-
From: Jes Sorensen [mailto:jes.soren...@redhat.com] 
Sent: Thursday, October 30, 2014 8:21 PM
To: Sharma, Sanjeev
Cc: Joe Perches; larry.fin...@lwfinger.net; gre...@linuxfoundation.org; 
linux-wirel...@vger.kernel.org; de...@driverdev.osuosl.org; 
linux-ker...@vger.kernel.org
Subject: Re: [PATCH] staging:rtl8723au: core: Fix error reported by checkpatch.

"Sharma, Sanjeev"  writes:
> -Original Message-
> From: Joe Perches [mailto:j...@perches.com]
> Sent: Monday, October 27, 2014 8:23 PM
> To: Jes Sorensen
> Cc: Sharma, Sanjeev; larry.fin...@lwfinger.net; 
> gre...@linuxfoundation.org; linux-wirel...@vger.kernel.org; 
> de...@driverdev.osuosl.org; linux-ker...@vger.kernel.org
> Subject: Re: [PATCH] staging:rtl8723au: core: Fix error reported by 
> checkpatch.
>
> On Mon, 2014-10-27 at 09:43 +0100, Jes Sorensen wrote:
>> Sanjeev Sharma  writes:
>> > This is a patch to the rtw_cmd.c file that fixes Error reported by 
>> > checkpatch.
> []
>> > diff --git a/drivers/staging/rtl8723au/core/rtw_cmd.c
>> > b/drivers/staging/rtl8723au/core/rtw_cmd.c
> []
>> > @@ -957,7 +957,7 @@ static void traffic_status_watchdog(struct rtw_adapter 
>> > *padapter)
>> >/*  check traffic for  powersaving. */
>> >if (((pmlmepriv->LinkDetectInfo.NumRxUnicastOkInPeriod +
>> >  pmlmepriv->LinkDetectInfo.NumTxOkInPeriod) > 8) ||
>> > -  pmlmepriv->LinkDetectInfo.NumRxUnicastOkInPeriod >2)
>> > +  pmlmepriv->LinkDetectInfo.NumRxUnicastOkInPeriod > 
>> > 2)
>> >bEnterPS = false;
>> >else
>> >bEnterPS = true;
>> 
>> This makes the line longer than 80 characters, that is worse than the 
>> 'problem' you are fixing.
>
> The code already has dozens of long lines already.
>
> This is generally a problem because the variable names are pretty long so 
> strict 80 column adherence generally isn't possible.
>
> A possible way to shorten these relatively long variable name/line 
> lengths is to use a temporary for
>
>   pmlmeprv->LinkDetectInfo
>
>   struct rt_link_detect *ldi = &pmlmeprv->LinkDetectInfo;
>
> so:
>
> I am agree on this approach but Let's wait for Jes opinion on it.
>
> Sanjeev Sharma
>
>  drivers/staging/rtl8723au/core/rtw_cmd.c | 46 
> 
>  1 file changed, 23 insertions(+), 23 deletions(-)

This is fine with me.

Jes

Summited another patch after incorporating the change.

Sanjeev Sharma
>
> diff --git a/drivers/staging/rtl8723au/core/rtw_cmd.c 
> b/drivers/staging/rtl8723au/core/rtw_cmd.c
> index d2d7edf..1b24945 100644
> --- a/drivers/staging/rtl8723au/core/rtw_cmd.c
> +++ b/drivers/staging/rtl8723au/core/rtw_cmd.c
> @@ -922,34 +922,33 @@ static void traffic_status_watchdog(struct rtw_adapter 
> *padapter)
>   u8 bHigherBusyTxTraffic = false;
>   struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
>   int BusyThreshold = 100;
> + struct rt_link_detect *ldi = &pmlmepriv->LinkDetectInfo;
> +
>   /*  */
>   /*  Determine if our traffic is busy now */
>   /*  */
>   if (check_fwstate(pmlmepriv, _FW_LINKED)) {
>   if (rtl8723a_BT_coexist(padapter))
>   BusyThreshold = 50;
> - else if (pmlmepriv->LinkDetectInfo.bBusyTraffic)
> + else if (ldi->bBusyTraffic)
>   BusyThreshold = 75;
>   /*  if we raise bBusyTraffic in last watchdog, using
>   lower threshold. */
> - if (pmlmepriv->LinkDetectInfo.NumRxOkInPeriod > BusyThreshold ||
> - pmlmepriv->LinkDetectInfo.NumTxOkInPeriod > BusyThreshold) {
> + if (ldi->NumRxOkInPeriod > BusyThreshold ||
> + ldi->NumTxOkInPeriod > BusyThreshold) {
>   bBusyTraffic = true;
>  
> - if (pmlmepriv->LinkDetectInfo.NumRxOkInPeriod >
> - pmlmepriv->LinkDetectInfo.NumTxOkInPeriod)
> + if (ldi->NumRxOkInPeriod > ldi->NumTxOkInPeriod)
>   bRxBusyTraffic = true;
>   else
>   bTxBusyTraffic = true;
>   }
>  
>   /*  Higher Tx/Rx data. */
> - if (pmlmepriv->LinkDetectInfo.NumRxOkInPeriod > 4000 ||
> - pmlmepriv->LinkDetectInfo.NumTxOkInPeriod > 4000) {

RE: [PATCH] staging:rtl8723au: core: Fix error reported by checkpatch.

2014-10-28 Thread Sharma, Sanjeev
-Original Message-
From: Joe Perches [mailto:j...@perches.com] 
Sent: Monday, October 27, 2014 8:23 PM
To: Jes Sorensen
Cc: Sharma, Sanjeev; larry.fin...@lwfinger.net; gre...@linuxfoundation.org; 
linux-wirel...@vger.kernel.org; de...@driverdev.osuosl.org; 
linux-ker...@vger.kernel.org
Subject: Re: [PATCH] staging:rtl8723au: core: Fix error reported by checkpatch.

On Mon, 2014-10-27 at 09:43 +0100, Jes Sorensen wrote:
> Sanjeev Sharma  writes:
> > This is a patch to the rtw_cmd.c file that fixes Error reported by 
> > checkpatch.
[]
> > diff --git a/drivers/staging/rtl8723au/core/rtw_cmd.c 
> > b/drivers/staging/rtl8723au/core/rtw_cmd.c
[]
> > @@ -957,7 +957,7 @@ static void traffic_status_watchdog(struct rtw_adapter 
> > *padapter)
> > /*  check traffic for  powersaving. */
> > if (((pmlmepriv->LinkDetectInfo.NumRxUnicastOkInPeriod +
> >   pmlmepriv->LinkDetectInfo.NumTxOkInPeriod) > 8) ||
> > -   pmlmepriv->LinkDetectInfo.NumRxUnicastOkInPeriod >2)
> > +   pmlmepriv->LinkDetectInfo.NumRxUnicastOkInPeriod > 
> > 2)
> > bEnterPS = false;
> > else
> > bEnterPS = true;
> 
> This makes the line longer than 80 characters, that is worse than the 
> 'problem' you are fixing.

The code already has dozens of long lines already.

This is generally a problem because the variable names are pretty long so 
strict 80 column adherence generally isn't possible.

A possible way to shorten these relatively long variable name/line lengths is 
to use a temporary for

pmlmeprv->LinkDetectInfo

struct rt_link_detect *ldi = &pmlmeprv->LinkDetectInfo;

so:

I am agree on this approach but Let's wait for Jes opinion on it.

Sanjeev Sharma

 drivers/staging/rtl8723au/core/rtw_cmd.c | 46 
 1 file changed, 23 insertions(+), 23 deletions(-)

diff --git a/drivers/staging/rtl8723au/core/rtw_cmd.c 
b/drivers/staging/rtl8723au/core/rtw_cmd.c
index d2d7edf..1b24945 100644
--- a/drivers/staging/rtl8723au/core/rtw_cmd.c
+++ b/drivers/staging/rtl8723au/core/rtw_cmd.c
@@ -922,34 +922,33 @@ static void traffic_status_watchdog(struct rtw_adapter 
*padapter)
u8 bHigherBusyTxTraffic = false;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
int BusyThreshold = 100;
+   struct rt_link_detect *ldi = &pmlmepriv->LinkDetectInfo;
+
/*  */
/*  Determine if our traffic is busy now */
/*  */
if (check_fwstate(pmlmepriv, _FW_LINKED)) {
if (rtl8723a_BT_coexist(padapter))
BusyThreshold = 50;
-   else if (pmlmepriv->LinkDetectInfo.bBusyTraffic)
+   else if (ldi->bBusyTraffic)
BusyThreshold = 75;
/*  if we raise bBusyTraffic in last watchdog, using
lower threshold. */
-   if (pmlmepriv->LinkDetectInfo.NumRxOkInPeriod > BusyThreshold ||
-   pmlmepriv->LinkDetectInfo.NumTxOkInPeriod > BusyThreshold) {
+   if (ldi->NumRxOkInPeriod > BusyThreshold ||
+   ldi->NumTxOkInPeriod > BusyThreshold) {
bBusyTraffic = true;
 
-   if (pmlmepriv->LinkDetectInfo.NumRxOkInPeriod >
-   pmlmepriv->LinkDetectInfo.NumTxOkInPeriod)
+   if (ldi->NumRxOkInPeriod > ldi->NumTxOkInPeriod)
bRxBusyTraffic = true;
else
bTxBusyTraffic = true;
}
 
/*  Higher Tx/Rx data. */
-   if (pmlmepriv->LinkDetectInfo.NumRxOkInPeriod > 4000 ||
-   pmlmepriv->LinkDetectInfo.NumTxOkInPeriod > 4000) {
+   if (ldi->NumRxOkInPeriod > 4000 ||
+   ldi->NumTxOkInPeriod > 4000) {
bHigherBusyTraffic = true;
-
-   if (pmlmepriv->LinkDetectInfo.NumRxOkInPeriod >
-   pmlmepriv->LinkDetectInfo.NumTxOkInPeriod)
+   if (ldi->NumRxOkInPeriod > ldi->NumTxOkInPeriod)
bHigherBusyRxTraffic = true;
else
bHigherBusyTxTraffic = true;
@@ -958,9 +957,9 @@ static void traffic_status_watchdog(struct rtw_adapter 
*padapter)
if (!rtl8723a_BT_coexist(padapter) ||
!rtl8723a_BT_using_antenna_1(padapter)) {
/*  check traffic for  powersaving. */
-   if (((pmlmepriv->LinkDetectInfo.NumRxUnicastOkInPeriod +
-   

RE: [PATCH] staging:rtl8723au: core: Fix error reported by checkpatch.

2014-10-28 Thread Sharma, Sanjeev
-Original Message-
From: Jes Sorensen [mailto:jes.soren...@redhat.com] 
Sent: Monday, October 27, 2014 2:13 PM
To: Sharma, Sanjeev
Cc: larry.fin...@lwfinger.net; gre...@linuxfoundation.org; 
linux-wirel...@vger.kernel.org; de...@driverdev.osuosl.org; 
linux-ker...@vger.kernel.org
Subject: Re: [PATCH] staging:rtl8723au: core: Fix error reported by checkpatch.

Sanjeev Sharma  writes:
> This is a patch to the rtw_cmd.c file that fixes Error reported by 
> checkpatch.
>
> Signed-off-by: Sanjeev Sharma 
> ---
>  drivers/staging/rtl8723au/core/rtw_cmd.c | 83 
> +++-
>  1 file changed, 40 insertions(+), 43 deletions(-)
>
> diff --git a/drivers/staging/rtl8723au/core/rtw_cmd.c 
> b/drivers/staging/rtl8723au/core/rtw_cmd.c
> index 4eaa502..c1f6254 100644
> --- a/drivers/staging/rtl8723au/core/rtw_cmd.c
> +++ b/drivers/staging/rtl8723au/core/rtw_cmd.c
> @@ -957,7 +957,7 @@ static void traffic_status_watchdog(struct rtw_adapter 
> *padapter)
>   /*  check traffic for  powersaving. */
>   if (((pmlmepriv->LinkDetectInfo.NumRxUnicastOkInPeriod +
> pmlmepriv->LinkDetectInfo.NumTxOkInPeriod) > 8) ||
> - pmlmepriv->LinkDetectInfo.NumRxUnicastOkInPeriod >2)
> + pmlmepriv->LinkDetectInfo.NumRxUnicastOkInPeriod > 
> 2)
>   bEnterPS = false;
>   else
>   bEnterPS = true;

This makes the line longer than 80 characters, that is worse than the 'problem' 
you are fixing.

Jes

Hello jes,

How it can be worse because checkpatch treating this as an Error and line 
longer than 80 character is warning reported by checkpatch and I could see that 
in entire staging directory,
every maintainer most of the time ignore the 80 column limit and give priority 
to Error.

Please let me know your comment .

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


RE: [PATCH] drivers: staging: rtl8192u: Fix "space prohibited after that open parenthesis '('" errors

2014-10-27 Thread Sharma, Sanjeev
Look ok.

Regards
Sanjeev Sharma

-Original Message-
From: Greg Donald [mailto:gdon...@gmail.com] 
Sent: Monday, October 27, 2014 1:49 AM
To: Greg Kroah-Hartman; Ana Rey; Peter P Waskiewicz Jr; Chaitanya Hazarey; 
Sharma, Sanjeev; Roxana Blaj; Antoine Schweitzer-Chaput; 
de...@driverdev.osuosl.org; linux-ker...@vger.kernel.org
Cc: Greg Donald
Subject: [PATCH] drivers: staging: rtl8192u: Fix "space prohibited after that 
open parenthesis '('" errors

Fix checkpatch.pl "space prohibited after that open parenthesis '('" errors

Signed-off-by: Greg Donald 
---
 drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c  | 22 +- 
 .../staging/rtl8192u/ieee80211/ieee80211_softmac.c | 11 ---
 .../rtl8192u/ieee80211/ieee80211_softmac_wx.c  |  2 +-
 drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c  |  3 +--
 .../staging/rtl8192u/ieee80211/rtl819x_BAProc.c| 16 ++--
 .../staging/rtl8192u/ieee80211/rtl819x_HTProc.c| 11 ---
 6 files changed, 25 insertions(+), 40 deletions(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c 
b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
index 73de9e9..d401dbf 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
@@ -713,8 +713,8 @@ static void RxReorderIndicatePacket(struct ieee80211_device 
*ieee,
while(!list_empty(&pTS->RxPendingPktList)) {
IEEE80211_DEBUG(IEEE80211_DL_REORDER,"%s(): start RREORDER 
indicate\n",__func__);
pReorderEntry = 
(PRX_REORDER_ENTRY)list_entry(pTS->RxPendingPktList.prev,RX_REORDER_ENTRY,List);
-   if( SN_LESS(pReorderEntry->SeqNum, pTS->RxIndicateSeq) ||
-   SN_EQUAL(pReorderEntry->SeqNum, 
pTS->RxIndicateSeq))
+   if (SN_LESS(pReorderEntry->SeqNum, pTS->RxIndicateSeq) ||
+   SN_EQUAL(pReorderEntry->SeqNum, pTS->RxIndicateSeq))
{
/* This protect buffer from overflow. */
if(index >= REORDER_WIN_SIZE) {
@@ -800,9 +800,8 @@ static u8 parse_subframe(struct sk_buff *skb,
// Null packet, don't indicate it to upper layer
ChkLength = LLCOffset;/* + (Frame_WEP(frame)!=0 
?Adapter->MgntInfo.SecurityInfo.EncryptionHeadOverhead:0);*/
 
-   if( skb->len <= ChkLength ) {
+   if (skb->len <= ChkLength)
return 0;
-   }
 
skb_pull(skb, LLCOffset);
 
@@ -1035,10 +1034,9 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct 
sk_buff *skb,
{
 
//  IEEE80211_DEBUG(IEEE80211_DL_REORDER,"%s(): 
pRxTS->RxLastFragNum is %d,frag is %d,pRxTS->RxLastSeqNum is %d,seq is 
%d\n",__func__,pRxTS->RxLastFragNum,frag,pRxTS->RxLastSeqNum,WLAN_GET_SEQ_SEQ(sc));
-   if( (fc & (1<<11))  &&
-   (frag == pRxTS->RxLastFragNum) &&
-   (WLAN_GET_SEQ_SEQ(sc) == 
pRxTS->RxLastSeqNum)   )
-   {
+   if ((fc & (1<<11)) &&
+   (frag == pRxTS->RxLastFragNum) &&
+   (WLAN_GET_SEQ_SEQ(sc) == pRxTS->RxLastSeqNum)) {
goto rx_dropped;
}
else
@@ -2456,7 +2454,7 @@ static inline void ieee80211_process_probe_response(
//   then wireless adapter should do active scan from ch1~11 and
//   passive scan from ch12~14
 
-   if( !IsLegalChannel(ieee, network.channel) )
+   if (!IsLegalChannel(ieee, network.channel))
return;
if(ieee->bGlobalDomain)
{
@@ -2465,8 +2463,7 @@ static inline void ieee80211_process_probe_response(
// Case 1: Country code
if(IS_COUNTRY_IE_VALID(ieee) )
{
-   if( !IsLegalChannel(ieee, network.channel) )
-   {
+   if (!IsLegalChannel(ieee, network.channel)) {
printk("GetScanInfo(): For Country 
code, filter probe response at channel(%d).\n", network.channel);
return;
}
@@ -2487,8 +2484,7 @@ static inline void ieee80211_process_probe_response(
// Case 1: Country code
if(IS_COUNTRY_IE_VALID(ieee) )
{
-   if( !IsLegalChannel(ieee, network.channel) )
-   {
+   if (!IsLegalChannel(ieee, network.channel)) {
printk("Get

RE: [PATCH] staging:r8190_rtl8256: coding style: Fixed commenting style

2014-09-08 Thread Sharma, Sanjeev
-Original Message-
From: Greg KH [mailto:gre...@linuxfoundation.org] 
Sent: Sunday, August 31, 2014 2:28 AM
To: Sharma, Sanjeev
Cc: de...@driverdev.osuosl.org; linux-ker...@vger.kernel.org
Subject: Re: [PATCH] staging:r8190_rtl8256: coding style: Fixed commenting style

On Mon, Aug 25, 2014 at 12:55:27PM +0530, Sanjeev Sharma wrote:
> This is a patch to the r8190_rtl8256.c file that fixes commenting 
> style Error
> 
> Signed-off-by: Sanjeev Sharma 
> ---
>  drivers/staging/rtl8192u/r8190_rtl8256.c | 59 
> +---
>  1 file changed, 31 insertions(+), 28 deletions(-)
> 
> diff --git a/drivers/staging/rtl8192u/r8190_rtl8256.c 
> b/drivers/staging/rtl8192u/r8190_rtl8256.c
> index 43ed768..8fe35ad 100644
> --- a/drivers/staging/rtl8192u/r8190_rtl8256.c
> +++ b/drivers/staging/rtl8192u/r8190_rtl8256.c
> @@ -61,13 +61,15 @@ void PHY_SetRF8256Bandwidth(struct net_device *dev , 
> HT_CHANNEL_WIDTH Bandwidth)
>   break;
>   case HT_CHANNEL_WIDTH_20_40:
>   if (priv->card_8192_version == VERSION_819xU_A 
> || priv->card_8192_version == VERSION_819xU_B) { /* 8256 D-cut, E-cut, xiong: 
> consider it later! */
> - rtl8192_phy_SetRFReg(dev, 
> (RF90_RADIO_PATH_E)eRFPath, 0x0b, bMask12Bits, 0x300); //phy para:3ba
> + rtl8192_phy_SetRFReg(dev, 
> (RF90_RADIO_PATH_E)eRFPath, 0x0b, 
> +bMask12Bits, 0x300); /* phy para:3ba */
>   rtl8192_phy_SetRFReg(dev, 
> (RF90_RADIO_PATH_E)eRFPath, 0x2c, bMask12Bits, 0x3df);
>   rtl8192_phy_SetRFReg(dev, 
> (RF90_RADIO_PATH_E)eRFPath, 0x0e, 
> bMask12Bits, 0x0a1);
>  
> - //cosa add for sd3's request 01/23/2008
> + /* cosa add for sd3's request 01/23/2008
> +  *
> +  */
>   if (priv->chan == 3 || priv->chan == 9)
> - //I need to set priv->chan 
> whenever current channel changes
> + /* I need to set priv->chan 
> whenever current channel changes */
>   rtl8192_phy_SetRFReg(dev, 
> (RF90_RADIO_PATH_E)eRFPath, 0x14, bMask12Bits, 0x59b);
>   else
>   rtl8192_phy_SetRFReg(dev, 
> (RF90_RADIO_PATH_E)eRFPath, 0x14, 
> bMask12Bits, 0x5ab); @@ -91,11 +93,12 @@ void 
> PHY_SetRF8256Bandwidth(struct net_device *dev , HT_CHANNEL_WIDTH 
> Bandwidth)  void PHY_RF8256_Config(struct net_device *dev)  {
>   struct r8192_priv *priv = ieee80211_priv(dev);
> - // Initialize general global value
> - //
> - // TODO: Extend RF_PATH_C and RF_PATH_D in the future
> + /* Initialize general global value
> +  *
> +  * TODO: Extend RF_PATH_C and RF_PATH_D in the future
> +  */
>   priv->NumTotalRFPath = RTL819X_TOTAL_RF_PATH;
> - // Config BB and RF
> + /* Config BB and RF */
>   phy_RF8256_Config_ParaFile(dev);
>  }
>  
> /*
> -- @@ -107,10 +110,11 @@ void PHY_RF8256_Config(struct net_device 
> *dev)  void phy_RF8256_Config_ParaFile(struct net_device *dev)  {
>   u32 u4RegValue = 0;
> - //static s1Byte szRadioAFile[] = 
> RTL819X_PHY_RADIO_A;
> - //static s1Byte szRadioBFile[] = 
> RTL819X_PHY_RADIO_B;
> - //static s1Byte szRadioCFile[] = 
> RTL819X_PHY_RADIO_C;
> - //static s1Byte szRadioDFile[] = 
> RTL819X_PHY_RADIO_D;
> + /* static s1ByteszRadioAFile[] = 
> RTL819X_PHY_RADIO_A;
> +  * static s1ByteszRadioBFile[] = 
> RTL819X_PHY_RADIO_B;
> +  * static s1ByteszRadioCFile[] = 
> RTL819X_PHY_RADIO_C;
> +  * static s1ByteszRadioDFile[] = 
> RTL819X_PHY_RADIO_D;
> +  */

Why not just remove stuff like this if it's not being used?

Same goes for other commented out code lines.

thanks,

greg k-h

Hi greg

submitted patch after removal of unwanted code 

thanks,

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


RE: [PATCH] staging:iio: moved platform_data into include/linux/iio

2014-08-26 Thread Sharma, Sanjeev
-Original Message-
From: Lars-Peter Clausen [mailto:l...@metafoo.de] 
Sent: Monday, August 25, 2014 7:03 PM
To: Sharma, Sanjeev; sanjeev sharma
Cc: ji...@kernel.org; gregkh; linux-...@vger.kernel.org; devel; linux-kernel
Subject: Re: [PATCH] staging:iio: moved platform_data into include/linux/iio

On 08/25/2014 01:49 PM, Sharma, Sanjeev wrote:
> -Original Message-
> From: Lars-Peter Clausen [mailto:l...@metafoo.de]
> Sent: Monday, August 25, 2014 1:39 PM
> To: Sharma, Sanjeev; sanjeev sharma
> Cc: ji...@kernel.org; gregkh; linux-...@vger.kernel.org; devel; 
> linux-kernel
> Subject: Re: [PATCH] staging:iio: moved platform_data into 
> include/linux/iio
>
> On 08/25/2014 09:17 AM, Sharma, Sanjeev wrote:
>> Hello Lars,
>>
>> As per your suggestion Can I move complete Driver out of staging specially 
>> SPI ADC Driver.
>
> Only if they are cleaned up first. All of the drivers that are still in 
> staging do have issues, otherwise we'd already had moved them. A few of them 
> are OK codestyle wise, but do have ABI issues which need to be resolved 
> before they can be moved.
>
> - Lars
>
> Where I can find ABI issues which need to be resolved so that these can be 
> looked upon.

Compare the sysfs files and their behavior that the driver registers with what 
is documented in the IIO ABI spec[1]. If you can't find it in the documentation 
it either needs to be documented or updated to use the existing ABI correctly. 
Note that this is not necessarily trivial and may require in-depth knowledge 
and understanding of the IIO ABI.

You mean to say I shouldn't spent much time here because this is not much 
important and if this is the case then I think I should look into some area 
which make more sense.

Thanks
Sanjeev

Thanks,
- Lars

[1]
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/ABI/testing/sysfs-bus-iio

>
> -Sanjeev
>>
>> Regards
>> Sanjeev Sharma
>>
>> -Original Message-
>> From: Lars-Peter Clausen [mailto:l...@metafoo.de]
>> Sent: Wednesday, August 20, 2014 12:20 PM
>> To: sanjeev sharma
>> Cc: Sharma, Sanjeev; ji...@kernel.org; gregkh; 
>> linux-...@vger.kernel.org; devel; linux-kernel
>> Subject: Re: [PATCH] staging:iio: moved platform_data into 
>> include/linux/iio
>>
>> On 08/20/2014 08:44 AM, sanjeev sharma wrote:
>>> Hi,
>>>
>>> This was the action item(TO-DO). IMO, it make sense to move into 
>>> include/linux/iio because IIO complete subsystem may take some time.
>>
>> The code that is in staging is not supposed to 'leak' outside of staging. So 
>> either you move the driver as a whole out of staging or leave it there, but 
>> do not move individual files of the driver out of staging. The action item 
>> is for when the driver is moved out of staging.
>>
>
> N r  y   b X  ǧv ^ )޺{.n +{  *"  ^n r   z   h&   G   h 
> ( 階 ݢj"   m z ޖ   f   h   ~ mml==
>

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


RE: [PATCH] staging:iio: moved platform_data into include/linux/iio

2014-08-25 Thread Sharma, Sanjeev
-Original Message-
From: Lars-Peter Clausen [mailto:l...@metafoo.de] 
Sent: Monday, August 25, 2014 1:39 PM
To: Sharma, Sanjeev; sanjeev sharma
Cc: ji...@kernel.org; gregkh; linux-...@vger.kernel.org; devel; linux-kernel
Subject: Re: [PATCH] staging:iio: moved platform_data into include/linux/iio

On 08/25/2014 09:17 AM, Sharma, Sanjeev wrote:
> Hello Lars,
>
> As per your suggestion Can I move complete Driver out of staging specially 
> SPI ADC Driver.

Only if they are cleaned up first. All of the drivers that are still in staging 
do have issues, otherwise we'd already had moved them. A few of them are OK 
codestyle wise, but do have ABI issues which need to be resolved before they 
can be moved.

- Lars

Where I can find ABI issues which need to be resolved so that these can be 
looked upon.

-Sanjeev 
>
> Regards
> Sanjeev Sharma
>
> -Original Message-
> From: Lars-Peter Clausen [mailto:l...@metafoo.de]
> Sent: Wednesday, August 20, 2014 12:20 PM
> To: sanjeev sharma
> Cc: Sharma, Sanjeev; ji...@kernel.org; gregkh; 
> linux-...@vger.kernel.org; devel; linux-kernel
> Subject: Re: [PATCH] staging:iio: moved platform_data into 
> include/linux/iio
>
> On 08/20/2014 08:44 AM, sanjeev sharma wrote:
>> Hi,
>>
>> This was the action item(TO-DO). IMO, it make sense to move into 
>> include/linux/iio because IIO complete subsystem may take some time.
>
> The code that is in staging is not supposed to 'leak' outside of staging. So 
> either you move the driver as a whole out of staging or leave it there, but 
> do not move individual files of the driver out of staging. The action item is 
> for when the driver is moved out of staging.
>

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


RE: [PATCH] staging:iio: moved platform_data into include/linux/iio

2014-08-25 Thread Sharma, Sanjeev
Hello Lars,

As per your suggestion Can I move complete Driver out of staging specially SPI 
ADC Driver.

Regards
Sanjeev Sharma

-Original Message-
From: Lars-Peter Clausen [mailto:l...@metafoo.de] 
Sent: Wednesday, August 20, 2014 12:20 PM
To: sanjeev sharma
Cc: Sharma, Sanjeev; ji...@kernel.org; gregkh; linux-...@vger.kernel.org; 
devel; linux-kernel
Subject: Re: [PATCH] staging:iio: moved platform_data into include/linux/iio

On 08/20/2014 08:44 AM, sanjeev sharma wrote:
> Hi,
>
> This was the action item(TO-DO). IMO, it make sense to move into 
> include/linux/iio because IIO complete subsystem may take some time.

The code that is in staging is not supposed to 'leak' outside of staging. So 
either you move the driver as a whole out of staging or leave it there, but do 
not move individual files of the driver out of staging. The action item is for 
when the driver is moved out of staging.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


RE: [PATCH] staging:iio: moved platform_data into include/linux/iio

2014-08-21 Thread Sharma, Sanjeev
Thanks greg TODO was very confusing.

@Lars: These drivers are looks stable enough to move out of staging tree and 
Can we move to outside staging tree as per your 1st Comment.

Regards
Sanjeev Sharma

-Original Message-
From: gregkh [mailto:gre...@linuxfoundation.org] 
Sent: Wednesday, August 20, 2014 4:46 PM
To: sanjeev sharma
Cc: Lars-Peter Clausen; Sharma, Sanjeev; ji...@kernel.org; 
linux-...@vger.kernel.org; devel; linux-kernel
Subject: Re: [PATCH] staging:iio: moved platform_data into include/linux/iio


A: No.
Q: Should I include quotations after my reply?

http://daringfireball.net/2007/07/on_top

On Wed, Aug 20, 2014 at 12:32:52PM +0530, sanjeev sharma wrote:
> Hi,
> 
> I have only moved some header files because other header files are 
> already present there and these are only pending files which is not 
> moved outside the staging directory.
> 
> @Greg:What is your though on this ?

Lars-Peter is correct, don't "leak" files from staging.  Take the time to work 
on fixing up these drivers correctly so they can be moved out of staging 
instead of just doing simple file moves which do nothing.

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


RE: [PATCH] iio: remove .owner field for driver using module_platform_driver

2014-08-21 Thread Sharma, Sanjeev
Adding Greg into CC list.

Sanjeev Sharma

-Original Message-
From: Sanjeev Sharma [mailto:sanjeev_sha...@mentor.com] 
Sent: Wednesday, August 20, 2014 3:03 PM
To: ji...@kernel.org; kgene@samsung.com
Cc: linux-ker...@vger.kernel.org; linux-...@vger.kernel.org; 
de...@driverdev.osuosl.org; Sharma, Sanjeev; Sharma, Sanjeev
Subject: [PATCH] iio: remove .owner field for driver using 
module_platform_driver

This patch removes the .owner field for drivers which use the 
platform_driver_register api because this is overriden in 
_platform_driver_register.

Signed-off-by: Sanjeev Sharma 
---
 drivers/iio/accel/hid-sensor-accel-3d.c   | 1 -
 drivers/iio/adc/exynos_adc.c  | 1 -
 drivers/iio/adc/lp8788_adc.c  | 1 -
 drivers/iio/adc/ti_am335x_adc.c   | 1 -
 drivers/iio/adc/twl4030-madc.c| 1 -
 drivers/iio/adc/twl6030-gpadc.c   | 1 -
 drivers/iio/adc/vf610_adc.c   | 1 -
 drivers/iio/adc/viperboard_adc.c  | 1 -
 drivers/iio/gyro/hid-sensor-gyro-3d.c | 1 -
 drivers/iio/humidity/dht11.c  | 1 -
 drivers/iio/light/hid-sensor-als.c| 1 -
 drivers/iio/light/hid-sensor-prox.c   | 1 -
 drivers/iio/light/lm3533-als.c| 1 -
 drivers/iio/magnetometer/hid-sensor-magn-3d.c | 1 -  
drivers/iio/orientation/hid-sensor-incl-3d.c  | 1 -  
drivers/iio/orientation/hid-sensor-rotation.c | 1 -
 drivers/iio/pressure/hid-sensor-press.c   | 1 -
 drivers/iio/trigger/iio-trig-interrupt.c  | 1 -
 18 files changed, 18 deletions(-)

diff --git a/drivers/iio/accel/hid-sensor-accel-3d.c 
b/drivers/iio/accel/hid-sensor-accel-3d.c
index 54e464e..d5d9531 100644
--- a/drivers/iio/accel/hid-sensor-accel-3d.c
+++ b/drivers/iio/accel/hid-sensor-accel-3d.c
@@ -419,7 +419,6 @@ static struct platform_driver hid_accel_3d_platform_driver 
= {
.id_table = hid_accel_3d_ids,
.driver = {
.name   = KBUILD_MODNAME,
-   .owner  = THIS_MODULE,
},
.probe  = hid_accel_3d_probe,
.remove = hid_accel_3d_remove,
diff --git a/drivers/iio/adc/exynos_adc.c b/drivers/iio/adc/exynos_adc.c index 
fc9dfc2..b4373f7 100644
--- a/drivers/iio/adc/exynos_adc.c
+++ b/drivers/iio/adc/exynos_adc.c
@@ -606,7 +606,6 @@ static struct platform_driver exynos_adc_driver = {
.remove = exynos_adc_remove,
.driver = {
.name   = "exynos-adc",
-   .owner  = THIS_MODULE,
.of_match_table = exynos_adc_match,
.pm = &exynos_adc_pm_ops,
},
diff --git a/drivers/iio/adc/lp8788_adc.c b/drivers/iio/adc/lp8788_adc.c index 
5c8c915..152cfc8 100644
--- a/drivers/iio/adc/lp8788_adc.c
+++ b/drivers/iio/adc/lp8788_adc.c
@@ -244,7 +244,6 @@ static struct platform_driver lp8788_adc_driver = {
.remove = lp8788_adc_remove,
.driver = {
.name = LP8788_DEV_ADC,
-   .owner = THIS_MODULE,
},
 };
 module_platform_driver(lp8788_adc_driver);
diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c 
index d5dc4c6..b730864 100644
--- a/drivers/iio/adc/ti_am335x_adc.c
+++ b/drivers/iio/adc/ti_am335x_adc.c
@@ -545,7 +545,6 @@ MODULE_DEVICE_TABLE(of, ti_adc_dt_ids);  static struct 
platform_driver tiadc_driver = {
.driver = {
.name   = "TI-am335x-adc",
-   .owner  = THIS_MODULE,
.pm = TIADC_PM_OPS,
.of_match_table = ti_adc_dt_ids,
},
diff --git a/drivers/iio/adc/twl4030-madc.c b/drivers/iio/adc/twl4030-madc.c 
index eb86786..94c5f05 100644
--- a/drivers/iio/adc/twl4030-madc.c
+++ b/drivers/iio/adc/twl4030-madc.c
@@ -883,7 +883,6 @@ static struct platform_driver twl4030_madc_driver = {
.remove = twl4030_madc_remove,
.driver = {
   .name = "twl4030_madc",
-  .owner = THIS_MODULE,
   .of_match_table = of_match_ptr(twl_madc_of_match),
},
 };
diff --git a/drivers/iio/adc/twl6030-gpadc.c b/drivers/iio/adc/twl6030-gpadc.c 
index 15282f1..89d8aa1 100644
--- a/drivers/iio/adc/twl6030-gpadc.c
+++ b/drivers/iio/adc/twl6030-gpadc.c
@@ -994,7 +994,6 @@ static struct platform_driver twl6030_gpadc_driver = {
.remove = twl6030_gpadc_remove,
.driver = {
.name   = DRIVER_NAME,
-   .owner  = THIS_MODULE,
.pm = &twl6030_gpadc_pm_ops,
.of_match_table = of_twl6030_match_tbl,
},
diff --git a/drivers/iio/adc/vf610_adc.c b/drivers/iio/adc/vf610_adc.c index 
44799eb5..4a10ae9 100644
--- a/drivers/iio/adc/vf610_adc.c
+++ b/drivers/iio/adc/vf610_adc.c
@@ -698,7 +698,6 @@ static struct platform_driver vf610_adc_driver = {
.remove = vf610_adc_remove,
.driver = {
.name   = DRIVER_NAME,

RE: [PATCH] staging:r819xU: coding style: Fixed commenting style

2014-08-07 Thread Sharma, Sanjeev
Opps, I forget.

Let me correct and send V2 patch.

Regards
Sanjeev Sharma

-Original Message-
From: Greg KH [mailto:gre...@linuxfoundation.org] 
Sent: Thursday, August 07, 2014 9:33 PM
To: Sharma, Sanjeev
Cc: de...@driverdev.osuosl.org; oor...@gmail.com; linux-ker...@vger.kernel.org
Subject: Re: [PATCH] staging:r819xU: coding style: Fixed commenting style

On Thu, Aug 07, 2014 at 12:15:57PM +0530, Sanjeev Sharma wrote:
> This is a patch to the r819xU_phyreg.h file that fixes commenting 
> style warning
> 
> Signed-off-by: Sanjeev Sharma 
> ---
>  drivers/staging/rtl8192u/r819xU_phyreg.h | 188 
> ---
>  1 file changed, 97 insertions(+), 91 deletions(-)
> 
> diff --git a/drivers/staging/rtl8192u/r819xU_phyreg.h 
> b/drivers/staging/rtl8192u/r819xU_phyreg.h
> index 64285d6..f07d2f1 100644
> --- a/drivers/staging/rtl8192u/r819xU_phyreg.h
> +++ b/drivers/staging/rtl8192u/r819xU_phyreg.h
> @@ -2,10 +2,10 @@
>  #define _R819XU_PHYREG_H
>  
>  
> -#define   RF_DATA0x1d4   
> // FW will write RF data in the register.
> +#define   RF_DATA0x1d4   
> /* FW will write RF data in the register.*/
>  
> -//Register   //duplicate register due to connection: RF_Mode, TRxRN, NumOf 
> L-STF
> -//page 1
> +/* Register   //duplicate register due to connection: RF_Mode, TRxRN, NumOf 
> L-STF */

Does that line look correct?

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


RE: [PATCH v2 3/3] staging:r8190: coding style: Fixed checkpatch reported Error

2014-08-06 Thread Sharma, Sanjeev
Hello All,

I have submitted few patches last week and also get reply from Greg that 
patches will show up in linux-next tree and in parallel I need to submit new 
patches  and now Looks like I need to
Sync my tree with linux-next tree before start working on New set of change and 
as soon as I am pulling change I always get conflicts.

Anyone has idea who to overcome this problem ?

Regards
Sanjeev Sharma

-Original Message-
From: Sanjeev Sharma [mailto:sanjeev_sha...@mentor.com] 
Sent: Thursday, July 31, 2014 11:14 AM
To: gre...@linuxfoundation.org
Cc: oor...@gmail.com; de...@driverdev.osuosl.org; linux-ker...@vger.kernel.org; 
Sharma, Sanjeev; Sharma, Sanjeev
Subject: [PATCH v2 3/3] staging:r8190: coding style: Fixed checkpatch reported 
Error

This is a patch to the r8190_rtl8256.c file that fixes checkpatch reported 
space & coding style issues.

Signed-off-by: Sanjeev Sharma 
---
Changes in v2:
  - Added space character in the signed-off-by field.

 drivers/staging/rtl8192u/r8190_rtl8256.c | 169 +++
 1 file changed, 79 insertions(+), 90 deletions(-)

diff --git a/drivers/staging/rtl8192u/r8190_rtl8256.c 
b/drivers/staging/rtl8192u/r8190_rtl8256.c
index 08e1bc9..43ed768 100644
--- a/drivers/staging/rtl8192u/r8190_rtl8256.c
+++ b/drivers/staging/rtl8192u/r8190_rtl8256.c
@@ -23,62 +23,64 @@
  * Return:  NONE
  * Note:   8226 support both 20M  and 40 MHz
  *---*/
-void PHY_SetRF8256Bandwidth(struct net_device *dev , HT_CHANNEL_WIDTH 
Bandwidth)   //20M or 40M
+void PHY_SetRF8256Bandwidth(struct net_device *dev , HT_CHANNEL_WIDTH 
+Bandwidth)
 {
u8  eRFPath;
struct r8192_priv *priv = ieee80211_priv(dev);
 
-   //for(eRFPath = RF90_PATH_A; eRFPath NumTotalRFPath; 
eRFPath++)
-   for(eRFPath = 0; eRFPath NumTotalRFPath;
+*  eRFPath++)
+*/
+   for (eRFPath = 0; eRFPath < RF90_PATH_MAX; eRFPath++) {
if (!rtl8192_phy_CheckIsLegalRFPath(dev, eRFPath))
continue;
 
-   switch (Bandwidth)
-   {
-   case HT_CHANNEL_WIDTH_20:
-   if(priv->card_8192_version == VERSION_819xU_A 
|| priv->card_8192_version == VERSION_819xU_B)// 8256 D-cut, E-cut, xiong: 
consider it later!
-   {
-   rtl8192_phy_SetRFReg(dev, 
(RF90_RADIO_PATH_E)eRFPath, 0x0b, bMask12Bits, 0x100); //phy para:1ba
-   rtl8192_phy_SetRFReg(dev, 
(RF90_RADIO_PATH_E)eRFPath, 0x2c, bMask12Bits, 0x3d7);
-   rtl8192_phy_SetRFReg(dev, 
(RF90_RADIO_PATH_E)eRFPath, 0x0e, bMask12Bits, 0x021);
-
-   //cosa add for sd3's request 01/23/2008
-   rtl8192_phy_SetRFReg(dev, 
(RF90_RADIO_PATH_E)eRFPath, 0x14, bMask12Bits, 0x5ab);
-   }
-   else
-   {
+   switch (Bandwidth) {
+   case HT_CHANNEL_WIDTH_20:
+   if (priv->card_8192_version == VERSION_819xU_A
+   || priv->card_8192_version
+   == VERSION_819xU_B) { /* 8256 D-cut, 
E-cut, xiong: consider it later! */
+   rtl8192_phy_SetRFReg(dev,
+   (RF90_RADIO_PATH_E)eRFPath,
+   0x0b, bMask12Bits, 0x100); /* 
phy para:1ba */
+   rtl8192_phy_SetRFReg(dev,
+   (RF90_RADIO_PATH_E)eRFPath,
+   0x2c, bMask12Bits, 0x3d7);
+   rtl8192_phy_SetRFReg(dev,
+   (RF90_RADIO_PATH_E)eRFPath,
+   0x0e, bMask12Bits, 0x021);
+
+   /* cosa add for sd3's request 01/23/2008
+*/
+   rtl8192_phy_SetRFReg(dev,
+   (RF90_RADIO_PATH_E)eRFPath,
+   0x14, bMask12Bits, 0x5ab);
+   } else {
RT_TRACE(COMP_ERR, 
"PHY_SetRF8256Bandwidth(): unknown hardware version\n");
-   }
-
+   }
break;
-   case HT_CHANNEL_WIDTH_20_40:
-   if(priv->card_8192_version == VERSION_819xU_A 
||priv->card_8192_version == VERSION_819xU_B)//

RE: [PATCH] staging:r8190: coding style: Fixed checkpatch reported Error

2014-07-30 Thread Sharma, Sanjeev
Hi Greg,

I have resent all the patches in order. Please review.

Regards
Sanjeev Sharma

-Original Message-
From: Greg KH [mailto:gre...@linuxfoundation.org] 
Sent: Thursday, July 31, 2014 5:51 AM
To: Sharma, Sanjeev
Cc: de...@driverdev.osuosl.org; oor...@gmail.com; linux-ker...@vger.kernel.org
Subject: Re: [PATCH] staging:r8190: coding style: Fixed checkpatch reported 
Error

On Tue, Jul 29, 2014 at 04:41:53PM +0530, Sanjeev Sharma wrote:
> This is a patch to the r8190_rtl8256.c file that fixes checkpatch 
> reported space & coding style issues.
> 
> Signed-off-by: Sanjeev Sharma

Please use a ' ' character...

Please resend all of your patches, they don't have signed-off-by lines, and I 
don't know what order to apply them in, even if I could do so.

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


RE: [PATCH] staging: android: Fixed missing blank line

2014-07-27 Thread Sharma, Sanjeev
Hello Greg,

I didn't received automated email.

Regards
Sanjeev Sharma

-Original Message-
From: Greg KH [mailto:gre...@linuxfoundation.org] 
Sent: Wednesday, July 23, 2014 8:55 PM
To: Sharma, Sanjeev
Cc: de...@driverdev.osuosl.org; swetl...@google.com; way...@gmail.com; 
linux-ker...@vger.kernel.org; dan...@ffwll.ch
Subject: Re: [PATCH] staging: android: Fixed missing blank line

On Wed, Jul 23, 2014 at 10:08:44AM +0000, Sharma, Sanjeev wrote:
> Thanks, so this is also available in next kernel release version.

I don't understand the question.  You should have gotten an automated email 
when the patch was applied that explained where the patch was now located, and 
when it would be merged into Linus's tree.  Did you not get that?

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


RE: [PATCH] staging: android: Fixed missing blank line

2014-07-23 Thread Sharma, Sanjeev
Thanks, so this is also available in next kernel release version.

Regards
Sanjeev Sharma

-Original Message-
From: Greg KH [mailto:gre...@linuxfoundation.org] 
Sent: Saturday, July 19, 2014 4:46 AM
To: Sharma, Sanjeev
Cc: de...@driverdev.osuosl.org; way...@gmail.com; swetl...@google.com; 
linux-ker...@vger.kernel.org; dan...@ffwll.ch
Subject: Re: [PATCH] staging: android: Fixed missing blank line

On Fri, Jul 18, 2014 at 10:17:54AM +0530, Sanjeev Sharma wrote:
> This patch will add an blank line after declaration reported by 
> checkpatch.pl script.
> 
> Signed-off-by: Sanjeev Sharma 
> ---
>  drivers/staging/android/sw_sync.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/staging/android/sw_sync.c 
> b/drivers/staging/android/sw_sync.c
> index a76db3f..863d4b1 100644
> --- a/drivers/staging/android/sw_sync.c
> +++ b/drivers/staging/android/sw_sync.c
> @@ -97,6 +97,7 @@ static void sw_sync_pt_value_str(struct sync_pt *sync_pt,
>  char *str, int size)
>  {
>   struct sw_sync_pt *pt = (struct sw_sync_pt *)sync_pt;
> +
>   snprintf(str, size, "%d", pt->value);  }
>  
> @@ -156,6 +157,7 @@ static int sw_sync_open(struct inode *inode, 
> struct file *file)  static int sw_sync_release(struct inode *inode, 
> struct file *file)  {
>   struct sw_sync_timeline *obj = file->private_data;
> +
>   sync_timeline_destroy(&obj->obj);
>   return 0;
>  }

I already applied a previous version of this patch, with your gmail address :(
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


RE: [PATCH v2] staging: android: Fixed missing blank line

2014-07-17 Thread Sharma, Sanjeev
Done ! ,Please review now.

Regards
Sanjeev Sharma

-Original Message-
From: Dan Carpenter [mailto:dan.carpen...@oracle.com] 
Sent: Thursday, July 17, 2014 2:41 PM
To: Sharma, Sanjeev
Cc: gre...@linuxfoundation.org; de...@driverdev.osuosl.org; way...@gmail.com; 
swetl...@google.com; linux-ker...@vger.kernel.org; dan...@ffwll.ch
Subject: Re: [PATCH v2] staging: android: Fixed missing blank line

On Thu, Jul 17, 2014 at 02:43:27PM +0530, sanjeev sharma wrote:
> From: sanjeevs1 

Only use this if you are sending on behalf of someone else.

> 
> This patch will add an blank line after declaration reported by 
> checkpatch.pl script.
> 
> Signed-off-by: Sanjeev Sharma 
> ---
> Changes in v2:
>   - Fixed frm header

Send these to yourself to test.

Also look at your email.
Bad  - From: sanjeev sharma  Good - From: Sanjeev 
Sharma 

regards,
dan carpenter

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


RE: [PATCH v3 1/4] staging: rtl8192u: Remove useless return statements.

2014-07-10 Thread Sharma, Sanjeev
Thanks Greg for review.

Change has been just pushed now with version 4.

Regards
Sanjeev Sharma

-Original Message-
From: Greg KH [mailto:gre...@linuxfoundation.org] 
Sent: Thursday, July 10, 2014 12:55 AM
To: sanjeev sharma
Cc: de...@driverdev.osuosl.org; peter.se...@gmail.com; 
linux-ker...@vger.kernel.org; rmf...@gmail.com; teobal...@gmail.com; Sharma, 
Sanjeev
Subject: Re: [PATCH v3 1/4] staging: rtl8192u: Remove useless return statements.

On Wed, Jul 09, 2014 at 05:49:39PM +0530, sanjeev sharma wrote:
> From: sanjeev sharma 

No "S" characters?

And your 0/4 Subject: was really odd, please fix up and resend all of these.

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


RE: [PATCH v3 4/4] staging: rtl8192u: Fixed too long lines

2014-07-10 Thread Sharma, Sanjeev
Hi Joe,

I have incorporated your review comment  in version v4.

Regards
Sanjeev Sharma 

-Original Message-
From: Joe Perches [mailto:j...@perches.com] 
Sent: Wednesday, July 09, 2014 6:27 PM
To: sanjeev sharma
Cc: gre...@linuxfoundation.org; rmf...@gmail.com; peter.se...@gmail.com; 
teobal...@gmail.com; de...@driverdev.osuosl.org; linux-ker...@vger.kernel.org; 
Sharma, Sanjeev
Subject: Re: [PATCH v3 4/4] staging: rtl8192u: Fixed too long lines

On Wed, 2014-07-09 at 17:49 +0530, sanjeev sharma wrote:
> This patch will fix too long lines warning reported by checkpatch.pl.

Hi Sanjeev.

> diff --git a/drivers/staging/rtl8192u/r819xU_phy.c 
> b/drivers/staging/rtl8192u/r819xU_phy.c
[]
> @@ -1786,7 +1788,9 @@ void InitialGainOperateWorkItemCallBack(struct 
> work_struct *work)
>   RT_TRACE(COMP_SCAN, "Scan BBInitialGainRestore 0xa0a is %x\n",
>priv->initgain_backup.cca);
>  
> - rtl8192_phy_setTxPower(dev, 
> priv->ieee80211->current_network.channel);
> + rtl8192_phy_setTxPower(dev,
> + priv->ieee80211->current_network.channel
> +);

This one is a little off

+   rtl8192_phy_setTxPower(dev,
+   priv->ieee80211->current_network.channel
+  );

Please align multiline statements to the appropriate open parenthesis using a 
mix of initial leading tabs followed by the minimal number of spaces required 
to put the first non-whitespace char at the column immediately after the 
preceding open paren.

Here it's 4 tabs, 7 spaces, not 5 tabs:

+   rtl8192_phy_setTxPower(dev,
+  
priv->ieee80211->current_network.channel);

And please don't use a line that's just a close parenthesis and semicolon.

I think it's better to ignore the 80 column limit for these and place them at 
the end of the preceding line.


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


RE: [PATCH v2 1/4] staging: rtl8192u: Remove useless return statement in r819xU_phy.c

2014-07-09 Thread Sharma, Sanjeev
Thanks Dan,


-Original Message-
From: Dan Carpenter [mailto:dan.carpen...@oracle.com] 
Sent: Wednesday, July 09, 2014 1:40 PM
To: sanjeev sharma
Cc: gre...@linuxfoundation.org; de...@driverdev.osuosl.org; 
peter.se...@gmail.com; linux-ker...@vger.kernel.org; rmf...@gmail.com; 
teobal...@gmail.com; Sharma, Sanjeev
Subject: Re: [PATCH v2 1/4] staging: rtl8192u: Remove useless return statement 
in r819xU_phy.c

These patches look ok now.  The only thing is that the changelogs are a little 
off.

On Wed, Jul 09, 2014 at 11:34:17AM +0530, sanjeev sharma wrote:
> From: sanjeev sharma 

Don't use the From header unless you are sending patches on behalf of someone 
else.  It's better if you can configure your email client so you can send the 
patches from your @mentor.com address.  It would be better if the names were 
capitalized.

I will take care for future patches and configure email client by using mentor 
address.

> 
> This is a patch to the r819xU_phy.c file that remove unneeded return 
> statements in code.

Please line wrap the changelog at 72 characters (the same as email).
Otherwise Greg sometimes fixes them manually...

But the patches themselves are nice now.

@Greg.,@Dan: Is it Ok if this can be taken care in future.

regards,
dan carpenter

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