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


Groups > linux.kernel > #1208175 > unrolled thread

[PATCH 00/20] staging: rtl8192u: r8192U_core: fix all checkpatch.pl reports

Started byRaphaël Beamonte <raphael.beamonte@gmail.com>
First post2015-08-16 03:40 +0200
Last post2015-08-19 13:00 +0200
Articles 20 on this page of 37 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 00/20] staging: rtl8192u: r8192U_core: fix all checkpatch.pl reports Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-16 03:40 +0200
    [PATCH 19/20] staging: rtl8192u: r8192U_core: fix use ether_addr_copy() over memcpy() code style issue Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-16 03:40 +0200
    [PATCH 11/20] staging: rtl8192u: r8192U_core: fix unecessary braces code style issue Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-16 03:40 +0200
    [PATCH 06/20] staging: rtl8192u: r8192U_core: fix missing struct leading to consistent spacing code style error Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-16 03:40 +0200
      Re: [PATCH 06/20] staging: rtl8192u: r8192U_core: fix missing struct  leading to consistent spacing code style error Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-08-18 07:20 +0200
    [PATCH 09/20] staging: rtl8192u: r8192U_core: include linux/uaccess.h instead of asm/uaccess.h Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-16 03:40 +0200
    [PATCH 18/20] staging: rtl8192u: r8192U_core: fix quoted string split across lines code style issue Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-16 03:40 +0200
    [PATCH 05/20] staging: rtl8192u: r8192U_core: fix else following close brace code style error Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-16 03:40 +0200
    [PATCH 15/20] staging: rtl8192u: r8192U_core: fix unnecessary else after return code style issue Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-16 03:40 +0200
    [PATCH 12/20] staging: rtl8192u: r8192U_core: fix externs in .c file code style issue Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-16 03:40 +0200
      Re: [PATCH 12/20] staging: rtl8192u: r8192U_core: fix externs in .c  file code style issue Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-08-18 07:40 +0200
        Re: [PATCH 12/20] staging: rtl8192u: r8192U_core: fix externs in .c  file code style issue Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-18 07:50 +0200
    [PATCH 17/20] staging: rtl8192u: r8192U_core: fix missing blank line after declarations code style issue Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-16 03:40 +0200
    [PATCH 14/20] staging: rtl8192u: r8192U_core: fix unnecessary parentheses code style issue Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-16 03:40 +0200
    [PATCH 02/20] staging: rtl8192u: r8192U_core: fix consistent spacing code style error Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-16 03:40 +0200
      Re: [PATCH 02/20] staging: rtl8192u: r8192U_core: fix consistent  spacing code style error Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-08-18 07:10 +0200
        Re: [PATCH 02/20] staging: rtl8192u: r8192U_core: fix consistent  spacing code style error Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-18 07:40 +0200
          Re: [PATCH 02/20] staging: rtl8192u: r8192U_core: fix consistent  spacing code style error Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-08-18 07:50 +0200
            Re: [PATCH 02/20] staging: rtl8192u: r8192U_core: fix consistent  spacing code style error Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-18 08:10 +0200
              Re: [PATCH 02/20] staging: rtl8192u: r8192U_core: fix consistent  spacing code style error Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-08-18 08:20 +0200
    [PATCH 04/20] staging: rtl8192u: r8192U_core: fix code indent using spaces code style error Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-16 03:50 +0200
    Re: [PATCH 07/20] staging: rtl8192u: r8192_core: whitespace neatening Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-08-18 07:30 +0200
    [PATCHv2 00/19] staging: rtl8192u: r8192U_core: fix all checkpatch.pl reports Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-18 19:00 +0200
      [PATCHv2 17/19] staging: rtl8192u: r8192U_core: fix quoted string split across lines code style issue Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-18 19:00 +0200
      [PATCHv2 03/19] staging: rtl8192u: r8192U_core: fix code indent using spaces code style error Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-18 19:00 +0200
      [PATCHv2 08/19] staging: rtl8192u: r8192U_core: include linux/uaccess.h instead of asm/uaccess.h Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-18 19:00 +0200
      [PATCHv2 01/19] staging: rtl8192u: r8192U_core: fix switch and case indent code style error Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-18 19:00 +0200
      [PATCHv2 18/19] staging: rtl8192u: r8192U_core: fix use ether_addr_copy() over memcpy() code style issue Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-18 19:00 +0200
      [PATCHv2 16/19] staging: rtl8192u: r8192U_core: fix missing blank line after declarations code style issue Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-18 19:00 +0200
      [PATCHv2 14/19] staging: rtl8192u: r8192U_core: fix unnecessary else after return code style issue Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-18 19:10 +0200
      [PATCHv2 09/19] staging: rtl8192u: r8192U_core: remove return statement of void function Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-18 19:10 +0200
      [PATCHv2 02/19] staging: rtl8192u: r8192U_core: fix space before close parenthesis code style error Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-18 19:10 +0200
      [PATCHv2 11/19] staging: rtl8192u: r8192U_core: remove forward declarations in .c file Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-18 19:10 +0200
      [PATCHv2 15/19] staging: rtl8192u: r8192U_core: fix unnecessary whitespace code style issue Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-18 19:10 +0200
      [PATCHv2 04/19] staging: rtl8192u: r8192U_core: fix else following close brace code style error Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-18 19:10 +0200
      [PATCHv2 05/19] staging: rtl8192u: r8192U_core: fix missing struct leading to consistent spacing code style error Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-08-18 19:10 +0200
      Re: [PATCHv2 19/19] staging: rtl8192u: r8192U_core: fix line over 80  characters code style issue Dan Carpenter <dan.carpenter@oracle.com> - 2015-08-19 13:00 +0200

Page 1 of 2  [1] 2  Next page →


#1208175 — [PATCH 00/20] staging: rtl8192u: r8192U_core: fix all checkpatch.pl reports

FromRaphaël Beamonte <raphael.beamonte@gmail.com>
Date2015-08-16 03:40 +0200
Subject[PATCH 00/20] staging: rtl8192u: r8192U_core: fix all checkpatch.pl reports
Message-ID<pXV5v-28H-3@gated-at.bofh.it>
Hello,

This patches series fixes all the checkpatch.pl errors and warnings on
the file drivers/staging/rtl8192u/r8192U_core.c.

checkpatch.pl tail output before patches: (on staging-testing)
	total: 334 errors, 402 warnings, 4909 lines checked
checkpath.pl output after patches:
	total: 0 errors, 0 warnings, 5379 lines checked	

Thanks,
Raphaël


Raphaël Beamonte (20):
  staging: rtl8192u: r8192U_core: fix switch and case indent code style
    error
  staging: rtl8192u: r8192U_core: fix consistent spacing code style
    error
  staging: rtl8192u: t8192U_core: fix space before close parenthesis
    code style error
  staging: rtl8192u: r8192U_core: fix code indent using spaces code
    style error
  staging: rtl8192u: r8192U_core: fix else following close brace code
    style error
  staging: rtl8192u: r8192U_core: fix missing struct leading to
    consistent spacing code style error
  staging: rtl8192u: r8192_core: whitespace neatening
  staging: rtl8192u: r8192_core: clean C99 // comments
  staging: rtl8192u: r8192U_core: include linux/uaccess.h instead of
    asm/uaccess.h
  staging: rtl8192u: r8192U_core: remove return statement of void
    function
  staging: rtl8192u: r8192U_core: fix unecessary braces code style issue
  staging: rtl8192u: r8192U_core: fix externs in .c file code style
    issue
  staging: rtl8192u: r8192U_core: fix unnecessary check before kfree
    code style issue
  staging: rtl8192u: r8192U_core: fix unnecessary parentheses code style
    issue
  staging: rtl8192u: r8192U_core: fix unnecessary else after return code
    style issue
  staging: rtl8192u: r8192U_core: fix unnecessary whitespace code style
    issue
  staging: rtl8192u: r8192U_core: fix missing blank line after
    declarations code style issue
  staging: rtl8192u: r8192U_core: fix quoted string split across lines
    code style issue
  staging: rtl8192u: r8192U_core: fix use ether_addr_copy() over
    memcpy() code style issue
  staging: rtl8192u: r8192U_core: fix line over 80 characters code style
    issue

 drivers/staging/rtl8192u/r8192U_core.c | 2258 +++++++++++++++++++-------------
 lib/Kconfig.debug                      |    2 +-
 2 files changed, 1365 insertions(+), 895 deletions(-)

