Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1417312 > unrolled thread

[PATCH] staging: rtl8712: Fixed multiple parenthesis alignment warnings in ieee80211.c

Started byParth Sane <laerdevstudios@gmail.com>
First post2016-06-08 13:30 +0200
Last post2016-06-08 14:30 +0200
Articles 5 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] staging: rtl8712: Fixed multiple parenthesis alignment warnings in ieee80211.c Parth Sane <laerdevstudios@gmail.com> - 2016-06-08 13:30 +0200
    Re: [PATCH] staging: rtl8712: Fixed multiple parenthesis alignment  warnings in ieee80211.c Luis de Bethencourt <luisbg@osg.samsung.com> - 2016-06-08 13:40 +0200
      Re: [PATCH] staging: rtl8712: Fixed multiple parenthesis alignment warnings in ieee80211.c Parth Sane <laerdevstudios@gmail.com> - 2016-06-08 13:40 +0200
        Re: [PATCH] staging: rtl8712: Fixed multiple parenthesis alignment warnings in ieee80211.c Parth Sane <laerdevstudios@gmail.com> - 2016-06-08 14:00 +0200
          Re: [PATCH] staging: rtl8712: Fixed multiple parenthesis alignment warnings in ieee80211.c Parth Sane <laerdevstudios@gmail.com> - 2016-06-08 14:30 +0200

#1417312 — [PATCH] staging: rtl8712: Fixed multiple parenthesis alignment warnings in ieee80211.c

FromParth Sane <laerdevstudios@gmail.com>
Date2016-06-08 13:30 +0200
Subject[PATCH] staging: rtl8712: Fixed multiple parenthesis alignment warnings in ieee80211.c
Message-ID<rHJQn-7Xe-43@gated-at.bofh.it>
Multiple parenthesis alignment warnings were thrown by checkpatch in ieee80211.c
This patch effectively fixes that.

Signed-off-by: Parth Sane <laerdevstudios@gmail.com>

---
 drivers/staging/rtl8712/ieee80211.c | 25 ++++++++++++-------------
 1 file changed, 12 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/rtl8712/ieee80211.c b/drivers/staging/rtl8712/ieee80211.c
index 8918654..5dc3b5b 100644
--- a/drivers/staging/rtl8712/ieee80211.c
+++ b/drivers/staging/rtl8712/ieee80211.c
@@ -145,7 +145,7 @@ static void set_supported_rate(u8 *rates, uint mode)
 	case WIRELESS_11BG:
 		memcpy(rates, WIFI_CCKRATES, IEEE80211_CCK_RATE_LEN);
 		memcpy(rates + IEEE80211_CCK_RATE_LEN, WIFI_OFDMRATES,
-			IEEE80211_NUM_OFDM_RATESLEN);
+		       IEEE80211_NUM_OFDM_RATESLEN);
 		break;
 	}
 }
@@ -188,24 +188,24 @@ int r8712_generate_ie(struct registry_priv *pregistrypriv)
 	ie += 2;
 	/*SSID*/
 	ie = r8712_set_ie(ie, _SSID_IE_, pdev_network->Ssid.SsidLength,
-		    pdev_network->Ssid.Ssid, &sz);
+			  pdev_network->Ssid.Ssid, &sz);
 	/*supported rates*/
 	set_supported_rate(pdev_network->rates, pregistrypriv->wireless_mode);
 	rateLen = r8712_get_rateset_len(pdev_network->rates);
 	if (rateLen > 8) {
 		ie = r8712_set_ie(ie, _SUPPORTEDRATES_IE_, 8,
-			    pdev_network->rates, &sz);
+				  pdev_network->rates, &sz);
 		ie = r8712_set_ie(ie, _EXT_SUPPORTEDRATES_IE_, (rateLen - 8),
-			    (pdev_network->rates + 8), &sz);
+				  (pdev_network->rates + 8), &sz);
 	} else
 		ie = r8712_set_ie(ie, _SUPPORTEDRATES_IE_,
-			    rateLen, pdev_network->rates, &sz);
+				  rateLen, pdev_network->rates, &sz);
 	/*DS parameter set*/
 	ie = r8712_set_ie(ie, _DSSET_IE_, 1,
-		    (u8 *)&(pdev_network->Configuration.DSConfig), &sz);
+			  (u8 *)&(pdev_network->Configuration.DSConfig), &sz);
 	/*IBSS Parameter Set*/
 	ie = r8712_set_ie(ie, _IBSS_PARA_IE_, 2,
-		    (u8 *)&(pdev_network->Configuration.ATIMWindow), &sz);
+			  (u8 *)&(pdev_network->Configuration.ATIMWindow), &sz);
 	return sz;
 }
 
