Skip to contentSkip to conversation

Staging: rtl8712: ieee80211: fixed coding style issue

PATCH In review Jaya Durga 4 participants 5 messages Jun 11, 2017 – Jun 13, 2017 1 message not in the archive Staging

lore
Share & tools
lore

Jaya Durga

author
#0 lore raw

PATCH 10/10 Staging: rtl8712: ieee80211: fixed coding style issue

Fixed WARNING: line over 80 characters

---
 drivers/staging/rtl8712/ieee80211.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8712/ieee80211.c +0 -0
index 6e673c1..97ef063 100644
@@ -174,8 +174,8 @@ int r8712_generate_ie(struct registry_priv *pregistrypriv)
	sz += 8;
	ie += sz;
	/*beacon interval : 2bytes*/
-	*(__le16 *)ie = cpu_to_le16(
-				(u16)pdev_network->configuration.beacon_period);
+	struct NDIS_802_11_CONFIGURATION *cfg = &pdev_network->configuration;
+	*(__le16 *)ie = cpu_to_le16(cfg->beacon_period);
	sz += 2;
	ie += 2;
	/*capability info*/

--
1.9.1

#1 lore raw

The patch numbering doesn't make sense.

regards,
dan carpenter

A message that is not in the archive (sent off-list or not yet received): 1515429128.1447.1497331078332.JavaMail.open-xchange@webmail.cdac.in

maintainer
#3 lore raw
Quoted 7 lines · R Jayadurga

This e-mail is for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies and the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email is strictly prohibited and appropriate legal action will be taken.
-------------------------------------------------------------------------------------------------------------------------------

As per your footer, I am deleting your email.

Please note that I'm really not supposed to be responding to this at all, as this type of text is not allowed at all on kernel development mialing lists...

#4 lore raw

sorry for the inconvenience caused i have corrected it.

Regards,
Jaya Durga R

Quoted 9 lines · Greg KH
Quoted 7 lines · R Jayadurga

This e-mail is for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies and the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email is strictly prohibited and appropriate legal action will be taken.
-------------------------------------------------------------------------------------------------------------------------------

Quoted 5 lines

As per your footer, I am deleting your email.

Please note that I'm really not supposed to be responding to this at all, as this type of text is not allowed at all on kernel development mialing lists...

-------------------------------------------------------------------------------------------------------------------------------
[ C-DAC is on Social-Media too. Kindly follow us at:
Facebook: https://www.facebook.com/CDACINDIA & Twitter: @cdacindia ]

This e-mail is for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies and the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email is strictly prohibited and appropriate legal action will be taken.
-------------------------------------------------------------------------------------------------------------------------------

#5 lore raw
In reply to Jaya Durga
Quoted 15 lines · Jaya Durga

Fixed WARNING: line over 80 characters

---
 drivers/staging/rtl8712/ieee80211.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--
1.9.1

drivers/staging/rtl8712/ieee80211.c +0 -0
index 6e673c1..97ef063 100644

drivers/staging/rtl8712/ieee80211.c int r8712_generate_ie(struct registry_priv *pregistrypriv) · line 178

Quoted 7 lines
drivers/staging/rtl8712/ieee80211.c +2 -2
@@ -174,8 +174,8 @@ int r8712_generate_ie(struct registry_priv *pregistrypriv)
 	sz += 8;
 	ie += sz;
 	/*beacon interval : 2bytes*/
-	*(__le16 *)ie = cpu_to_le16(
-				(u16)pdev_network->configuration.beacon_period);
+	struct NDIS_802_11_CONFIGURATION *cfg = &pdev_network->configuration;
+	*(__le16 *)ie = cpu_to_le16(cfg->beacon_period);

Do you really think that the resulting

drivers/staging/rtl8712/ieee80211.c:177:2: warning:
ISO C90 forbids mixed declarations and code

is better ?

Guenter

Quoted 3 lines
drivers/staging/rtl8712/ieee80211.c +0 -0
 	sz += 2;
 	ie += 2;
 	/*capability info*/