-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1208176 — [PATCH 19/20] staging: rtl8192u: r8192U_core: fix use ether_addr_copy() over memcpy() code style issue

FromRaphaël Beamonte <raphael.beamonte@gmail.com>
Date2015-08-16 03:40 +0200
Subject[PATCH 19/20] staging: rtl8192u: r8192U_core: fix use ether_addr_copy() over memcpy() code style issue
Message-ID<pXV5w-28H-11@gated-at.bofh.it>
In reply to#1208175
Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are __aligned(2)

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
---
 drivers/staging/rtl8192u/r8192U_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index 0048cff..28074ca 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -3469,7 +3469,7 @@ static int r8192_set_mac_adr(struct net_device *dev, void *mac)
 
 	down(&priv->wx_sem);
 
-	memcpy(dev->dev_addr, addr->sa_data, ETH_ALEN);
+	ether_addr_copy(dev->dev_addr, addr->sa_data);
 
 	schedule_work(&priv->reset_wq);
 	up(&priv->wx_sem);
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

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


#1208177 — [PATCH 11/20] staging: rtl8192u: r8192U_core: fix unecessary braces code style issue

FromRaphaël Beamonte <raphael.beamonte@gmail.com>
Date2015-08-16 03:40 +0200
Subject[PATCH 11/20] staging: rtl8192u: r8192U_core: fix unecessary braces code style issue
Message-ID<pXV5w-28H-21@gated-at.bofh.it>
In reply to#1208175
braces {} are not necessary for any arm of a statement containing
one statement on each side.

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
---
 drivers/staging/rtl8192u/r8192U_core.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index ff8c197..a851341 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -2304,11 +2304,10 @@ static void rtl8192_read_eeprom_info(struct net_device *dev)
 	wEPROM_ID = eprom_read(dev, 0); /* first read EEPROM ID out; */
 	RT_TRACE(COMP_EPROM, "EEPROM ID is 0x%x\n", wEPROM_ID);
 
-	if (wEPROM_ID != RTL8190_EEPROM_ID) {
+	if (wEPROM_ID != RTL8190_EEPROM_ID)
 		RT_TRACE(COMP_ERR, "EEPROM ID is invalid(is 0x%x(should be 0x%x)\n", wEPROM_ID, RTL8190_EEPROM_ID);
-	} else {
+	else
 		bLoad_From_EEPOM = true;
-	}
 
 	if (bLoad_From_EEPOM) {
 		tmpValue = eprom_read(dev, EEPROM_VID >> 1);
@@ -2496,11 +2495,10 @@ static void rtl8192_read_eeprom_info(struct net_device *dev)
 	}
 
 
-	if (priv->rf_type == RF_1T2R) {
+	if (priv->rf_type == RF_1T2R)
 		RT_TRACE(COMP_EPROM, "\n1T2R config\n");
-	} else {
+	else
 		RT_TRACE(COMP_EPROM, "\n2T4R config\n");
-	}
 
 	/* We can only know RF type in the function. So we have to init
 	 * DIG RATR table again.
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

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


#1208178 — [PATCH 06/20] staging: rtl8192u: r8192U_core: fix missing struct leading to consistent spacing code style error

FromRaphaël Beamonte <raphael.beamonte@gmail.com>
Date2015-08-16 03:40 +0200
Subject[PATCH 06/20] staging: rtl8192u: r8192U_core: fix missing struct leading to consistent spacing code style error
Message-ID<pXV5w-28H-19@gated-at.bofh.it>
In reply to#1208175
A missing struct keyword in variable declaration triggered a
need consistent spacing around '*' code style error.

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
---
 drivers/staging/rtl8192u/r8192U_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index 80b9a08..b204782 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -4191,7 +4191,7 @@ static void TranslateRxSignalStuff819xUsb(struct sk_buff *skb,
 					  rx_drvinfo_819x_usb  *pdrvinfo)
 {
 	// TODO: We must only check packet for current MAC address. Not finish
-	rtl8192_rx_info *info = (struct rtl8192_rx_info *)skb->cb;
+	struct rtl8192_rx_info *info = (struct rtl8192_rx_info *)skb->cb;
 	struct net_device *dev = info->dev;
 	struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev);
 	bool bpacket_match_bssid, bpacket_toself;
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

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


#1209039 — Re: [PATCH 06/20] staging: rtl8192u: r8192U_core: fix missing struct leading to consistent spacing code style error

FromSudip Mukherjee <sudipm.mukherjee@gmail.com>
Date2015-08-18 07:20 +0200
SubjectRe: [PATCH 06/20] staging: rtl8192u: r8192U_core: fix missing struct leading to consistent spacing code style error
Message-ID<pYHtw-4T9-1@gated-at.bofh.it>
In reply to#1208178
On Sat, Aug 15, 2015 at 09:34:02PM -0400, Raphaël Beamonte wrote:
> A missing struct keyword in variable declaration triggered a
> need consistent spacing around '*' code style error.
struct rtl8192_rx_info is typedef as rtl8192_rx_info. This same file is
having few more use of rtl8192_rx_info without struct. maybe you can
change all of them and get rid of the typedef.

regards
sudip
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

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


#1208179 — [PATCH 09/20] staging: rtl8192u: r8192U_core: include linux/uaccess.h instead of asm/uaccess.h

FromRaphaël Beamonte <raphael.beamonte@gmail.com>
Date2015-08-16 03:40 +0200
Subject[PATCH 09/20] staging: rtl8192u: r8192U_core: include linux/uaccess.h instead of asm/uaccess.h
Message-ID<pXV5w-28H-25@gated-at.bofh.it>
In reply to#1208175
Use #include <linux/uaccess.h> instead of <asm/uaccess.h>

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
---
 drivers/staging/rtl8192u/r8192U_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index 9477a0f..5bbfa91 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -58,7 +58,7 @@ double __extendsfdf2(float a)
 
 #define CONFIG_RTL8192_IO_MAP
 
-#include <asm/uaccess.h>
+#include <linux/uaccess.h>
 #include "r8192U_hw.h"
 #include "r8192U.h"
 #include "r8190_rtl8256.h" /* RTL8225 Radio frontend */
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

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


#1208180 — [PATCH 18/20] staging: rtl8192u: r8192U_core: fix quoted string split across lines code style issue