@@ -220,8 +220,7 @@ unsigned char *r8712_get_wpa_ie(unsigned char *pie, int *wpa_ie_len, int limit)
 		pbuf = r8712_get_ie(pbuf, _WPA_IE_ID_, &len, limit);
 		if (pbuf) {
 			/*check if oui matches...*/
-			if (memcmp((pbuf + 2), wpa_oui_type,
-			    sizeof(wpa_oui_type)))
+			if (memcmp((pbuf + 2), wpa_oui_type, sizeof(wpa_oui_type)))
 				goto check_next_ie;
 			/*check version...*/
 			memcpy((u8 *)&val16, (pbuf + 6), sizeof(val16));
@@ -279,7 +278,7 @@ static int r8712_get_wpa2_cipher_suite(u8 *s)
 }
 
 int r8712_parse_wpa_ie(u8 *wpa_ie, int wpa_ie_len, int *group_cipher,
-		 int *pairwise_cipher)
+		       int *pairwise_cipher)
 {
 	int i;
 	int left, count;
@@ -322,7 +321,7 @@ int r8712_parse_wpa_ie(u8 *wpa_ie, int wpa_ie_len, int *group_cipher,
 }
 
 int r8712_parse_wpa2_ie(u8 *rsn_ie, int rsn_ie_len, int *group_cipher,
-		  int *pairwise_cipher)
+			int *pairwise_cipher)
 {
 	int i;
 	int left, count;
@@ -365,7 +364,7 @@ int r8712_parse_wpa2_ie(u8 *rsn_ie, int rsn_ie_len, int *group_cipher,
 }
 
 int r8712_get_sec_ie(u8 *in_ie, uint in_len, u8 *rsn_ie, u16 *rsn_len,
-	       u8 *wpa_ie, u16 *wpa_len)
+		     u8 *wpa_ie, u16 *wpa_len)
 {
 	u8 authmode;
 	u8 wpa_oui[4] = {0x0, 0x50, 0xf2, 0x01};
@@ -383,7 +382,7 @@ int r8712_get_sec_ie(u8 *in_ie, uint in_len, u8 *rsn_ie, u16 *rsn_len,
 		} else {
 			if (authmode == _WPA2_IE_ID_) {
 				memcpy(rsn_ie, &in_ie[cnt],
-					in_ie[cnt + 1] + 2);
+				       in_ie[cnt + 1] + 2);
 				*rsn_len = in_ie[cnt + 1] + 2;
 				cnt += in_ie[cnt + 1] + 2;  /*get next*/
 			} else {
-- 
1.9.1

[toc] | [next] | [standalone]


#1417316 — Re: [PATCH] staging: rtl8712: Fixed multiple parenthesis alignment warnings in ieee80211.c

FromLuis de Bethencourt <luisbg@osg.samsung.com>
Date2016-06-08 13:40 +0200
SubjectRe: [PATCH] staging: rtl8712: Fixed multiple parenthesis alignment warnings in ieee80211.c
Message-ID<rHK02-80s-9@gated-at.bofh.it>
In reply to#1417312
On 08/06/16 12:27, Parth Sane wrote:
> Multiple parenthesis alignment warnings were thrown by checkpatch in ieee80211.c
> This patch effectively fixes that.
> 
> Signed-off-by: Parth Sane <laerdevstudios@gmail.com>
> 
> ---
>  drivers/staging/rtl8712/ieee80211.c | 25 ++++++++++++-------------
>  1 file changed, 12 insertions(+), 13 deletions(-)

Some of the lines you change are over 80 characters. You could fix those as well in
a second patch :)

Thanks,
Luis

[toc] | [prev] | [next] | [standalone]


#1417318

FromParth Sane <laerdevstudios@gmail.com>
Date2016-06-08 13:40 +0200
Message-ID<rHK02-80s-7@gated-at.bofh.it>
In reply to#1417316

[Multipart message — attachments visible in raw view] — view raw

> On 08-Jun-2016, at 5:01 PM, Luis de Bethencourt <luisbg@osg.samsung.com> wrote:
> 
> On 08/06/16 12:27, Parth Sane wrote:
>> Multiple parenthesis alignment warnings were thrown by checkpatch in ieee80211.c
>> This patch effectively fixes that.
>> 
>> Signed-off-by: Parth Sane <laerdevstudios@gmail.com>
>> 
>> ---
>> drivers/staging/rtl8712/ieee80211.c | 25 ++++++++++++-------------
>> 1 file changed, 12 insertions(+), 13 deletions(-)
> 
> Some of the lines you change are over 80 characters. You could fix those as well in
> a second patch :)
> 
> Thanks,
> Luis
> 

You’re right on that regard. Maybe once this is accepted I can come back to other warnings. I will submit other patches meanwhile.
I seriously want to see this driver in the next release!
Regards,
Parth

[toc] | [prev] | [next] | [standalone]


#1417322