FromRaphaël Beamonte <raphael.beamonte@gmail.com>
Date2015-08-16 03:40 +0200
Subject[PATCH 18/20] staging: rtl8192u: r8192U_core: fix quoted string split across lines code style issue
Message-ID<pXV5w-28H-23@gated-at.bofh.it>
In reply to#1208175
Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
---
 drivers/staging/rtl8192u/r8192U_core.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index 511e979..0048cff 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -611,8 +611,8 @@ static void rtl8192_proc_init_one(struct net_device *dev)
 		for (f = rtl8192_proc_files; f->name[0]; f++) {
 			if (!proc_create_data(f->name, S_IFREG | S_IRUGO, dir,
 					      &rtl8192_proc_fops, f->show)) {
-				RT_TRACE(COMP_ERR, "Unable to initialize "
-					 "/proc/net/rtl8192/%s/%s\n",
+				RT_TRACE(COMP_ERR,
+					 "Unable to initialize /proc/net/rtl8192/%s/%s\n",
 					 dev->name, f->name);
 				return;
 			}
@@ -1884,8 +1884,8 @@ static int rtl8192_qos_handle_probe_response(struct r8192_priv *priv,
 			network->qos_data.old_param_count =
 				network->qos_data.param_count;
 			queue_work(priv->priv_wq, &priv->qos_activate);
-			RT_TRACE(COMP_QOS, "QoS parameters change call "
-				 "qos_activate\n");
+			RT_TRACE(COMP_QOS,
+				 "QoS parameters change call qos_activate\n");
 		}
 	} else {
 		memcpy(&priv->ieee80211->current_network.qos_data.parameters,
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

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


#1208181 — [PATCH 05/20] staging: rtl8192u: r8192U_core: fix else following close brace code style error

FromRaphaël Beamonte <raphael.beamonte@gmail.com>
Date2015-08-16 03:40 +0200
Subject[PATCH 05/20] staging: rtl8192u: r8192U_core: fix else following close brace code style error
Message-ID<pXV5w-28H-29@gated-at.bofh.it>
In reply to#1208175
Fix else should follow close brace code style error.

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
---
 drivers/staging/rtl8192u/r8192U_core.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index fe92021..80b9a08 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -2585,8 +2585,7 @@ static void rtl8192_hwconfig(struct net_device *dev)
 			regBwOpMode = BW_OPMODE_20MHZ;
 			regRATR = RATE_ALL_CCK | RATE_ALL_OFDM_AG;
 			regRRSR = RATE_ALL_CCK | RATE_ALL_OFDM_AG;
-		}
-		else
+		} else
 #endif
 		{
 			regBwOpMode = BW_OPMODE_20MHZ;
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

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


#1208182 — [PATCH 15/20] staging: rtl8192u: r8192U_core: fix unnecessary else after return code style issue

FromRaphaël Beamonte <raphael.beamonte@gmail.com>
Date2015-08-16 03:40 +0200
Subject[PATCH 15/20] staging: rtl8192u: r8192U_core: fix unnecessary else after return code style issue
Message-ID<pXV5w-28H-27@gated-at.bofh.it>
In reply to#1208175
An else statement is not useful after a return.

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
---
 drivers/staging/rtl8192u/r8192U_core.c | 31 ++++++++++++++-----------------
 1 file changed, 14 insertions(+), 17 deletions(-)

diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index 25d31fe..c91ae28 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -988,8 +988,6 @@ static int rtl8192_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
 		skb_push(skb, USB_HWDESC_HEADER_LEN);
 		rtl819xU_tx_cmd(dev, skb);
 		ret = 1;
-		spin_unlock_irqrestore(&priv->tx_lock, flags);
-		return ret;
 	} else {
 		skb_push(skb, priv->ieee80211->tx_headroom);
 		ret = rtl8192_tx(dev, skb);
@@ -1300,12 +1298,11 @@ short rtl819xU_tx_cmd(struct net_device *dev, struct sk_buff *skb)
 
 	status = usb_submit_urb(tx_urb, GFP_ATOMIC);
 
-	if (!status) {
+	if (!status)
 		return 0;
-	} else {
-		DMESGE("Error TX CMD URB, error %d", status);
-		return -1;
-	}
+
+	DMESGE("Error TX CMD URB, error %d", status);
+	return -1;
 }
 
 /*
@@ -1644,11 +1641,11 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff *skb)
 		dev->trans_start = jiffies;
 		atomic_inc(&priv->tx_pending[tcb_desc->queue_index]);
 		return 0;
-	} else {
-		RT_TRACE(COMP_ERR, "Error TX URB %d, error %d", atomic_read(&priv->tx_pending[tcb_desc->queue_index]),
-			 status);
-		return -1;
 	}
+
+	RT_TRACE(COMP_ERR, "Error TX URB %d, error %d", atomic_read(&priv->tx_pending[tcb_desc->queue_index]),
+		 status);
+	return -1;
 }
 
 static short rtl8192_usb_initendpoints(struct net_device *dev)
@@ -2924,20 +2921,20 @@ static bool HalRxCheckStuck819xUsb(struct net_device *dev)
 		    (priv->CurrentChannelBW == HT_CHANNEL_WIDTH_20 && priv->undecorated_smoothed_pwdb >= RateAdaptiveTH_Low_20M))) {
 		if (rx_chk_cnt < 2)
 			return bStuck;
-		else
-			rx_chk_cnt = 0;
+
+		rx_chk_cnt = 0;
 	} else if (((priv->CurrentChannelBW != HT_CHANNEL_WIDTH_20 && priv->undecorated_smoothed_pwdb < RateAdaptiveTH_Low_40M) ||
 		    (priv->CurrentChannelBW == HT_CHANNEL_WIDTH_20 && priv->undecorated_smoothed_pwdb < RateAdaptiveTH_Low_20M)) &&
 		     priv->undecorated_smoothed_pwdb >= VeryLowRSSI) {
 		if (rx_chk_cnt < 4)
 			return bStuck;
-		else
-			rx_chk_cnt = 0;
+
+		rx_chk_cnt = 0;
 	} else {
 		if (rx_chk_cnt < 8)
 			return bStuck;
-		else
-			rx_chk_cnt = 0;
+
+		rx_chk_cnt = 0;
 	}
 
 	if (priv->RxCounter == RegRxCounter)
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

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


#1208183 — [PATCH 12/20] staging: rtl8192u: r8192U_core: fix externs in .c file code style issue

FromRaphaël Beamonte <raphael.beamonte@gmail.com>
Date2015-08-16 03:40 +0200
Subject[PATCH 12/20] staging: rtl8192u: r8192U_core: fix externs in .c file code style issue
Message-ID<pXV5x-28H-37@gated-at.bofh.it>
In reply to#1208175
Externs should be avoided in .c files. These one were not useful and
are thus removed.

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
---
 drivers/staging/rtl8192u/r8192U_core.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index a851341..849fd3d 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -1000,9 +1000,6 @@ static int rtl8192_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
 	return ret;
 }
 
-
-void rtl8192_try_wake_queue(struct net_device *dev, int pri);
-
 static void rtl8192_tx_isr(struct urb *tx_urb)
 {
 	struct sk_buff *skb = (struct sk_buff *)tx_urb->context;
@@ -1223,9 +1220,6 @@ inline u8 rtl8192_IsWirelessBMode(u16 rate)
 		return 0;
 }
 
-u16 N_DBPSOfRate(u16 DataRate);
-
-
 u16 N_DBPSOfRate(u16 DataRate)
 {
 	u16 N_DBPS = 24;
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

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


#1209044 — Re: [PATCH 12/20] staging: rtl8192u: r8192U_core: fix externs in .c file code style issue

FromSudip Mukherjee <sudipm.mukherjee@gmail.com>
Date2015-08-18 07:40 +0200
SubjectRe: [PATCH 12/20] staging: rtl8192u: r8192U_core: fix externs in .c file code style issue
Message-ID<pYHMR-5fD-1@gated-at.bofh.it>
In reply to#1208183
On Sat, Aug 15, 2015 at 09:34:08PM -0400, Raphaël Beamonte wrote:
> Externs should be avoided in .c files. These one were not useful and
> are thus removed.
These are not externs. These are forward declarations.

regards
sudip
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

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


#1209050 — Re: [PATCH 12/20] staging: rtl8192u: r8192U_core: fix externs in .c file code style issue

FromRaphaël Beamonte <raphael.beamonte@gmail.com>
Date2015-08-18 07:50 +0200
SubjectRe: [PATCH 12/20] staging: rtl8192u: r8192U_core: fix externs in .c file code style issue
Message-ID<pYHWy-5r2-9@gated-at.bofh.it>
In reply to#1209044
2015-08-18 1:30 GMT-04:00 Sudip Mukherjee <sudipm.mukherjee@gmail.com>:
> These are not externs. These are forward declarations.

I copied the message from checkpatch. Will edit that to make it more accurate!

Thanks,
Raphaël
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

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


#1208184 — [PATCH 17/20] staging: rtl8192u: r8192U_core: fix missing blank line after declarations code style issue

FromRaphaël Beamonte <raphael.beamonte@gmail.com>
Date2015-08-16 03:40 +0200
Subject[PATCH 17/20] staging: rtl8192u: r8192U_core: fix missing blank line after declarations code style issue
Message-ID<pXV5x-28H-39@gated-at.bofh.it>
In reply to#1208175
Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
---
 drivers/staging/rtl8192u/r8192U_core.c | 44 +++++++++++++++++++++++++++++++---
 1 file changed, 41 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index 5aae096..511e979 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -160,6 +160,7 @@ static void rtl819x_set_channel_map(u8 channel_plan, struct r8192_priv *priv)
 {
 	int i, max_chan = -1, min_chan = -1;
 	struct ieee80211_device *ieee = priv->ieee80211;
+
 	switch (channel_plan) {
 	case COUNTRY_CODE_FCC:
 	case COUNTRY_CODE_IC:
@@ -428,6 +429,7 @@ static int proc_get_stats_ap(struct seq_file *m, void *v)
 
 	list_for_each_entry(target, &ieee->network_list, list) {
 		const char *wpa = "non_WPA";
+
 		if (target->wpa_ie_len > 0 || target->rsn_ie_len > 0)
 			wpa = "WPA";
 
@@ -674,6 +676,7 @@ void rtl8192_update_msr(struct net_device *dev)
 void rtl8192_set_chan(struct net_device *dev, short ch)
 {
 	struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev);
+
 	RT_TRACE(COMP_CH, "=====>%s()====ch:%d\n", __func__, ch);
 	priv->chan = ch;
 
@@ -879,8 +882,10 @@ static void rtl8192_rx_isr(struct urb *urb)
 	struct r8192_priv *priv = ieee80211_priv(dev);
 	int out_pipe = info->out_pipe;
 	int err;
+
 	if (!priv->up)
 		return;
+
 	if (unlikely(urb->status)) {
 		info->urb = NULL;
 		priv->stats.rxstaterr++;
@@ -1058,6 +1063,7 @@ static void rtl8192_config_rate(struct net_device *dev, u16 *rate_config)
 	struct r8192_priv *priv = ieee80211_priv(dev);
 	struct ieee80211_network *net;
 	u8 i = 0, basic_rate = 0;
+
 	net = &priv->ieee80211->current_network;
 
 	for (i = 0; i < net->rates_len; i++) {
@@ -1153,6 +1159,7 @@ static void rtl8192_update_cap(struct net_device *dev, u16 cap)
 	u32 tmp = 0;
 	struct r8192_priv *priv = ieee80211_priv(dev);
 	struct ieee80211_network *net = &priv->ieee80211->current_network;
+
 	priv->short_preamble = cap & WLAN_CAPABILITY_SHORT_PREAMBLE;
 	tmp = priv->basic_rate;
 	if (priv->short_preamble)
@@ -1161,6 +1168,7 @@ static void rtl8192_update_cap(struct net_device *dev, u16 cap)
 
 	if (net->mode & (IEEE_G | IEEE_N_24G)) {
 		u8 slot_time = 0;
+
 		if ((cap & WLAN_CAPABILITY_SHORT_SLOT) && (!priv->ieee80211->pHTInfo->bCurrentRT2RTLongSlotTime)) /* short slot time */
 			slot_time = SHORT_SLOT_TIME;
 		else /* long slot time */
@@ -1177,6 +1185,7 @@ static void rtl8192_net_update(struct net_device *dev)
 	struct ieee80211_network *net;
 	u16 BcnTimeCfg = 0, BcnCW = 6, BcnIFS = 0xf;
 	u16 rate_config = 0;
+
 	net = &priv->ieee80211->current_network;
 
 	rtl8192_config_rate(dev, &rate_config);
@@ -1490,6 +1499,7 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff *skb)
 	int status;
 	struct urb *tx_urb = NULL, *tx_urb_zero = NULL;
 	unsigned int idx_pipe;
+
 	pend = atomic_read(&priv->tx_pending[tcb_desc->queue_index]);
 	/* we are locked here so the two atomic_read and inc are executed
 	 * without interleaves
@@ -1616,6 +1626,7 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff *skb)
 		 */
 		bool bSend0Byte = false;
 		u8 zero = 0;
+
 		if (udev->speed == USB_SPEED_HIGH) {
 			if (skb->len > 0 && skb->len % 512 == 0)
 				bSend0Byte = true;
@@ -1761,6 +1772,7 @@ static void rtl8192_link_change(struct net_device *dev)
 {
 	struct r8192_priv *priv = ieee80211_priv(dev);
 	struct ieee80211_device *ieee = priv->ieee80211;
+
 	if (ieee->state == IEEE80211_LINKED) {
 		rtl8192_net_update(dev);
 		rtl8192_update_ratr_table(dev);
@@ -1774,6 +1786,7 @@ static void rtl8192_link_change(struct net_device *dev)
 	/*update timing params*/
 	if (ieee->iw_mode == IW_MODE_INFRA || ieee->iw_mode == IW_MODE_ADHOC) {
 		u32 reg = 0;
+
 		read_nic_dword(dev, RCR, &reg);
 		if (priv->ieee80211->state == IEEE80211_LINKED)
 			priv->ReceiveConfig = reg |= RCR_CBSSID;
@@ -1959,6 +1972,7 @@ static int rtl8192_handle_assoc_response(struct net_device *dev,
 					 struct ieee80211_network *network)
 {
 	struct r8192_priv *priv = ieee80211_priv(dev);
+
 	rtl8192_qos_association_resp(priv, network);
 	return 0;
 }
@@ -1971,6 +1985,7 @@ static void rtl8192_update_ratr_table(struct net_device *dev)
 	u8 *pMcsRate = ieee->dot11HTOperationalRateSet;
 	u32 ratr_value = 0;
 	u8 rate_index = 0;
+
 	rtl8192_config_rate(dev, (u16 *)(&ratr_value));
 	ratr_value |= (*(u16 *)(pMcsRate)) << 12;
 	switch (ieee->mode) {
@@ -2063,6 +2078,7 @@ static u8 rtl8192_getSupportedWireleeMode(struct net_device *dev)
 {
 	struct r8192_priv *priv = ieee80211_priv(dev);
 	u8 ret = 0;
+
 	switch (priv->rf_chip) {
 	case RF_8225:
 	case RF_8256:
@@ -2117,6 +2133,7 @@ static void rtl8192_init_priv_variable(struct net_device *dev)
 {
 	struct r8192_priv *priv = ieee80211_priv(dev);
 	u8 i;
+
 	priv->card_8192 = NIC_8192U;
 	priv->chan = 1; /* set to channel 1 */
 	priv->ieee80211->mode = WIRELESS_MODE_AUTO; /* SET AUTO */
@@ -2263,6 +2280,7 @@ static void rtl8192_get_eeprom_size(struct net_device *dev)
 {
 	u16 curCR = 0;
 	struct r8192_priv *priv = ieee80211_priv(dev);
+
 	RT_TRACE(COMP_EPROM, "===========>%s()\n", __func__);
 	read_nic_word_E(dev, EPROM_CMD, &curCR);
 	RT_TRACE(COMP_EPROM, "read from Reg EPROM_CMD(%x):%x\n", EPROM_CMD, curCR);
@@ -2288,6 +2306,7 @@ static void rtl8192_read_eeprom_info(struct net_device *dev)
 	struct r8192_priv *priv = ieee80211_priv(dev);
 	u16 tmpValue = 0;
 	int i;
+
 	RT_TRACE(COMP_EPROM, "===========>%s()\n", __func__);
 	wEPROM_ID = eprom_read(dev, 0); /* first read EEPROM ID out; */
 	RT_TRACE(COMP_EPROM, "EEPROM ID is 0x%x\n", wEPROM_ID);
@@ -2317,8 +2336,10 @@ static void rtl8192_read_eeprom_info(struct net_device *dev)
 	priv->ChannelPlan = priv->eeprom_ChannelPlan;
 	if (bLoad_From_EEPOM) {
 		int i;
+
 		for (i = 0; i < 6; i += 2) {
 			u16 tmp = 0;
+
 			tmp = eprom_read(dev, (u16)((EEPROM_NODE_ADDRESS_BYTE_0 + i) >> 1));
 			*(u16 *)(&dev->dev_addr[i]) = tmp;
 		}
@@ -2365,6 +2386,7 @@ static void rtl8192_read_eeprom_info(struct net_device *dev)
 		RT_TRACE(COMP_EPROM, "EEPROM_DEF_VER:%d\n", priv->EEPROM_Def_Ver);
 		if (priv->EEPROM_Def_Ver == 0) { /* old eeprom definition */
 			int i;
+
 			if (bLoad_From_EEPOM)
 				priv->EEPROMTxPowerLevelCCK = (eprom_read(dev, (EEPROM_TxPwIndex_CCK >> 1)) & 0xff) >> 8;
 			else
@@ -2499,6 +2521,7 @@ static void rtl8192_read_eeprom_info(struct net_device *dev)
 static short rtl8192_get_channel_map(struct net_device *dev)
 {
 	struct r8192_priv *priv = ieee80211_priv(dev);
+
 	if (priv->ChannelPlan > COUNTRY_CODE_GLOBAL_DOMAIN) {
 		netdev_err(dev, "rtl8180_init: Error channel plan! Set to default.\n");
 		priv->ChannelPlan = 0;
@@ -2520,11 +2543,13 @@ static short rtl8192_init(struct net_device *dev)
 	{
 		int i = 0;
 		u8 queuetopipe[] = {3, 2, 1, 0, 4, 8, 7, 6, 5};
+
 		memcpy(priv->txqueue_to_outpipemap, queuetopipe, 9);
 	}
 #else
 	{
 		u8 queuetopipe[] = {3, 2, 1, 0, 4, 4, 0, 4, 4};
+
 		memcpy(priv->txqueue_to_outpipemap, queuetopipe, 9);
 	}
 #endif
@@ -2640,6 +2665,7 @@ static bool rtl8192_adapter_start(struct net_device *dev)
 	bool init_status = true;
 	u8 SECR_value = 0x0;
 	u8 tmp;
+
 	RT_TRACE(COMP_INIT, "====>%s()\n", __func__);
 	priv->Rf_Mode = RF_OP_By_SW_3wire;
 	/* for ASIC power on sequence */
@@ -2730,6 +2756,7 @@ static bool rtl8192_adapter_start(struct net_device *dev)
 #define DEFAULT_EDCA 0x005e4332
 	{
 		int i;
+
 		for (i = 0; i < QOS_QUEUE_NUM; i++)
 			write_nic_dword(dev, WDCAPARA_ADD[i], DEFAULT_EDCA);
 	}
@@ -2800,6 +2827,7 @@ static bool rtl8192_adapter_start(struct net_device *dev)
 	if (priv->ResetProgress == RESET_TYPE_NORESET) {
 		/* if D or C cut */
 		u8 tmpvalue;
+
 		read_nic_byte(dev, 0x301, &tmpvalue);
 		if (tmpvalue == 0x03) {
 			priv->bDcut = true;
@@ -2813,6 +2841,7 @@ static bool rtl8192_adapter_start(struct net_device *dev)
 		if (priv->bDcut) {
 			u32 i, TempCCk;
 			u32 tmpRegA = rtl8192_QueryBBReg(dev, rOFDM0_XATxIQImbalance, bMaskDWord);
+
 			for (i = 0; i < TxBBGainTableLength; i++) {
 				if (tmpRegA == priv->txbbgain_table[i].txbbgain_value) {
 					priv->rfa_txpowertrackingindex = (u8)i;
@@ -2863,6 +2892,7 @@ static bool HalTxCheckStuck819xUsb(struct net_device *dev)
 	struct r8192_priv *priv = ieee80211_priv(dev);
 	u16		RegTxCounter;
 	bool		bStuck = false;
+
 	read_nic_word(dev, 0x128, &RegTxCounter);
 	RT_TRACE(COMP_RESET, "%s():RegTxCounter is %d,TxCounter is %d\n", __func__, RegTxCounter, priv->TxCounter);
 	if (priv->TxCounter == RegTxCounter)
@@ -2908,6 +2938,7 @@ static bool HalRxCheckStuck819xUsb(struct net_device *dev)
 	struct r8192_priv *priv = ieee80211_priv(dev);
 	bool bStuck = false;
 	static u8	rx_chk_cnt;
+
 	read_nic_word(dev, 0x130, &RegRxCounter);
 	RT_TRACE(COMP_RESET, "%s(): RegRxCounter is %d,RxCounter is %d\n", __func__, RegRxCounter, priv->RxCounter);
 	/* If rssi is small, we should check rx for long time because of bad rx.
@@ -3271,6 +3302,7 @@ static void rtl819x_watchdog_wqcallback(struct work_struct *work)
 static void watch_dog_timer_callback(unsigned long data)
 {
 	struct r8192_priv *priv = ieee80211_priv((struct net_device *)data);
+
 	queue_delayed_work(priv->priv_wq, &priv->watch_dog_wq, 0);
 	mod_timer(&priv->watch_dog_timer, jiffies + MSECS(IEEE80211_WATCH_DOG_TIME));
 }
@@ -3278,6 +3310,7 @@ static int _rtl8192_up(struct net_device *dev)
 {
 	struct r8192_priv *priv = ieee80211_priv(dev);
 	int init_status = 0;
+
 	priv->up = 1;
 	priv->ieee80211->ieee_up = 1;
 	RT_TRACE(COMP_INIT, "Bringing up iface");
@@ -3306,6 +3339,7 @@ static int rtl8192_open(struct net_device *dev)
 {
 	struct r8192_priv *priv = ieee80211_priv(dev);
 	int ret;
+
 	down(&priv->wx_sem);
 	ret = rtl8192_up(dev);
 	up(&priv->wx_sem);
@@ -3386,6 +3420,7 @@ void rtl8192_commit(struct net_device *dev)
 {
 	struct r8192_priv *priv = ieee80211_priv(dev);
 	int reset_status = 0;
+
 	if (priv->up == 0)
 		return;
 	priv->up = 0;
@@ -3714,6 +3749,7 @@ static void rtl8192_process_phyinfo(struct r8192_priv *priv, u8 *buffer,
 	struct rtl_80211_hdr_3addr *hdr;
 	u16 sc;
 	unsigned int frag, seq;
+
 	hdr = (struct rtl_80211_hdr_3addr *)buffer;
 	sc = le16_to_cpu(hdr->seq_ctl);
 	frag = WLAN_GET_SEQ_FRAG(sc);
@@ -4404,6 +4440,7 @@ static void query_rxdesc_status(struct sk_buff *skb,
 		/* TODO */
 		if (!stats->bHwError) {
 			u8	ret_rate;
+
 			ret_rate = HwRateToMRate90(driver_info->RxHT, driver_info->RxRate);
 			if (ret_rate == 0xff) {
 				/* Abnormal Case: Receive CRC OK packet with Rx
@@ -4642,6 +4679,7 @@ static int rtl8192_usb_probe(struct usb_interface *intf,
 	struct r8192_priv *priv = NULL;
 	struct usb_device *udev = interface_to_usbdev(intf);
 	int ret;
+
 	RT_TRACE(COMP_INIT, "Oops: i'm coming\n");
 
 	dev = alloc_ieee80211(sizeof(struct r8192_priv));
@@ -4716,10 +4754,9 @@ static void rtl8192_cancel_deferred_work(struct r8192_priv *priv)
 static void rtl8192_usb_disconnect(struct usb_interface *intf)
 {
 	struct net_device *dev = usb_get_intfdata(intf);
-
 	struct r8192_priv *priv = ieee80211_priv(dev);
-	if (dev) {
 
+	if (dev) {
 		unregister_netdev(dev);
 
 		RT_TRACE(COMP_DOWN, "=============>wlan driver to be removed\n");
@@ -4731,7 +4768,6 @@ static void rtl8192_usb_disconnect(struct usb_interface *intf)
 		rtl8192_usb_deleteendpoints(dev);
 		destroy_workqueue(priv->priv_wq);
 		mdelay(10);
-
 	}
 	free_ieee80211(dev);
 	RT_TRACE(COMP_DOWN, "wlan driver removed\n");
@@ -4808,6 +4844,7 @@ void EnableHWSecurityConfig8192(struct net_device *dev)
 	u8 SECR_value = 0x0;
 	struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev);
 	struct ieee80211_device *ieee = priv->ieee80211;
+
 	SECR_value = SCR_TxEncEnable | SCR_RxDecEnable;
 	if (((KEY_TYPE_WEP40 == ieee->pairwise_key_type) || (KEY_TYPE_WEP104 == ieee->pairwise_key_type)) && (priv->ieee80211->auth_mode != 2)) {
 		SECR_value |= SCR_RxUseDK;
@@ -4842,6 +4879,7 @@ void setKey(struct net_device *dev, u8 EntryNo, u8 KeyIndex, u16 KeyType,
 	u32 TargetContent = 0;
 	u16 usConfig = 0;
 	u8 i;
+
 	if (EntryNo >= TOTAL_CAM_ENTRY)
 		RT_TRACE(COMP_ERR, "cam entry exceeds in setKey()\n");
 
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

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


#1208185 — [PATCH 14/20] staging: rtl8192u: r8192U_core: fix unnecessary parentheses code style issue

FromRaphaël Beamonte <raphael.beamonte@gmail.com>
Date2015-08-16 03:40 +0200
Subject[PATCH 14/20] staging: rtl8192u: r8192U_core: fix unnecessary parentheses code style issue
Message-ID<pXV5x-28H-35@gated-at.bofh.it>
In reply to#1208175
Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
---
 drivers/staging/rtl8192u/r8192U_core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index 99d7f7c..25d31fe 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -1859,7 +1859,7 @@ static int rtl8192_qos_handle_probe_response(struct r8192_priv *priv,
 	if (priv->ieee80211->state != IEEE80211_LINKED)
 		return ret;
 
-	if ((priv->ieee80211->iw_mode != IW_MODE_INFRA))
+	if (priv->ieee80211->iw_mode != IW_MODE_INFRA)
 		return ret;
 
 	if (network->flags & NETWORK_HAS_QOS_MASK) {
@@ -1923,7 +1923,7 @@ static int rtl8192_qos_association_resp(struct r8192_priv *priv,
 	if (priv->ieee80211->state != IEEE80211_LINKED)
 		return 0;
 
-	if ((priv->ieee80211->iw_mode != IW_MODE_INFRA))
+	if (priv->ieee80211->iw_mode != IW_MODE_INFRA)
 		return 0;
 
 	spin_lock_irqsave(&priv->ieee80211->lock, flags);
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

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


#1208186 — [PATCH 02/20] staging: rtl8192u: r8192U_core: fix consistent spacing code style error

FromRaphaël Beamonte <raphael.beamonte@gmail.com>
Date2015-08-16 03:40 +0200
Subject[PATCH 02/20] staging: rtl8192u: r8192U_core: fix consistent spacing code style error
Message-ID<pXV5w-28H-33@gated-at.bofh.it>
In reply to#1208175
Fix multiple occurences of the need consistent spacing code style error

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
---
 drivers/staging/rtl8192u/r8192U_core.c | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index 915493d..c4ab2a8 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -2182,8 +2182,8 @@ static void rtl8192_init_priv_variable(struct net_device *dev)
 	priv->EarlyRxThreshold = 7;
 	priv->enable_gpio0 = 0;
 	priv->TransmitConfig =
-		(TCR_MXDMA_2048<<TCR_MXDMA_OFFSET)|  // Max DMA Burst Size per Tx DMA Burst, 7: reserved.
-		(priv->ShortRetryLimit<<TCR_SRL_OFFSET)|	// Short retry limit
+		(TCR_MXDMA_2048<<TCR_MXDMA_OFFSET) |  // Max DMA Burst Size per Tx DMA Burst, 7: reserved.
+		(priv->ShortRetryLimit<<TCR_SRL_OFFSET) |	// Short retry limit
 		(priv->LongRetryLimit<<TCR_LRL_OFFSET) |	// Long retry limit
 		(false ? TCR_SAT : 0);	// FALSE: HW provides PLCP length and LENGEXT, TRUE: SW provides them
 #ifdef TO_DO_LIST
@@ -2204,7 +2204,7 @@ static void rtl8192_init_priv_variable(struct net_device *dev)
 		RCR_AMF | RCR_ADF |		//accept management/data
 		RCR_ACF |			//accept control frame for SW AP needs PS-poll, 2005.07.07, by rcnjko.
 		RCR_AB | RCR_AM | RCR_APM |	//accept BC/MC/UC
-		((u32)7<<RCR_MXDMA_OFFSET)| // Max DMA Burst Size per Rx DMA Burst, 7: unlimited.
+		((u32)7<<RCR_MXDMA_OFFSET) | // Max DMA Burst Size per Rx DMA Burst, 7: unlimited.
 		(priv->EarlyRxThreshold<<RX_FIFO_THRESHOLD_SHIFT) | // Rx FIFO Threshold, 7: No Rx threshold.
 		(priv->EarlyRxThreshold == 7 ? RCR_ONLYERLPKT : 0);
 
@@ -2304,7 +2304,7 @@ static void rtl8192_read_eeprom_info(struct net_device *dev)
 		tmpValue = eprom_read(dev, EEPROM_ChannelPlan>>1);
 		priv->eeprom_ChannelPlan = (tmpValue & 0xff00)>>8;
 		priv->btxpowerdata_readfromEEPORM = true;
-		priv->eeprom_CustomerID = eprom_read(dev, (EEPROM_Customer_ID>>1)) >>8;
+		priv->eeprom_CustomerID = eprom_read(dev, (EEPROM_Customer_ID>>1))>>8;
 	} else {
 		priv->eeprom_vid = 0;
 		priv->eeprom_pid = 0;
@@ -2344,7 +2344,7 @@ static void rtl8192_read_eeprom_info(struct net_device *dev)
 			priv->EEPROMThermalMeter = EEPROM_Default_ThermalMeter;
 		RT_TRACE(COMP_EPROM, "ThermalMeter:%d\n", priv->EEPROMThermalMeter);
 		//vivi, for tx power track
-		priv->TSSI_13dBm = priv->EEPROMThermalMeter *100;
+		priv->TSSI_13dBm = priv->EEPROMThermalMeter * 100;
 		//read antenna tx power offset of B/C/D to A from EEPROM
 		if (bLoad_From_EEPOM)
 			priv->EEPROMPwDiff = (eprom_read(dev, (EEPROM_PwDiff>>1))&0x0f00)>>8;
@@ -2570,7 +2570,7 @@ static void rtl8192_hwconfig(struct net_device *dev)
 		regRRSR = RATE_ALL_CCK;
 		break;
 	case WIRELESS_MODE_A:
-		regBwOpMode = BW_OPMODE_5G |BW_OPMODE_20MHZ;
+		regBwOpMode = BW_OPMODE_5G | BW_OPMODE_20MHZ;
 		regRATR = RATE_ALL_OFDM_AG;
 		regRRSR = RATE_ALL_OFDM_AG;
 		break;
@@ -2706,7 +2706,7 @@ static bool rtl8192_adapter_start(struct net_device *dev)
 	write_nic_dword(dev, RQPN1,  NUM_OF_PAGE_IN_FW_QUEUE_BK << RSVD_FW_QUEUE_PAGE_BK_SHIFT |
 			NUM_OF_PAGE_IN_FW_QUEUE_BE << RSVD_FW_QUEUE_PAGE_BE_SHIFT |
 			NUM_OF_PAGE_IN_FW_QUEUE_VI << RSVD_FW_QUEUE_PAGE_VI_SHIFT |
-			NUM_OF_PAGE_IN_FW_QUEUE_VO <<RSVD_FW_QUEUE_PAGE_VO_SHIFT);
+			NUM_OF_PAGE_IN_FW_QUEUE_VO << RSVD_FW_QUEUE_PAGE_VO_SHIFT);
 	write_nic_dword(dev, RQPN2, NUM_OF_PAGE_IN_FW_QUEUE_MGNT << RSVD_FW_QUEUE_PAGE_MGNT_SHIFT |
 			NUM_OF_PAGE_IN_FW_QUEUE_CMD << RSVD_FW_QUEUE_PAGE_CMD_SHIFT);
 	write_nic_dword(dev, RQPN3, APPLIED_RESERVED_QUEUE_IN_FW|
@@ -3771,12 +3771,12 @@ static void rtl8192_process_phyinfo(struct r8192_priv *priv, u8 *buffer,
 			if (pprevious_stats->RxMIMOSignalStrength[rfpath]  > priv->stats.rx_rssi_percentage[rfpath]) {
 				priv->stats.rx_rssi_percentage[rfpath] =
 					((priv->stats.rx_rssi_percentage[rfpath]*(Rx_Smooth_Factor-1)) +
-					 (pprevious_stats->RxMIMOSignalStrength[rfpath])) /(Rx_Smooth_Factor);
+					 (pprevious_stats->RxMIMOSignalStrength[rfpath])) / (Rx_Smooth_Factor);
 				priv->stats.rx_rssi_percentage[rfpath] = priv->stats.rx_rssi_percentage[rfpath]  + 1;
 			} else {
 				priv->stats.rx_rssi_percentage[rfpath] =
 					((priv->stats.rx_rssi_percentage[rfpath]*(Rx_Smooth_Factor-1)) +
-					 (pprevious_stats->RxMIMOSignalStrength[rfpath])) /(Rx_Smooth_Factor);
+					 (pprevious_stats->RxMIMOSignalStrength[rfpath])) / (Rx_Smooth_Factor);
 			}
 			RT_TRACE(COMP_DBG, "priv->stats.rx_rssi_percentage[rfPath]  = %d \n", priv->stats.rx_rssi_percentage[rfpath]);
 		}
@@ -3818,12 +3818,12 @@ static void rtl8192_process_phyinfo(struct r8192_priv *priv, u8 *buffer,
 		if (pprevious_stats->RxPWDBAll > (u32)priv->undecorated_smoothed_pwdb) {
 			priv->undecorated_smoothed_pwdb =
 				(((priv->undecorated_smoothed_pwdb)*(Rx_Smooth_Factor-1)) +
-				 (pprevious_stats->RxPWDBAll)) /(Rx_Smooth_Factor);
+				 (pprevious_stats->RxPWDBAll)) / (Rx_Smooth_Factor);
 			priv->undecorated_smoothed_pwdb = priv->undecorated_smoothed_pwdb + 1;
 		} else {
 			priv->undecorated_smoothed_pwdb =
 				(((priv->undecorated_smoothed_pwdb)*(Rx_Smooth_Factor-1)) +
-				 (pprevious_stats->RxPWDBAll)) /(Rx_Smooth_Factor);
+				 (pprevious_stats->RxPWDBAll)) / (Rx_Smooth_Factor);
 		}
 
 	}
@@ -3860,8 +3860,8 @@ static void rtl8192_process_phyinfo(struct r8192_priv *priv, u8 *buffer,
 					if (priv->stats.rx_evm_percentage[nspatial_stream] == 0) /* initialize */
 						priv->stats.rx_evm_percentage[nspatial_stream] = pprevious_stats->RxMIMOSignalQuality[nspatial_stream];
 					priv->stats.rx_evm_percentage[nspatial_stream] =
-						((priv->stats.rx_evm_percentage[nspatial_stream]* (Rx_Smooth_Factor-1)) +
-						 (pprevious_stats->RxMIMOSignalQuality[nspatial_stream]* 1)) / (Rx_Smooth_Factor);
+						((priv->stats.rx_evm_percentage[nspatial_stream] * (Rx_Smooth_Factor-1)) +
+						 (pprevious_stats->RxMIMOSignalQuality[nspatial_stream] * 1)) / (Rx_Smooth_Factor);
 				}
 			}
 		}
@@ -4127,7 +4127,7 @@ static void rtl8192_query_rxphystatus(struct r8192_priv *priv,
 		//
 		//Fixed by Jacken from Bryant 2008-03-20
 		//Original value is 106
-		rx_pwr_all = (((pofdm_buf->pwdb_all) >> 1)& 0x7f) -106;
+		rx_pwr_all = (((pofdm_buf->pwdb_all) >> 1) & 0x7f) - 106;
 		pwdb_all = rtl819x_query_rxpwrpercentage(rx_pwr_all);
 
 		pstats->RxPWDBAll = precord_stats->RxPWDBAll = pwdb_all;
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

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


#1209036 — Re: [PATCH 02/20] staging: rtl8192u: r8192U_core: fix consistent spacing code style error

FromSudip Mukherjee <sudipm.mukherjee@gmail.com>
Date2015-08-18 07:10 +0200
SubjectRe: [PATCH 02/20] staging: rtl8192u: r8192U_core: fix consistent spacing code style error
Message-ID<pYHjP-4HG-3@gated-at.bofh.it>
In reply to#1208186
On Sat, Aug 15, 2015 at 09:33:58PM -0400, Raphaël Beamonte wrote:
> Fix multiple occurences of the need consistent spacing code style error
> 
> Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
> ---
>  drivers/staging/rtl8192u/r8192U_core.c | 28 ++++++++++++++--------------
>  1 file changed, 14 insertions(+), 14 deletions(-)
> 
> diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
> index 915493d..c4ab2a8 100644
> --- a/drivers/staging/rtl8192u/r8192U_core.c
> +++ b/drivers/staging/rtl8192u/r8192U_core.c
> @@ -2182,8 +2182,8 @@ static void rtl8192_init_priv_variable(struct net_device *dev)
>  	priv->EarlyRxThreshold = 7;
>  	priv->enable_gpio0 = 0;
>  	priv->TransmitConfig =
> -		(TCR_MXDMA_2048<<TCR_MXDMA_OFFSET)|  // Max DMA Burst Size per Tx DMA Burst, 7: reserved.
> -		(priv->ShortRetryLimit<<TCR_SRL_OFFSET)|	// Short retry limit
> +		(TCR_MXDMA_2048<<TCR_MXDMA_OFFSET) |  // Max DMA Burst Size per Tx DMA Burst, 7: reserved.
> +		(priv->ShortRetryLimit<<TCR_SRL_OFFSET) |	// Short retry limit
since you are modifying these lines for consistent spacing, it will be
better to have:
(priv->ShortRetryLimit << TCR_SRL_OFFSET) |       // Short retry limit
>  
<snip>
> @@ -2304,7 +2304,7 @@ static void rtl8192_read_eeprom_info(struct net_device *dev)
>  		tmpValue = eprom_read(dev, EEPROM_ChannelPlan>>1);
>  		priv->eeprom_ChannelPlan = (tmpValue & 0xff00)>>8;
>  		priv->btxpowerdata_readfromEEPORM = true;
> -		priv->eeprom_CustomerID = eprom_read(dev, (EEPROM_Customer_ID>>1)) >>8;
> +		priv->eeprom_CustomerID = eprom_read(dev, (EEPROM_Customer_ID>>1))>>8;
This should be:
priv->eeprom_CustomerID = eprom_read(dev, (EEPROM_Customer_ID>>1)) >> 8;

regards
sudip
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

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


#1209047 — Re: [PATCH 02/20] staging: rtl8192u: r8192U_core: fix consistent spacing code style error

FromRaphaël Beamonte <raphael.beamonte@gmail.com>
Date2015-08-18 07:40 +0200
SubjectRe: [PATCH 02/20] staging: rtl8192u: r8192U_core: fix consistent spacing code style error
Message-ID<pYHMR-5fD-7@gated-at.bofh.it>
In reply to#1209036
2015-08-18 1:02 GMT-04:00 Sudip Mukherjee <sudipm.mukherjee@gmail.com>:
> since you are modifying these lines for consistent spacing, it will be
> better to have:
> (priv->ShortRetryLimit << TCR_SRL_OFFSET) |       // Short retry limit
<snip>
> This should be:
> priv->eeprom_CustomerID = eprom_read(dev, (EEPROM_Customer_ID>>1)) >> 8;

Are you talking about spacing around the << and >> ?
If so, shouldn't that last line be:
priv->eeprom_CustomerID = eprom_read(dev, (EEPROM_Customer_ID >> 1)) >> 8;

And should I thus apply that to the whole file?

Thanks!
Raphaël
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

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


#1209049 — Re: [PATCH 02/20] staging: rtl8192u: r8192U_core: fix consistent spacing code style error

FromSudip Mukherjee <sudipm.mukherjee@gmail.com>
Date2015-08-18 07:50 +0200
SubjectRe: [PATCH 02/20] staging: rtl8192u: r8192U_core: fix consistent spacing code style error
Message-ID<pYHWy-5r2-7@gated-at.bofh.it>
In reply to#1209047
On Tue, Aug 18, 2015 at 01:38:21AM -0400, Raphaël Beamonte wrote:
> 2015-08-18 1:02 GMT-04:00 Sudip Mukherjee <sudipm.mukherjee@gmail.com>:
> > since you are modifying these lines for consistent spacing, it will be
> > better to have:
> > (priv->ShortRetryLimit << TCR_SRL_OFFSET) |       // Short retry limit
> <snip>
> > This should be:
> > priv->eeprom_CustomerID = eprom_read(dev, (EEPROM_Customer_ID>>1)) >> 8;
> 
> Are you talking about spacing around the << and >> ?
> If so, shouldn't that last line be:
> priv->eeprom_CustomerID = eprom_read(dev, (EEPROM_Customer_ID >> 1)) >> 8;
yeah.. I missed that >>1 , i only noticed >>8 as you have changed that.
> 
> And should I thus apply that to the whole file?
I think that will be better, since you are sending the patch for
consistent spacing.
And some of your patches are not having any commit message. Greg will
not accept such patches. So while you are sending take care of that
also.

regards
sudip
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

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


#1209056 — Re: [PATCH 02/20] staging: rtl8192u: r8192U_core: fix consistent spacing code style error

FromRaphaël Beamonte <raphael.beamonte@gmail.com>
Date2015-08-18 08:10 +0200
SubjectRe: [PATCH 02/20] staging: rtl8192u: r8192U_core: fix consistent spacing code style error
Message-ID<pYIfT-631-7@gated-at.bofh.it>
In reply to#1209049
2015-08-18 1:44 GMT-04:00 Sudip Mukherjee <sudipm.mukherjee@gmail.com>:
> I think that will be better, since you are sending the patch for
> consistent spacing.

Actually, going through the bunch of patches, it seems that the
whitespace neatening one is taking care of that. That one patch was
mostly about taking care of the checkpatch "consistent spacing"
warning.
Two solutions here:
(1) I can merge both patches and make a general whitespace neatening
one, taking care of that too.
(2) I can clarify the commit messages of each patches to explain the
aim of each.
Of course, in (1) too I'd take care of explaining the whole point of
the commit. What do you think would be the best approach at this
point?

> And some of your patches are not having any commit message. Greg will
> not accept such patches. So while you are sending take care of that
> also.

Ok!

Thanks again!
Raphaël
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

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


#1209063 — Re: [PATCH 02/20] staging: rtl8192u: r8192U_core: fix consistent spacing code style error

FromSudip Mukherjee <sudipm.mukherjee@gmail.com>
Date2015-08-18 08:20 +0200
SubjectRe: [PATCH 02/20] staging: rtl8192u: r8192U_core: fix consistent spacing code style error
Message-ID<pYIpz-6ey-11@gated-at.bofh.it>
In reply to#1209056
On Tue, Aug 18, 2015 at 02:02:49AM -0400, Raphaël Beamonte wrote:
> 2015-08-18 1:44 GMT-04:00 Sudip Mukherjee <sudipm.mukherjee@gmail.com>:
> > I think that will be better, since you are sending the patch for
> > consistent spacing.
> 
> Actually, going through the bunch of patches, it seems that the
> whitespace neatening one is taking care of that. That one patch was
> mostly about taking care of the checkpatch "consistent spacing"
> warning.
> Two solutions here:
> (1) I can merge both patches and make a general whitespace neatening
> one, taking care of that too.
> (2) I can clarify the commit messages of each patches to explain the
> aim of each.
> Of course, in (1) too I'd take care of explaining the whole point of
> the commit. What do you think would be the best approach at this
> point?
If both the patches are doing the same change then it will be better to
combine them in one. Just remember two things while sending patches:
1) your commit message should describe the change you are doing and
incase of big changes mention why you are doing it.
2) You should not do more than one type of change in a patch.

regards
sudip
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

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


Page 1 of 2  [1] 2  Next page →

Back to top | Article view | linux.kernel


csiph-web