FromParth Sane <laerdevstudios@gmail.com>
Date2016-06-08 14:00 +0200
Message-ID<rHKjn-86P-1@gated-at.bofh.it>
In reply to#1417318

[Multipart message — attachments visible in raw view] — view raw

I’m trying to fix line 224 but its simply not happening. Can you help me with this?
Regards,
Parth
> On 08-Jun-2016, at 5:19 PM, Luis de Bethencourt <luisbg@osg.samsung.com> wrote:
> 
> On 08/06/16 12:37, Parth Sane wrote:
>> 
>>> On 08-Jun-2016, at 5:01 PM, Luis de Bethencourt <luisbg@osg.samsung.com> wrote:
>>> 
>>> On 08/06/16 12:27, Parth Sane wrote:
>>>> Multiple parenthesis alignment warnings were thrown by checkpatch in ieee80211.c
>>>> This patch effectively fixes that.
>>>> 
>>>> Signed-off-by: Parth Sane <laerdevstudios@gmail.com>
>>>> 
>>>> ---
>>>> drivers/staging/rtl8712/ieee80211.c | 25 ++++++++++++-------------
>>>> 1 file changed, 12 insertions(+), 13 deletions(-)
>>> 
>>> Some of the lines you change are over 80 characters. You could fix those as well in
>>> a second patch :)
>>> 
>>> Thanks,
>>> Luis
>>> 
>> 
>> You’re right on that regard. Maybe once this is accepted I can come back to other warnings. I will submit other patches meanwhile.
>> I seriously want to see this driver in the next release!
>> Regards,
>> Parth
>> 
> 
> You can resend this patch and the one fixing the 80 char limit with the subject
> prefix [RESEND PATCH v2 x/2].
> 
> AFAIK this driver is already in the release, check menuconfig under
> "Device Drivers > Staging drivers > Realtek RTL8172"
> 
> Thanks,
> Luis

[toc] | [prev] | [next] | [standalone]


#1417354

FromParth Sane <laerdevstudios@gmail.com>
Date2016-06-08 14:30 +0200
Message-ID<rHKMp-8w1-3@gated-at.bofh.it>
In reply to#1417322

[Multipart message — attachments visible in raw view] — view raw

No mate, that aint just cutting it.
I tried putting it, maybe i’m doing something wrong?
Regards,
Parth
> On 08-Jun-2016, at 5:46 PM, Luis de Bethencourt <luisbg@osg.samsung.com> wrote:
> 
> On 08/06/16 12:58, Parth Sane wrote:
>> I’m trying to fix line 224 but its simply not happening. Can you help me with this?
>> Regards,
>> Parth
>>> On 08-Jun-2016, at 5:19 PM, Luis de Bethencourt <luisbg@osg.samsung.com> wrote:
>>> 
>>> On 08/06/16 12:37, Parth Sane wrote:
>>>> 
>>>>> On 08-Jun-2016, at 5:01 PM, Luis de Bethencourt <luisbg@osg.samsung.com> wrote:
>>>>> 
>>>>> On 08/06/16 12:27, Parth Sane wrote:
>>>>>> Multiple parenthesis alignment warnings were thrown by checkpatch in ieee80211.c
>>>>>> This patch effectively fixes that.
>>>>>> 
>>>>>> Signed-off-by: Parth Sane <laerdevstudios@gmail.com>
>>>>>> 
>>>>>> ---
>>>>>> drivers/staging/rtl8712/ieee80211.c | 25 ++++++++++++-------------
>>>>>> 1 file changed, 12 insertions(+), 13 deletions(-)
>>>>> 
>>>>> Some of the lines you change are over 80 characters. You could fix those as well in
>>>>> a second patch :)
>>>>> 
>>>>> Thanks,
>>>>> Luis
>>>>> 
>>>> 
>>>> You’re right on that regard. Maybe once this is accepted I can come back to other warnings. I will submit other patches meanwhile.
>>>> I seriously want to see this driver in the next release!
>>>> Regards,
>>>> Parth
>>>> 
>>> 
>>> You can resend this patch and the one fixing the 80 char limit with the subject
>>> prefix [RESEND PATCH v2 x/2].
>>> 
>>> AFAIK this driver is already in the release, check menuconfig under
>>> "Device Drivers > Staging drivers > Realtek RTL8172"
>>> 
>>> Thanks,
>>> Luis
>> 
> 
> Sure.
> 
> You want something like this:
> -                       if (memcmp((pbuf + 2), wpa_oui_type, sizeof(wpa_oui_type)))
> +                       if (memcmp((pbuf + 2), wpa_oui_type,
> +                                  sizeof(wpa_oui_type)))
> 
> You could check for references of how other parts of the code have solved it
> by doing:
> git grep memcpy * | grep -v ";"
> 
> I hope that helps.
> Luis
> 
> 
> 
> Reviewed-by: Luis de Bethencourt <luisbg@osg.samsung.com>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web