Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1601196 > unrolled thread
| Started by | sunil.m@techveda.org |
|---|---|
| First post | 2017-03-15 11:00 +0100 |
| Last post | 2017-03-21 10:10 +0100 |
| Articles | 20 on this page of 28 — 5 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH v3 0/8] staging: rtl8192e: Fix coding style, warnings and checks sunil.m@techveda.org - 2017-03-15 11:00 +0100
[PATCH v3 8/8] staging: rtl8192e: Fix blank lines and space after a cast sunil.m@techveda.org - 2017-03-15 11:00 +0100
[PATCH v3 2/8] staging: rtl8192e: Fix coding style sunil.m@techveda.org - 2017-03-15 11:00 +0100
Re: [PATCH v3 2/8] staging: rtl8192e: Fix coding style Dan Carpenter <dan.carpenter@oracle.com> - 2017-03-15 11:20 +0100
Re: [PATCH v3 2/8] staging: rtl8192e: Fix coding style Dan Carpenter <dan.carpenter@oracle.com> - 2017-03-15 11:20 +0100
Re: [PATCH v3 2/8] staging: rtl8192e: Fix coding style Suniel Mahesh <sunil.m@techveda.org> - 2017-03-15 12:20 +0100
Re: [PATCH v3 2/8] staging: rtl8192e: Fix coding style Dan Carpenter <dan.carpenter@oracle.com> - 2017-03-15 12:20 +0100
[PATCH v3 6/8] staging: rtl8192e: Pass a pointer as an argument to sizeof() instead of struct sunil.m@techveda.org - 2017-03-15 11:00 +0100
[PATCH v3 5/8] staging: rtl8192e: Fix unbalanced braces sunil.m@techveda.org - 2017-03-15 11:00 +0100
Re: [PATCH v3 5/8] staging: rtl8192e: Fix unbalanced braces Dan Carpenter <dan.carpenter@oracle.com> - 2017-03-15 11:30 +0100
[PATCH v3 1/8] staging: rtl8192e: Fix comments as per kernel coding style sunil.m@techveda.org - 2017-03-15 11:00 +0100
[PATCH v3 7/8] staging: rtl8192e: Fix issues reported by checkpatch.pl sunil.m@techveda.org - 2017-03-15 11:00 +0100
[PATCH v3 4/8] staging: rtl8192e: Rectify pointer comparisions with NULL sunil.m@techveda.org - 2017-03-15 11:00 +0100
[PATCH v3 3/8] staging: rtl8192e: Remove unnecessary 'out of memory' message sunil.m@techveda.org - 2017-03-15 11:00 +0100
Re: [PATCH v3 3/8] staging: rtl8192e: Remove unnecessary 'out of memory' message Dan Carpenter <dan.carpenter@oracle.com> - 2017-03-15 11:20 +0100
[PATCH v4 3/8] staging: rtl8192e: Remove unnecessary 'out of memory' message sunil.m@techveda.org - 2017-03-15 12:00 +0100
Re: [PATCH v4 3/8] staging: rtl8192e: Remove unnecessary 'out of memory' message Greg KH <gregkh@linuxfoundation.org> - 2017-03-16 03:40 +0100
[PATCH v4 4/6] staging: rtl8192e: Pass a pointer as an argument to sizeof() instead of struct sunil.m@techveda.org - 2017-03-16 23:30 +0100
[PATCH v4 0/6] staging: rtl8192e: Fix coding style, warnings and checks sunil.m@techveda.org - 2017-03-16 23:30 +0100
[PATCH v4 6/6] staging: rtl8192e: Fix blank lines and space after a cast sunil.m@techveda.org - 2017-03-16 23:30 +0100
Re: [PATCH v4 0/6] staging: rtl8192e: Fix coding style, warnings and checks Greg KH <gregkh@linuxfoundation.org> - 2017-03-17 07:20 +0100
[PATCH v5 2/6] staging: rtl8192e: Remove unnecessary 'out of memory' message suniel.spartan@gmail.com - 2017-03-21 10:10 +0100
[PATCH v5 4/6] staging: rtl8192e: Pass a pointer as an argument to sizeof() instead of struct suniel.spartan@gmail.com - 2017-03-21 10:10 +0100
[PATCH v5 0/6] staging: rtl8192e: Fix coding style, warnings and checks suniel.spartan@gmail.com - 2017-03-21 10:10 +0100
[PATCH v5 6/6] staging: rtl8192e: Fix blank lines and space after a cast suniel.spartan@gmail.com - 2017-03-21 10:10 +0100
[PATCH v5 3/6] staging: rtl8192e: Rectify pointer comparisions with NULL suniel.spartan@gmail.com - 2017-03-21 10:10 +0100
[PATCH v5 1/6] staging: rtl8192e: Fix comments as per kernel coding style suniel.spartan@gmail.com - 2017-03-21 10:10 +0100
[PATCH v5 5/6] staging: rtl8192e: Fix issues reported by checkpatch.pl suniel.spartan@gmail.com - 2017-03-21 10:10 +0100
Page 1 of 2 [1] 2 Next page →
| From | sunil.m@techveda.org |
|---|---|
| Date | 2017-03-15 11:00 +0100 |
| Subject | [PATCH v3 0/8] staging: rtl8192e: Fix coding style, warnings and checks |
| Message-ID | <tldSN-5Pm-5@gated-at.bofh.it> |
From: Suniel Mahesh <sunil.m@techveda.org>
Split earlier patches into multiple commits for easy review as
suggested by Dan Carpenter.
Modified subject, description and in few patches both for
better readability as suggested by Greg KH.
Fixed the following issues reported by checkpatch.pl:
Block comments should align the * on each line, aligned.
Block comments use * on subsequent lines, other characters
are replaced by * .
line over 80 characters, modified as per coding style.
Removed unnecessary 'out of memory' message.
Comparison's to NULL could be written '!foo' or 'foo', modified.
Fixed unbalanced braces around else statement.
Added braces on all arms of the if-else statements to comply with
kernel coding style.
Replaced sizeof(struct foo) into sizeof(*ptr).
Spaces preferred around that 'operator', spacing provided.
Logical continuations should be on the previous line, modified accordingly.
Unnecessary parentheses around variables, removed.
Please use a blank line after function/struct/union/enum declarations, used.
Blank lines aren't necessary after an open brace '{' and before a
close brace '}', removed.
No space is necessary after a cast, removed.
Please don't use multiple blank lines, removed.
Rebased on top of next-20170310.
Patches were tested and built on next-20170310 and staging-testing
as suggested by Greg K-H, no errors reported.
Suniel Mahesh (8):
staging: rtl8192e: Fix comments as per kernel coding style
staging: rtl8192e: Fix coding style
staging: rtl8192e: Remove unnecessary 'out of memory' message
staging: rtl8192e: Rectify pointer comparisions with NULL
staging: rtl8192e: Fix unbalanced braces
staging: rtl8192e: Pass a pointer as an argument to sizeof() instead
of struct
staging: rtl8192e: Fix issues reported by checkpatch.pl
staging: rtl8192e: Fix blank lines and space after a cast
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 201 +++++++++++----------------
1 file changed, 84 insertions(+), 117 deletions(-)
--
1.9.1
[toc] | [next] | [standalone]
| From | sunil.m@techveda.org |
|---|---|
| Date | 2017-03-15 11:00 +0100 |
| Subject | [PATCH v3 8/8] staging: rtl8192e: Fix blank lines and space after a cast |
| Message-ID | <tldSN-5Pm-7@gated-at.bofh.it> |
| In reply to | #1601196 |
From: Suniel Mahesh <sunil.m@techveda.org>
Fixed the following checkpatch.pl checks:
Blank lines aren't necessary after an open brace '{'
and before a close brace '}', removed
No space is necessary after a cast, removed
Please don't use multiple blank lines, removed
Signed-off-by: Suniel Mahesh <sunil.m@techveda.org>
---
Changes for v3:
- Split earlier patches into multiple commits for easy review
as suggested by Greg K-H
- New patch addition to the series
- Rebased on top of next-20170310
- Patches were tested and built on next-20170310 and staging-testing
as suggested by Greg K-H, no errors reported
Changes for v2:
---
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 26 --------------------------
1 file changed, 26 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index bb156e3..a587069 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -37,7 +37,6 @@
static int channels = 0x3fff;
static char *ifname = "wlan%d";
-
static const struct rtl819x_ops rtl819xp_ops = {
.nic_type = NIC_8192E,
.get_eeprom_size = rtl92e_get_eeprom_size,
@@ -195,7 +194,6 @@ bool rtl92e_set_rf_state(struct net_device *dev,
priv->rtllib->RfOffReason = 0;
bActionAllowed = true;
-
if (rtState == eRfOff &&
ChangeSource >= RF_CHANGE_BY_HW)
bConnectBySSID = true;
@@ -242,7 +240,6 @@ bool rtl92e_set_rf_state(struct net_device *dev,
StateToSet, priv->rtllib->RfOffReason);
PHY_SetRFPowerState(dev, StateToSet);
if (StateToSet == eRfOn) {
-
if (bConnectBySSID && priv->blinked_ingpio) {
schedule_delayed_work(
&ieee->associate_procedure_wq, 0);
@@ -401,8 +398,6 @@ static void _rtl92e_qos_activate(void *data)
for (i = 0; i < QOS_QUEUE_NUM; i++)
priv->rtllib->SetHwRegHandler(dev, HW_VAR_AC_PARAM, (u8 *)(&i));
-
-
success:
mutex_unlock(&priv->mutex);
}
@@ -462,7 +457,6 @@ static int _rtl92e_handle_beacon(struct net_device *dev,
schedule_delayed_work(&priv->update_beacon_wq, 0);
return 0;
-
}
static int _rtl92e_qos_assoc_resp(struct r8192_priv *priv,
@@ -888,7 +882,6 @@ static void _rtl92e_init_priv_constant(struct net_device *dev)
pPSC->RegMaxLPSAwakeIntvl = 5;
}
-
static void _rtl92e_init_priv_variable(struct net_device *dev)
{
struct r8192_priv *priv = rtllib_priv(dev);
@@ -1211,7 +1204,6 @@ static enum reset_type _rtl92e_if_check_reset(struct net_device *dev)
} else {
return RESET_TYPE_NORESET;
}
-
}
static void _rtl92e_if_silent_reset(struct net_device *dev)
@@ -1223,7 +1215,6 @@ static void _rtl92e_if_silent_reset(struct net_device *dev)
unsigned long flag;
if (priv->ResetProgress == RESET_TYPE_NORESET) {
-
RT_TRACE(COMP_RESET, "=========>Reset progress!!\n");
priv->ResetProgress = RESET_TYPE_SILENT;
@@ -1417,7 +1408,6 @@ static void _rtl92e_watchdog_wq_cb(void *data)
ieee->LinkDetectInfo.NumTxOkInPeriod > 100)
bBusyTraffic = true;
-
if (ieee->LinkDetectInfo.NumRxOkInPeriod > 4000 ||
ieee->LinkDetectInfo.NumTxOkInPeriod > 4000) {
bHigherBusyTraffic = true;
@@ -1466,7 +1456,6 @@ static void _rtl92e_watchdog_wq_cb(void *data)
else
priv->check_roaming_cnt = 0;
-
if (priv->check_roaming_cnt > 0) {
if (ieee->eRFPowerState == eRfOff)
netdev_info(dev, "%s(): RF is off\n", __func__);
@@ -1497,7 +1486,6 @@ static void _rtl92e_watchdog_wq_cb(void *data)
}
ieee->LinkDetectInfo.NumRecvBcnInPeriod = 0;
ieee->LinkDetectInfo.NumRecvDataInPeriod = 0;
-
}
spin_lock_irqsave(&priv->tx_lock, flags);
@@ -1549,7 +1537,6 @@ void rtl92e_tx_enable(struct net_device *dev)
rtllib_reset_queue(priv->rtllib);
}
-
static void _rtl92e_free_rx_ring(struct net_device *dev)
{
struct r8192_priv *priv = rtllib_priv(dev);
@@ -1951,13 +1938,11 @@ long rtl92e_translate_to_dbm(struct r8192_priv *priv, u8 signal_strength_index)
return signal_power;
}
-
void rtl92e_update_rx_statistics(struct r8192_priv *priv,
struct rtllib_rx_stats *pprevious_stats)
{
int weighting = 0;
-
if (priv->stats.recv_signal_power == 0)
priv->stats.recv_signal_power =
pprevious_stats->RecvSignalPower;
@@ -1981,7 +1966,6 @@ u8 rtl92e_rx_db_to_percent(s8 antpower)
return 100;
else
return 100 + antpower;
-
}
u8 rtl92e_evm_db_to_percent(s8 value)
@@ -2008,8 +1992,6 @@ void rtl92e_copy_mpdu_stats(struct rtllib_rx_stats *psrc_stats,
ptarget_stats->bFirstMPDU = psrc_stats->bFirstMPDU;
}
-
-
static void _rtl92e_rx_normal(struct net_device *dev)
{
struct r8192_priv *priv = rtllib_priv(dev);
@@ -2113,7 +2095,6 @@ static void _rtl92e_rx_normal(struct net_device *dev)
priv->rx_idx[rx_queue_idx] = (priv->rx_idx[rx_queue_idx] + 1) %
priv->rxringcount;
}
-
}
static void _rtl92e_tx_resume(struct net_device *dev)
@@ -2172,7 +2153,6 @@ static int _rtl92e_open(struct net_device *dev)
ret = _rtl92e_try_up(dev);
mutex_unlock(&priv->wx_mutex);
return ret;
-
}
static int _rtl92e_try_up(struct net_device *dev)
@@ -2184,7 +2164,6 @@ static int _rtl92e_try_up(struct net_device *dev)
return _rtl92e_up(dev, false);
}
-
static int _rtl92e_close(struct net_device *dev)
{
struct r8192_priv *priv = rtllib_priv(dev);
@@ -2202,7 +2181,6 @@ static int _rtl92e_close(struct net_device *dev)
mutex_unlock(&priv->wx_mutex);
return ret;
-
}
static int _rtl92e_down(struct net_device *dev, bool shutdownrf)
@@ -2245,10 +2223,8 @@ static void _rtl92e_set_multicast(struct net_device *dev)
promisc = (dev->flags & IFF_PROMISC) ? 1 : 0;
priv->promisc = promisc;
-
}
-
static int _rtl92e_set_mac_adr(struct net_device *dev, void *mac)
{
struct r8192_priv *priv = rtllib_priv(dev);
@@ -2396,7 +2372,6 @@ static int _rtl92e_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
return ret;
}
-
static irqreturn_t _rtl92e_irq(int irq, void *netdev)
{
struct net_device *dev = netdev;
@@ -2603,7 +2578,6 @@ static int _rtl92e_pci_probe(struct pci_dev *pdev,
goto err_rel_rtllib;
}
-
ioaddr = (unsigned long)ioremap_nocache(pmem_start, pmem_len);
if (ioaddr == (unsigned long)NULL) {
netdev_err(dev, "ioremap failed!");
--
1.9.1
[toc] | [prev] | [next] | [standalone]
| From | sunil.m@techveda.org |
|---|---|
| Date | 2017-03-15 11:00 +0100 |
| Subject | [PATCH v3 2/8] staging: rtl8192e: Fix coding style |
| Message-ID | <tldSO-5Pm-15@gated-at.bofh.it> |
| In reply to | #1601196 |
From: Suniel Mahesh <sunil.m@techveda.org>
Fixed the following checkpatch.pl warning:
line over 80 characters
Signed-off-by: Suniel Mahesh <sunil.m@techveda.org>
---
Changes for v3:
- Split earlier patches into multiple commits for easy review
as suggested by Greg K-H
- New patch addition to the series
- Rebased on top of next-20170310
- Patches were tested and built on next-20170310 and staging-testing
as suggested by Greg K-H, no errors reported
Changes for v2:
---
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 30 +++++++++++++++-------------
1 file changed, 16 insertions(+), 14 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index a648064..eb2321c 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -218,7 +218,7 @@ bool rtl92e_set_rf_state(struct net_device *dev,
else
priv->blinked_ingpio = false;
rtllib_MgntDisconnect(priv->rtllib,
- WLAN_REASON_DISASSOC_STA_HAS_LEFT);
+ WLAN_REASON_DISASSOC_STA_HAS_LEFT);
}
}
if ((ChangeSource == RF_CHANGE_BY_HW) && !priv->bHwRadioOff)
@@ -1796,7 +1796,7 @@ static short _rtl92e_alloc_rx_ring(struct net_device *dev)
for (rx_queue_idx = 0; rx_queue_idx < MAX_RX_QUEUE; rx_queue_idx++) {
priv->rx_ring[rx_queue_idx] = pci_zalloc_consistent(priv->pdev,
- sizeof(*priv->rx_ring[rx_queue_idx]) * priv->rxringcount,
+ sizeof(*priv->rx_ring[rx_queue_idx]) * priv->rxringcount,
&priv->rx_ring_dma[rx_queue_idx]);
if (!priv->rx_ring[rx_queue_idx] ||
(unsigned long)priv->rx_ring[rx_queue_idx] & 0xFF) {
@@ -2272,7 +2272,8 @@ static int _rtl92e_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
int ret = -1;
struct rtllib_device *ieee = priv->rtllib;
u32 key[4];
- const u8 broadcast_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
+ const u8 broadcast_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff};
struct iw_point *p = &wrq->u.data;
struct ieee_param *ipw = NULL;
@@ -2309,14 +2310,15 @@ static int _rtl92e_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
}
if (ieee->pairwise_key_type) {
- if (is_zero_ether_addr(ieee->ap_mac_addr))
+ if (is_zero_ether_addr(
+ ieee->ap_mac_addr))
ieee->iw_mode = IW_MODE_ADHOC;
memcpy((u8 *)key, ipw->u.crypt.key, 16);
rtl92e_enable_hw_security_config(dev);
rtl92e_set_swcam(dev, 4,
ipw->u.crypt.idx,
- ieee->pairwise_key_type,
- (u8 *)ieee->ap_mac_addr,
+ ieee->pairwise_key_type,
+ (u8 *)ieee->ap_mac_addr,
0, key, 0);
rtl92e_set_key(dev, 4, ipw->u.crypt.idx,
ieee->pairwise_key_type,
@@ -2324,17 +2326,17 @@ static int _rtl92e_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
0, key);
if (ieee->iw_mode == IW_MODE_ADHOC) {
rtl92e_set_swcam(dev,
- ipw->u.crypt.idx,
- ipw->u.crypt.idx,
- ieee->pairwise_key_type,
- (u8 *)ieee->ap_mac_addr,
- 0, key, 0);
+ ipw->u.crypt.idx,
+ ipw->u.crypt.idx,
+ ieee->pairwise_key_type,
+ (u8 *)ieee->ap_mac_addr,
+ 0, key, 0);
rtl92e_set_key(dev,
ipw->u.crypt.idx,
ipw->u.crypt.idx,
- ieee->pairwise_key_type,
- (u8 *)ieee->ap_mac_addr,
- 0, key);
+ ieee->pairwise_key_type,
+ (u8 *)ieee->ap_mac_addr,
+ 0, key);
}
}
if ((ieee->pairwise_key_type == KEY_TYPE_CCMP)
--
1.9.1
[toc] | [prev] | [next] | [standalone]
| From | Dan Carpenter <dan.carpenter@oracle.com> |
|---|---|
| Date | 2017-03-15 11:20 +0100 |
| Subject | Re: [PATCH v3 2/8] staging: rtl8192e: Fix coding style |
| Message-ID | <tlec9-6cz-9@gated-at.bofh.it> |
| In reply to | #1601200 |
Also the subject is too vague. regards, dan carpenter
[toc] | [prev] | [next] | [standalone]
| From | Dan Carpenter <dan.carpenter@oracle.com> |
|---|---|
| Date | 2017-03-15 11:20 +0100 |
| Subject | Re: [PATCH v3 2/8] staging: rtl8192e: Fix coding style |
| Message-ID | <tleca-6cz-25@gated-at.bofh.it> |
| In reply to | #1601200 |
On Wed, Mar 15, 2017 at 03:21:51PM +0530, sunil.m@techveda.org wrote:
> @@ -1796,7 +1796,7 @@ static short _rtl92e_alloc_rx_ring(struct net_device *dev)
>
> for (rx_queue_idx = 0; rx_queue_idx < MAX_RX_QUEUE; rx_queue_idx++) {
> priv->rx_ring[rx_queue_idx] = pci_zalloc_consistent(priv->pdev,
> - sizeof(*priv->rx_ring[rx_queue_idx]) * priv->rxringcount,
> + sizeof(*priv->rx_ring[rx_queue_idx]) * priv->rxringcount,
> &priv->rx_ring_dma[rx_queue_idx]);
No, don't do that. The original was easier to read. Ignore
checkpatch.pl if it gives you bad advice.
> if (!priv->rx_ring[rx_queue_idx] ||
> (unsigned long)priv->rx_ring[rx_queue_idx] & 0xFF) {
> @@ -2272,7 +2272,8 @@ static int _rtl92e_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
> int ret = -1;
> struct rtllib_device *ieee = priv->rtllib;
> u32 key[4];
> - const u8 broadcast_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
> + const u8 broadcast_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff,
> + 0xff};
Just drop this patch... The original is better.
regards,
dan carpenter
[toc] | [prev] | [next] | [standalone]
| From | Suniel Mahesh <sunil.m@techveda.org> |
|---|---|
| Date | 2017-03-15 12:20 +0100 |
| Subject | Re: [PATCH v3 2/8] staging: rtl8192e: Fix coding style |
| Message-ID | <tlf8e-6Rk-23@gated-at.bofh.it> |
| In reply to | #1601233 |
On Wednesday 15 March 2017 03:44 PM, Dan Carpenter wrote:
> On Wed, Mar 15, 2017 at 03:21:51PM +0530, sunil.m@techveda.org wrote:
>> @@ -1796,7 +1796,7 @@ static short _rtl92e_alloc_rx_ring(struct net_device *dev)
>>
>> for (rx_queue_idx = 0; rx_queue_idx < MAX_RX_QUEUE; rx_queue_idx++) {
>> priv->rx_ring[rx_queue_idx] = pci_zalloc_consistent(priv->pdev,
>> - sizeof(*priv->rx_ring[rx_queue_idx]) * priv->rxringcount,
>> + sizeof(*priv->rx_ring[rx_queue_idx]) * priv->rxringcount,
>> &priv->rx_ring_dma[rx_queue_idx]);
>
> No, don't do that. The original was easier to read. Ignore
> checkpatch.pl if it gives you bad advice.
>
>> if (!priv->rx_ring[rx_queue_idx] ||
>> (unsigned long)priv->rx_ring[rx_queue_idx] & 0xFF) {
>> @@ -2272,7 +2272,8 @@ static int _rtl92e_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
>> int ret = -1;
>> struct rtllib_device *ieee = priv->rtllib;
>> u32 key[4];
>> - const u8 broadcast_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
>> + const u8 broadcast_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff,
>> + 0xff};
>
> Just drop this patch... The original is better.
>
> regards,
> dan carpenter
>
hi, when you say drop this patch, should I send the entire patch set as
PATCH v4 with this particular patch dropped ?
regards
suniel
[toc] | [prev] | [next] | [standalone]
| From | Dan Carpenter <dan.carpenter@oracle.com> |
|---|---|
| Date | 2017-03-15 12:20 +0100 |
| Subject | Re: [PATCH v3 2/8] staging: rtl8192e: Fix coding style |
| Message-ID | <tlf8f-6Rk-31@gated-at.bofh.it> |
| In reply to | #1601298 |
On Wed, Mar 15, 2017 at 04:39:20PM +0530, Suniel Mahesh wrote:
> On Wednesday 15 March 2017 03:44 PM, Dan Carpenter wrote:
> >On Wed, Mar 15, 2017 at 03:21:51PM +0530, sunil.m@techveda.org wrote:
> >>@@ -1796,7 +1796,7 @@ static short _rtl92e_alloc_rx_ring(struct net_device *dev)
> >>
> >> for (rx_queue_idx = 0; rx_queue_idx < MAX_RX_QUEUE; rx_queue_idx++) {
> >> priv->rx_ring[rx_queue_idx] = pci_zalloc_consistent(priv->pdev,
> >>- sizeof(*priv->rx_ring[rx_queue_idx]) * priv->rxringcount,
> >>+ sizeof(*priv->rx_ring[rx_queue_idx]) * priv->rxringcount,
> >> &priv->rx_ring_dma[rx_queue_idx]);
> >
> >No, don't do that. The original was easier to read. Ignore
> >checkpatch.pl if it gives you bad advice.
> >
> >> if (!priv->rx_ring[rx_queue_idx] ||
> >> (unsigned long)priv->rx_ring[rx_queue_idx] & 0xFF) {
> >>@@ -2272,7 +2272,8 @@ static int _rtl92e_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
> >> int ret = -1;
> >> struct rtllib_device *ieee = priv->rtllib;
> >> u32 key[4];
> >>- const u8 broadcast_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
> >>+ const u8 broadcast_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff,
> >>+ 0xff};
> >
> >Just drop this patch... The original is better.
> >
> >regards,
> >dan carpenter
> >
> hi, when you say drop this patch, should I send the entire patch set
> as PATCH v4 with this particular patch dropped ?
Just drop [PATCH 2/8]... Hopefully you can see why the original was
more readable? We don't really care about checkpatch.pl except as a
tool to make the code more readable to human beings.
regards,
dan carpenter
[toc] | [prev] | [next] | [standalone]
| From | sunil.m@techveda.org |
|---|---|
| Date | 2017-03-15 11:00 +0100 |
| Subject | [PATCH v3 6/8] staging: rtl8192e: Pass a pointer as an argument to sizeof() instead of struct |
| Message-ID | <tldSO-5Pm-19@gated-at.bofh.it> |
| In reply to | #1601196 |
From: Suniel Mahesh <sunil.m@techveda.org> Replaced sizeof(struct foo) into sizeof(*ptr), found by checkpatch.pl Signed-off-by: Suniel Mahesh <sunil.m@techveda.org> --- Changes for v3: - Split earlier patches into multiple commits for easy review as suggested by Greg K-H - Modified description for better readability - Rebased on top of next-20170310 - Patches were tested and built on next-20170310 and staging-testing as suggested by Greg K-H, no errors reported Changes for v2: - new patch addition to the series - Rebased on top of next-20170306 --- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c index c355ee7..184d6ec 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c @@ -969,7 +969,7 @@ static void _rtl92e_init_priv_variable(struct net_device *dev) priv->card_type = PCI; - priv->pFirmware = vzalloc(sizeof(struct rt_firmware)); + priv->pFirmware = vzalloc(sizeof(*priv->pFirmware)); if (!priv->pFirmware) return; -- 1.9.1
[toc] | [prev] | [next] | [standalone]
| From | sunil.m@techveda.org |
|---|---|
| Date | 2017-03-15 11:00 +0100 |
| Subject | [PATCH v3 5/8] staging: rtl8192e: Fix unbalanced braces |
| Message-ID | <tldSO-5Pm-23@gated-at.bofh.it> |
| In reply to | #1601196 |
From: Suniel Mahesh <sunil.m@techveda.org>
Fixed unbalanced braces around else statement
Add braces on all arms of the if-else statements to comply with
kernel coding style.
Signed-off-by: Suniel Mahesh <sunil.m@techveda.org>
---
Changes for v3:
- Split earlier patches into multiple commits for easy review
as suggested by Greg K-H
- Modified subject and description for better readability
- Rebased on top of next-20170310
- Patches were tested and built on next-20170310 and staging-testing
as suggested by Greg K-H, no errors reported
Changes for v2:
- new patch addition to the series
- Rebased on top of next-20170306
---
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 30 +++++++++++++++++-----------
1 file changed, 18 insertions(+), 12 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index 0fa4017..c355ee7 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -2294,17 +2294,20 @@ static int _rtl92e_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
if (ipw->cmd == IEEE_CMD_SET_ENCRYPTION) {
if (ipw->u.crypt.set_tx) {
- if (strcmp(ipw->u.crypt.alg, "CCMP") == 0)
+ if (strcmp(ipw->u.crypt.alg, "CCMP") == 0) {
ieee->pairwise_key_type = KEY_TYPE_CCMP;
- else if (strcmp(ipw->u.crypt.alg, "TKIP") == 0)
+ } else if (strcmp(ipw->u.crypt.alg,
+ "TKIP") == 0) {
ieee->pairwise_key_type = KEY_TYPE_TKIP;
- else if (strcmp(ipw->u.crypt.alg, "WEP") == 0) {
- if (ipw->u.crypt.key_len == 13)
+ } else if (strcmp(ipw->u.crypt.alg,
+ "WEP") == 0) {
+ if (ipw->u.crypt.key_len == 13) {
ieee->pairwise_key_type =
KEY_TYPE_WEP104;
- else if (ipw->u.crypt.key_len == 5)
+ } else if (ipw->u.crypt.key_len == 5) {
ieee->pairwise_key_type =
KEY_TYPE_WEP40;
+ }
} else {
ieee->pairwise_key_type = KEY_TYPE_NA;
}
@@ -2346,20 +2349,23 @@ static int _rtl92e_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
} else {
memcpy((u8 *)key, ipw->u.crypt.key, 16);
- if (strcmp(ipw->u.crypt.alg, "CCMP") == 0)
+ if (strcmp(ipw->u.crypt.alg, "CCMP") == 0) {
ieee->group_key_type = KEY_TYPE_CCMP;
- else if (strcmp(ipw->u.crypt.alg, "TKIP") == 0)
+ } else if (strcmp(ipw->u.crypt.alg,
+ "TKIP") == 0) {
ieee->group_key_type = KEY_TYPE_TKIP;
- else if (strcmp(ipw->u.crypt.alg, "WEP") == 0) {
- if (ipw->u.crypt.key_len == 13)
+ } else if (strcmp(ipw->u.crypt.alg,
+ "WEP") == 0) {
+ if (ipw->u.crypt.key_len == 13) {
ieee->group_key_type =
KEY_TYPE_WEP104;
- else if (ipw->u.crypt.key_len == 5)
+ } else if (ipw->u.crypt.key_len == 5) {
ieee->group_key_type =
KEY_TYPE_WEP40;
- } else
+ }
+ } else {
ieee->group_key_type = KEY_TYPE_NA;
-
+ }
if (ieee->group_key_type) {
rtl92e_set_swcam(dev, ipw->u.crypt.idx,
ipw->u.crypt.idx,
--
1.9.1
[toc] | [prev] | [next] | [standalone]
| From | Dan Carpenter <dan.carpenter@oracle.com> |
|---|---|
| Date | 2017-03-15 11:30 +0100 |
| Subject | Re: [PATCH v3 5/8] staging: rtl8192e: Fix unbalanced braces |
| Message-ID | <tlelQ-6g0-3@gated-at.bofh.it> |
| In reply to | #1601203 |
On Wed, Mar 15, 2017 at 03:21:54PM +0530, sunil.m@techveda.org wrote:
> @@ -2294,17 +2294,20 @@ static int _rtl92e_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
>
> if (ipw->cmd == IEEE_CMD_SET_ENCRYPTION) {
> if (ipw->u.crypt.set_tx) {
> - if (strcmp(ipw->u.crypt.alg, "CCMP") == 0)
> + if (strcmp(ipw->u.crypt.alg, "CCMP") == 0) {
> ieee->pairwise_key_type = KEY_TYPE_CCMP;
> - else if (strcmp(ipw->u.crypt.alg, "TKIP") == 0)
> + } else if (strcmp(ipw->u.crypt.alg,
> + "TKIP") == 0) {
This is higgledy piggledy. The original was better.
regards,
dan carpenter
[toc] | [prev] | [next] | [standalone]
| From | sunil.m@techveda.org |
|---|---|
| Date | 2017-03-15 11:00 +0100 |
| Subject | [PATCH v3 1/8] staging: rtl8192e: Fix comments as per kernel coding style |
| Message-ID | <tldSO-5Pm-21@gated-at.bofh.it> |
| In reply to | #1601196 |
From: Suniel Mahesh <sunil.m@techveda.org>
Fixed the following checkpatch.pl warnings:
Block comments should align the * on each line
Block comments use * on subsequent lines
Signed-off-by: Suniel Mahesh <sunil.m@techveda.org>
---
Changes for v3:
- Split earlier patches into multiple commits for easy review
as suggested by Greg K-H
- Modified subject and description for better readability
- Rebased on top of next-20170310
- Patches were tested and built on next-20170310 and staging-testing
as suggested by Greg K-H, no errors reported
Changes for v2:
- Split larger patch into multiple commits as suggested
by Dan Carpenter
- This patch fixes coding style issues, comments in rtl_core.c
reported by checkpatch.pl
- Modified short description to 'Fix coding style issues' from
'Fix coding style issues, improve error handling'
- Improve error handling is taken care by the following patch
in the series
- Removed statements, 'Return -ENOMEM, if it is out of memory',
'Pointer comparison with NULL replaced by logical NOT' from the
body of the patch
- Rebased on top of next-20170306
---
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 61 ++++++++++------------------
1 file changed, 22 insertions(+), 39 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index 4c0caa6..a648064 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -1,4 +1,4 @@
-/******************************************************************************
+/*
* Copyright(c) 2008 - 2010 Realtek Corporation. All rights reserved.
*
* Based on the r8180 driver, which is:
@@ -17,7 +17,7 @@
*
* Contact Information:
* wlanfae <wlanfae@realtek.com>
-******************************************************************************/
+ */
#include <linux/uaccess.h>
#include <linux/pci.h>
#include <linux/vmalloc.h>
@@ -75,12 +75,12 @@ static int _rtl92e_pci_probe(struct pci_dev *pdev,
static irqreturn_t _rtl92e_irq(int irq, void *netdev);
static struct pci_driver rtl8192_pci_driver = {
- .name = DRV_NAME, /* Driver name */
- .id_table = rtl8192_pci_id_tbl, /* PCI_ID table */
- .probe = _rtl92e_pci_probe, /* probe fn */
- .remove = _rtl92e_pci_disconnect, /* remove fn */
- .suspend = rtl92e_suspend, /* PM suspend fn */
- .resume = rtl92e_resume, /* PM resume fn */
+ .name = DRV_NAME,
+ .id_table = rtl8192_pci_id_tbl,
+ .probe = _rtl92e_pci_probe,
+ .remove = _rtl92e_pci_disconnect,
+ .suspend = rtl92e_suspend,
+ .resume = rtl92e_resume,
};
static short _rtl92e_is_tx_queue_empty(struct net_device *dev);
@@ -100,10 +100,7 @@ static void _rtl92e_hard_data_xmit(struct sk_buff *skb, struct net_device *dev,
static int _rtl92e_down(struct net_device *dev, bool shutdownrf);
static void _rtl92e_restart(void *data);
-/****************************************************************************
- -----------------------------IO STUFF-------------------------
-*****************************************************************************/
-
+/* IO STUFF */
u8 rtl92e_readb(struct net_device *dev, int x)
{
return 0xff & readb((u8 __iomem *)dev->mem_start + x);
@@ -140,9 +137,7 @@ void rtl92e_writew(struct net_device *dev, int x, u16 y)
udelay(20);
}
-/****************************************************************************
- -----------------------------GENERAL FUNCTION-------------------------
-*****************************************************************************/
+/* GENERAL FUNCTION */
bool rtl92e_set_rf_state(struct net_device *dev,
enum rt_rf_power_state StateToSet,
RT_RF_CHANGE_SOURCE ChangeSource)
@@ -978,7 +973,6 @@ static void _rtl92e_init_priv_variable(struct net_device *dev)
if (!priv->pFirmware)
netdev_err(dev,
"rtl8192e: Unable to allocate space for firmware\n");
-
skb_queue_head_init(&priv->skb_queue);
for (i = 0; i < MAX_QUEUE_SIZE; i++)
@@ -1101,9 +1095,7 @@ static short _rtl92e_init(struct net_device *dev)
return 0;
}
-/***************************************************************************
- -------------------------------WATCHDOG STUFF---------------------------
-***************************************************************************/
+/* WATCHDOG STUFF */
static short _rtl92e_is_tx_queue_empty(struct net_device *dev)
{
int i = 0;
@@ -1540,9 +1532,7 @@ static void _rtl92e_watchdog_timer_cb(unsigned long data)
msecs_to_jiffies(RTLLIB_WATCH_DOG_TIME));
}
-/****************************************************************************
- ---------------------------- NIC TX/RX STUFF---------------------------
-*****************************************************************************/
+/* NIC TX/RX STUFF */
void rtl92e_rx_enable(struct net_device *dev)
{
struct r8192_priv *priv = rtllib_priv(dev);
@@ -1982,6 +1972,7 @@ void rtl92e_update_rx_statistics(struct r8192_priv *priv,
weighting) / 6;
}
+/* QueryRxPwrPercentage */
u8 rtl92e_rx_db_to_percent(s8 antpower)
{
if ((antpower <= -100) || (antpower >= 20))
@@ -1991,7 +1982,7 @@ u8 rtl92e_rx_db_to_percent(s8 antpower)
else
return 100 + antpower;
-} /* QueryRxPwrPercentage */
+}
u8 rtl92e_evm_db_to_percent(s8 value)
{
@@ -2052,9 +2043,9 @@ static void _rtl92e_rx_normal(struct net_device *dev)
pdesc, skb))
goto done;
new_skb = dev_alloc_skb(priv->rxbuffersize);
- /* if allocation of new skb failed - drop current packet
- * and reuse skb
- */
+/* if allocation of new skb failed - drop current packet
+ * and reuse skb
+ */
if (unlikely(!new_skb))
goto done;
@@ -2066,7 +2057,7 @@ static void _rtl92e_rx_normal(struct net_device *dev)
skb_put(skb, pdesc->Length);
skb_reserve(skb, stats.RxDrvInfoSize +
stats.RxBufShift);
- skb_trim(skb, skb->len - 4/*sCrcLng*/);
+ skb_trim(skb, skb->len - 4/* sCrcLng */);
rtllib_hdr = (struct rtllib_hdr_1addr *)skb->data;
if (!is_multicast_ether_addr(rtllib_hdr->addr1)) {
/* unicast packet */
@@ -2155,9 +2146,7 @@ static void _rtl92e_irq_rx_tasklet(struct r8192_priv *priv)
rtl92e_readl(priv->rtllib->dev, INTA_MASK) | IMR_RDU);
}
-/****************************************************************************
- ---------------------------- NIC START/CLOSE STUFF---------------------------
-*****************************************************************************/
+/* NIC START/CLOSE STUFF */
static void _rtl92e_cancel_deferred_work(struct r8192_priv *priv)
{
cancel_delayed_work_sync(&priv->watch_dog_wq);
@@ -2532,11 +2521,7 @@ static irqreturn_t _rtl92e_irq(int irq, void *netdev)
return IRQ_HANDLED;
}
-
-
-/****************************************************************************
- ---------------------------- PCI_STUFF---------------------------
-*****************************************************************************/
+/* PCI_STUFF */
static const struct net_device_ops rtl8192_netdev_ops = {
.ndo_open = _rtl92e_open,
.ndo_stop = _rtl92e_close,
@@ -2620,7 +2605,7 @@ static int _rtl92e_pci_probe(struct pci_dev *pdev,
dev->mem_end = ioaddr + pci_resource_len(pdev, 0);
pci_read_config_byte(pdev, 0x08, &revision_id);
- /* If the revisionid is 0x10, the device uses rtl8192se. */
+ /* If the revisionid is 0x10, the device uses rtl8192se */
if (pdev->device == 0x8192 && revision_id == 0x10)
goto err_unmap;
@@ -2784,9 +2769,7 @@ void rtl92e_check_rfctrl_gpio_timer(unsigned long data)
msecs_to_jiffies(RTLLIB_WATCH_DOG_TIME));
}
-/***************************************************************************
- ------------------- module init / exit stubs ----------------
-****************************************************************************/
+/* module init / exit stubs */
MODULE_DESCRIPTION("Linux driver for Realtek RTL819x WiFi cards");
MODULE_AUTHOR(DRV_COPYRIGHT " " DRV_AUTHOR);
MODULE_VERSION(DRV_VERSION);
--
1.9.1
[toc] | [prev] | [next] | [standalone]
| From | sunil.m@techveda.org |
|---|---|
| Date | 2017-03-15 11:00 +0100 |
| Subject | [PATCH v3 7/8] staging: rtl8192e: Fix issues reported by checkpatch.pl |
| Message-ID | <tldSO-5Pm-27@gated-at.bofh.it> |
| In reply to | #1601196 |
From: Suniel Mahesh <sunil.m@techveda.org>
Fixed the following checkpatch.pl checks:
spaces preferred around that 'operator', spacing provided
Logical continuations should be on the previous line, modified accordingly
Unnecessary parentheses around variables, removed
Please use a blank line after function/struct/union/enum declarations, used
Signed-off-by: Suniel Mahesh <sunil.m@techveda.org>
---
Changes for v3:
- Split earlier patches into multiple commits for easy review
as suggested by Greg K-H
- New patch addition to the series
- Rebased on top of next-20170310
- Patches were tested and built on next-20170310 and staging-testing
as suggested by Greg K-H, no errors reported
Changes for v2:
---
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 46 +++++++++++++++-------------
1 file changed, 24 insertions(+), 22 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index 184d6ec..bb156e3 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -341,7 +341,7 @@ static void _rtl92e_update_cap(struct net_device *dev, u16 cap)
}
}
- if (net->mode & (IEEE_G|IEEE_N_24G)) {
+ if (net->mode & (IEEE_G | IEEE_N_24G)) {
u8 slot_time_val;
u8 CurSlotTime = priv->slot_time;
@@ -675,7 +675,7 @@ static u8 _rtl92e_get_supported_wireless_mode(struct net_device *dev)
case RF_8256:
case RF_6052:
case RF_PSEUDO_11N:
- ret = (WIRELESS_MODE_N_24G|WIRELESS_MODE_G | WIRELESS_MODE_B);
+ ret = (WIRELESS_MODE_N_24G | WIRELESS_MODE_G | WIRELESS_MODE_B);
break;
case RF_8258:
ret = (WIRELESS_MODE_A | WIRELESS_MODE_N_5G);
@@ -737,7 +737,7 @@ static int _rtl92e_sta_up(struct net_device *dev, bool is_silent_reset)
{
struct r8192_priv *priv = rtllib_priv(dev);
struct rt_pwr_save_ctrl *pPSC = (struct rt_pwr_save_ctrl *)
- (&(priv->rtllib->PowerSaveControl));
+ (&priv->rtllib->PowerSaveControl);
bool init_status = true;
priv->bDriverIsGoingToUnload = false;
@@ -883,7 +883,7 @@ static void _rtl92e_init_priv_constant(struct net_device *dev)
{
struct r8192_priv *priv = rtllib_priv(dev);
struct rt_pwr_save_ctrl *pPSC = (struct rt_pwr_save_ctrl *)
- &(priv->rtllib->PowerSaveControl);
+ &priv->rtllib->PowerSaveControl;
pPSC->RegMaxLPSAwakeIntvl = 5;
}
@@ -1009,9 +1009,9 @@ static void _rtl92e_init_priv_task(struct net_device *dev)
(void *)_rtl92e_update_beacon, dev);
INIT_WORK_RSL(&priv->qos_activate, (void *)_rtl92e_qos_activate, dev);
INIT_DELAYED_WORK_RSL(&priv->rtllib->hw_wakeup_wq,
- (void *) rtl92e_hw_wakeup_wq, dev);
+ (void *)rtl92e_hw_wakeup_wq, dev);
INIT_DELAYED_WORK_RSL(&priv->rtllib->hw_sleep_wq,
- (void *) rtl92e_hw_sleep_wq, dev);
+ (void *)rtl92e_hw_sleep_wq, dev);
tasklet_init(&priv->irq_rx_tasklet,
(void(*)(unsigned long))_rtl92e_irq_rx_tasklet,
(unsigned long)priv);
@@ -1029,8 +1029,8 @@ static short _rtl92e_get_channel_map(struct net_device *dev)
struct r8192_priv *priv = rtllib_priv(dev);
- if ((priv->rf_chip != RF_8225) && (priv->rf_chip != RF_8256)
- && (priv->rf_chip != RF_6052)) {
+ if ((priv->rf_chip != RF_8225) && (priv->rf_chip != RF_8256) &&
+ (priv->rf_chip != RF_6052)) {
netdev_err(dev, "%s: unknown rf chip, can't set channel map\n",
__func__);
return -1;
@@ -1056,7 +1056,7 @@ static short _rtl92e_init(struct net_device *dev)
{
struct r8192_priv *priv = rtllib_priv(dev);
- memset(&(priv->stats), 0, sizeof(struct rt_stats));
+ memset(&priv->stats, 0, sizeof(struct rt_stats));
_rtl92e_init_priv_handler(dev);
_rtl92e_init_priv_constant(dev);
@@ -1071,7 +1071,7 @@ static short _rtl92e_init(struct net_device *dev)
setup_timer(&priv->watch_dog_timer,
_rtl92e_watchdog_timer_cb,
- (unsigned long) dev);
+ (unsigned long)dev);
setup_timer(&priv->gpio_polling_timer,
rtl92e_check_rfctrl_gpio_timer,
@@ -1126,7 +1126,7 @@ static enum reset_type _rtl92e_tx_check_stuck(struct net_device *dev)
switch (priv->rtllib->ps) {
case RTLLIB_PS_DISABLED:
break;
- case (RTLLIB_PS_MBCAST|RTLLIB_PS_UNICAST):
+ case (RTLLIB_PS_MBCAST | RTLLIB_PS_UNICAST):
break;
default:
break;
@@ -1379,7 +1379,7 @@ static void _rtl92e_watchdog_wq_cb(void *data)
static u8 check_reset_cnt;
unsigned long flags;
struct rt_pwr_save_ctrl *pPSC = (struct rt_pwr_save_ctrl *)
- (&(priv->rtllib->PowerSaveControl));
+ (&priv->rtllib->PowerSaveControl);
bool bBusyTraffic = false;
bool bHigherBusyTraffic = false;
bool bHigherBusyRxTraffic = false;
@@ -1461,7 +1461,7 @@ static void _rtl92e_watchdog_wq_cb(void *data)
_rtl92e_update_rxcounts(priv, &TotalRxBcnNum, &TotalRxDataNum);
- if ((TotalRxBcnNum+TotalRxDataNum) == 0)
+ if ((TotalRxBcnNum + TotalRxDataNum) == 0)
priv->check_roaming_cnt++;
else
priv->check_roaming_cnt = 0;
@@ -1489,7 +1489,7 @@ static void _rtl92e_watchdog_wq_cb(void *data)
notify_wx_assoc_event(ieee);
if (!(ieee->rtllib_ap_sec_type(ieee) &
- (SEC_ALG_CCMP|SEC_ALG_TKIP)))
+ (SEC_ALG_CCMP | SEC_ALG_TKIP)))
schedule_delayed_work(
&ieee->associate_procedure_wq, 0);
@@ -1593,7 +1593,7 @@ static void _rtl92e_free_tx_ring(struct net_device *dev, unsigned int prio)
ring->idx = (ring->idx + 1) % ring->entries;
}
- pci_free_consistent(priv->pdev, sizeof(*ring->desc)*ring->entries,
+ pci_free_consistent(priv->pdev, sizeof(*ring->desc) * ring->entries,
ring->desc, ring->dma);
ring->desc = NULL;
}
@@ -1702,7 +1702,7 @@ static void _rtl92e_tx_cmd(struct net_device *dev, struct sk_buff *skb)
ring = &priv->tx_ring[TXCMD_QUEUE];
idx = (ring->idx + skb_queue_len(&ring->queue)) % ring->entries;
- entry = (struct tx_desc_cmd *) &ring->desc[idx];
+ entry = (struct tx_desc_cmd *)&ring->desc[idx];
tcb_desc = (struct cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE);
@@ -2022,7 +2022,7 @@ static void _rtl92e_rx_normal(struct net_device *dev)
struct rtllib_rx_stats stats = {
.signal = 0,
- .noise = (u8) -98,
+ .noise = (u8)-98,
.rate = 0,
.freq = RTLLIB_24GHZ_BAND,
};
@@ -2095,7 +2095,7 @@ static void _rtl92e_rx_normal(struct net_device *dev)
priv->rx_buf[rx_queue_idx][priv->rx_idx[rx_queue_idx]] =
skb;
- *((dma_addr_t *) skb->cb) = pci_map_single(priv->pdev,
+ *((dma_addr_t *)skb->cb) = pci_map_single(priv->pdev,
skb_tail_pointer_rsl(skb),
priv->rxbuffersize,
PCI_DMA_FROMDEVICE);
@@ -2108,7 +2108,7 @@ static void _rtl92e_rx_normal(struct net_device *dev)
pdesc->BufferAddress = *((dma_addr_t *)skb->cb);
pdesc->OWN = 1;
pdesc->Length = priv->rxbuffersize;
- if (priv->rx_idx[rx_queue_idx] == priv->rxringcount-1)
+ if (priv->rx_idx[rx_queue_idx] == priv->rxringcount - 1)
pdesc->EOR = 1;
priv->rx_idx[rx_queue_idx] = (priv->rx_idx[rx_queue_idx] + 1) %
priv->rxringcount;
@@ -2342,8 +2342,9 @@ static int _rtl92e_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
0, key);
}
}
- if ((ieee->pairwise_key_type == KEY_TYPE_CCMP)
- && ieee->pHTInfo->bCurrentHTSupport) {
+ if ((ieee->pairwise_key_type ==
+ KEY_TYPE_CCMP) &&
+ ieee->pHTInfo->bCurrentHTSupport) {
rtl92e_writeb(dev, 0x173, 1);
}
@@ -2719,7 +2720,7 @@ bool rtl92e_enable_nic(struct net_device *dev)
bool init_status = true;
struct r8192_priv *priv = rtllib_priv(dev);
struct rt_pwr_save_ctrl *pPSC = (struct rt_pwr_save_ctrl *)
- (&(priv->rtllib->PowerSaveControl));
+ (&priv->rtllib->PowerSaveControl);
if (!priv->up) {
netdev_warn(dev, "%s(): Driver is already down!\n", __func__);
@@ -2744,6 +2745,7 @@ bool rtl92e_enable_nic(struct net_device *dev)
RT_TRACE(COMP_PS, "<===========%s()\n", __func__);
return init_status;
}
+
bool rtl92e_disable_nic(struct net_device *dev)
{
struct r8192_priv *priv = rtllib_priv(dev);
--
1.9.1
[toc] | [prev] | [next] | [standalone]
| From | sunil.m@techveda.org |
|---|---|
| Date | 2017-03-15 11:00 +0100 |
| Subject | [PATCH v3 4/8] staging: rtl8192e: Rectify pointer comparisions with NULL |
| Message-ID | <tldSO-5Pm-33@gated-at.bofh.it> |
| In reply to | #1601196 |
From: Suniel Mahesh <sunil.m@techveda.org> This patch simplifies code by replacing explicit NULL comparison with ! or unmark operator Reported by checkpatch.pl for comparison to NULL could be written '!foo' or 'foo' Signed-off-by: Suniel Mahesh <sunil.m@techveda.org> --- Changes for v3: - Split earlier patches into multiple commits for easy review as suggested by Greg K-H - Modified description for better readability - Rebased on top of next-20170310 - Patches were tested and built on next-20170310 and staging-testing as suggested by Greg K-H, no errors reported Changes for v2: - Rectify pointer comparisions reported by checkpatch.pl in rtl_core.c - new patch addition to the series - Rebased on top of next-20170306 --- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c index 37a03ca..0fa4017 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c @@ -472,7 +472,7 @@ static int _rtl92e_qos_assoc_resp(struct r8192_priv *priv, u32 size = sizeof(struct rtllib_qos_parameters); int set_qos_param = 0; - if ((priv == NULL) || (network == NULL)) + if (!priv || !network) return 0; if (priv->rtllib->state != RTLLIB_LINKED) @@ -785,7 +785,7 @@ static int _rtl92e_sta_down(struct net_device *dev, bool shutdownrf) if (priv->up == 0) return -1; - if (priv->rtllib->rtllib_ips_leave != NULL) + if (priv->rtllib->rtllib_ips_leave) priv->rtllib->rtllib_ips_leave(dev); if (priv->rtllib->state == RTLLIB_LINKED) -- 1.9.1
[toc] | [prev] | [next] | [standalone]
| From | sunil.m@techveda.org |
|---|---|
| Date | 2017-03-15 11:00 +0100 |
| Subject | [PATCH v3 3/8] staging: rtl8192e: Remove unnecessary 'out of memory' message |
| Message-ID | <tldSP-5Pm-47@gated-at.bofh.it> |
| In reply to | #1601196 |
From: Suniel Mahesh <sunil.m@techveda.org> Fixed the following checkpatch.pl warning: Possible unnecessary 'out of memory' message Signed-off-by: Suniel Mahesh <sunil.m@techveda.org> --- Changes for v3: - Split earlier patches into multiple commits for easy review as suggested by Greg K-H - Modified subject and description for better readability - Rebased on top of next-20170310 - Patches were tested and built on next-20170310 and staging-testing as suggested by Greg K-H, no errors reported Changes for v2: - Improve error handling reported by checkpatch.pl in rtl_core.c - new patch addition to the series - Rebased on top of next-20170306 --- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c index eb2321c..37a03ca 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c @@ -971,8 +971,8 @@ static void _rtl92e_init_priv_variable(struct net_device *dev) priv->pFirmware = vzalloc(sizeof(struct rt_firmware)); if (!priv->pFirmware) - netdev_err(dev, - "rtl8192e: Unable to allocate space for firmware\n"); + return; + skb_queue_head_init(&priv->skb_queue); for (i = 0; i < MAX_QUEUE_SIZE; i++) -- 1.9.1
[toc] | [prev] | [next] | [standalone]
| From | Dan Carpenter <dan.carpenter@oracle.com> |
|---|---|
| Date | 2017-03-15 11:20 +0100 |
| Subject | Re: [PATCH v3 3/8] staging: rtl8192e: Remove unnecessary 'out of memory' message |
| Message-ID | <tleca-6cz-23@gated-at.bofh.it> |
| In reply to | #1601210 |
On Wed, Mar 15, 2017 at 03:21:52PM +0530, sunil.m@techveda.org wrote: > From: Suniel Mahesh <sunil.m@techveda.org> > > Fixed the following checkpatch.pl warning: > Possible unnecessary 'out of memory' message > > Signed-off-by: Suniel Mahesh <sunil.m@techveda.org> > --- > Changes for v3: > > - Split earlier patches into multiple commits for easy review > as suggested by Greg K-H > - Modified subject and description for better readability > - Rebased on top of next-20170310 > - Patches were tested and built on next-20170310 and staging-testing > as suggested by Greg K-H, no errors reported > > Changes for v2: > > - Improve error handling reported by checkpatch.pl in rtl_core.c > - new patch addition to the series > - Rebased on top of next-20170306 > --- > drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c > index eb2321c..37a03ca 100644 > --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c > +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c > @@ -971,8 +971,8 @@ static void _rtl92e_init_priv_variable(struct net_device *dev) > > priv->pFirmware = vzalloc(sizeof(struct rt_firmware)); > if (!priv->pFirmware) > - netdev_err(dev, > - "rtl8192e: Unable to allocate space for firmware\n"); > + return; The patch description doesn't mention this return. regards, dan carpenter
[toc] | [prev] | [next] | [standalone]
| From | sunil.m@techveda.org |
|---|---|
| Date | 2017-03-15 12:00 +0100 |
| Subject | [PATCH v4 3/8] staging: rtl8192e: Remove unnecessary 'out of memory' message |
| Message-ID | <tleOS-6tc-15@gated-at.bofh.it> |
| In reply to | #1601231 |
From: Suniel Mahesh <sunil.m@techveda.org> Fixed the following checkpatch.pl warning: Possible unnecessary 'out of memory' message If it is out of memory, function should return with an appropriate error code. Since this function is of type void, a return statement is used. Signed-off-by: Suniel Mahesh <sunil.m@techveda.org> --- Changes for v4: - Modified description for better readability as pointed out by Dan Carpenter Changes for v3: - Split earlier patches into multiple commits for easy review as suggested by Greg K-H - Modified subject and description for better readability - Rebased on top of next-20170310 - Patches were tested and built on next-20170310 and staging-testing as suggested by Greg K-H, no errors reported Changes for v2: - Improve error handling reported by checkpatch.pl in rtl_core.c - new patch addition to the series - Rebased on top of next-20170306 --- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c index eb2321c..37a03ca 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c @@ -971,8 +971,8 @@ static void _rtl92e_init_priv_variable(struct net_device *dev) priv->pFirmware = vzalloc(sizeof(struct rt_firmware)); if (!priv->pFirmware) - netdev_err(dev, - "rtl8192e: Unable to allocate space for firmware\n"); + return; + skb_queue_head_init(&priv->skb_queue); for (i = 0; i < MAX_QUEUE_SIZE; i++) -- 1.9.1
[toc] | [prev] | [next] | [standalone]
| From | Greg KH <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2017-03-16 03:40 +0100 |
| Subject | Re: [PATCH v4 3/8] staging: rtl8192e: Remove unnecessary 'out of memory' message |
| Message-ID | <tltux-8nj-1@gated-at.bofh.it> |
| In reply to | #1601269 |
On Wed, Mar 15, 2017 at 04:28:09PM +0530, sunil.m@techveda.org wrote: > From: Suniel Mahesh <sunil.m@techveda.org> > > Fixed the following checkpatch.pl warning: > Possible unnecessary 'out of memory' message > If it is out of memory, function should return with an > appropriate error code. Since this function is of type void, > a return statement is used. > > Signed-off-by: Suniel Mahesh <sunil.m@techveda.org> > --- > Changes for v4: > > - Modified description for better readability as pointed out by > Dan Carpenter Please resend the whole series, not just individual patches, otherwise it is impossible for me to keep track of what the latest patches are to be applied. thanks, greg k-h
[toc] | [prev] | [next] | [standalone]
| From | sunil.m@techveda.org |
|---|---|
| Date | 2017-03-16 23:30 +0100 |
| Subject | [PATCH v4 4/6] staging: rtl8192e: Pass a pointer as an argument to sizeof() instead of struct |
| Message-ID | <tlM49-4UO-1@gated-at.bofh.it> |
| In reply to | #1601884 |
From: Suniel Mahesh <sunil.m@techveda.org> Replaced sizeof(struct foo) into sizeof(*ptr), found by checkpatch.pl Signed-off-by: Suniel Mahesh <sunil.m@techveda.org> --- Changes for v4: - Dropped two patches from the series, as they were not adding significant value suggested by Dan Carpenter. staging: rtl8192e: Fix coding style, this was fixing line over 80 characters. staging: rtl8192e: Fix unbalanced braces - Resending the whole series as requested by Greg K-H - Patches were tested and built on next-20170310 and staging-testing Changes for v3: - Split earlier patches into multiple commits for easy review as suggested by Greg K-H - Modified description for better readability - Rebased on top of next-20170310 - Patches were tested and built on next-20170310 and staging-testing as suggested by Greg K-H, no errors reported Changes for v2: - new patch addition to the series - Rebased on top of next-20170306 --- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c index 4f4cd07..999af05 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c @@ -969,7 +969,7 @@ static void _rtl92e_init_priv_variable(struct net_device *dev) priv->card_type = PCI; - priv->pFirmware = vzalloc(sizeof(struct rt_firmware)); + priv->pFirmware = vzalloc(sizeof(*priv->pFirmware)); if (!priv->pFirmware) return; -- 1.9.1
[toc] | [prev] | [next] | [standalone]
| From | sunil.m@techveda.org |
|---|---|
| Date | 2017-03-16 23:30 +0100 |
| Subject | [PATCH v4 0/6] staging: rtl8192e: Fix coding style, warnings and checks |
| Message-ID | <tlM49-4UO-3@gated-at.bofh.it> |
| In reply to | #1601884 |
From: Suniel Mahesh <sunil.m@techveda.org>
Split earlier patches into multiple commits for easy review as
suggested by Dan Carpenter.
Modified subject, description and in few patches both for
better readability as suggested by Greg KH.
Dropped two patches from the earler series, as they were not adding
significant value, suggested by Dan Carpenter.
Fixed the following issues reported by checkpatch.pl:
Block comments should align the * on each line, aligned.
Block comments use * on subsequent lines, other characters
are replaced by * .
Removed unnecessary 'out of memory' message.
Comparison's to NULL could be written '!foo' or 'foo', modified.
Replaced sizeof(struct foo) into sizeof(*ptr).
Spaces preferred around that 'operator', spacing provided.
Logical continuations should be on the previous line, modified accordingly.
Unnecessary parentheses around variables, removed.
Please use a blank line after function/struct/union/enum declarations, used.
Blank lines aren't necessary after an open brace '{' and before a
close brace '}', removed.
No space is necessary after a cast, removed.
Please don't use multiple blank lines, removed.
Rebased on top of next-20170310.
Patches were tested and built on next-20170310 and staging-testing
as suggested by Greg K-H, no errors reported.
Suniel Mahesh (6):
staging: rtl8192e: Fix comments as per kernel coding style
staging: rtl8192e: Remove unnecessary 'out of memory' message
staging: rtl8192e: Rectify pointer comparisions with NULL
staging: rtl8192e: Pass a pointer as an argument to sizeof() instead
of struct
staging: rtl8192e: Fix issues reported by checkpatch.pl
staging: rtl8192e: Fix blank lines and space after a cast
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 141 ++++++++++-----------------
1 file changed, 50 insertions(+), 91 deletions(-)
--
1.9.1
[toc] | [prev] | [next] | [standalone]
| From | sunil.m@techveda.org |
|---|---|
| Date | 2017-03-16 23:30 +0100 |
| Subject | [PATCH v4 6/6] staging: rtl8192e: Fix blank lines and space after a cast |
| Message-ID | <tlM4b-4UO-39@gated-at.bofh.it> |
| In reply to | #1602883 |
From: Suniel Mahesh <sunil.m@techveda.org>
Fixed the following checkpatch.pl checks:
Blank lines aren't necessary after an open brace '{'
and before a close brace '}', removed
No space is necessary after a cast, removed
Please don't use multiple blank lines, removed
Signed-off-by: Suniel Mahesh <sunil.m@techveda.org>
---
Changes for v4:
- Dropped two patches from the series, as they were not adding significant value
suggested by Dan Carpenter.
staging: rtl8192e: Fix coding style, this was fixing line over 80 characters.
staging: rtl8192e: Fix unbalanced braces
- Resending the whole series as requested by Greg K-H
- Patches were tested and built on next-20170310 and staging-testing
Changes for v3:
- Split earlier patches into multiple commits for easy review
as suggested by Greg K-H
- New patch addition to the series
- Rebased on top of next-20170310
- Patches were tested and built on next-20170310 and staging-testing
as suggested by Greg K-H, no errors reported
Changes for v2:
---
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 26 --------------------------
1 file changed, 26 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index 1d22f18..bc2c732 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -37,7 +37,6 @@
static int channels = 0x3fff;
static char *ifname = "wlan%d";
-
static const struct rtl819x_ops rtl819xp_ops = {
.nic_type = NIC_8192E,
.get_eeprom_size = rtl92e_get_eeprom_size,
@@ -195,7 +194,6 @@ bool rtl92e_set_rf_state(struct net_device *dev,
priv->rtllib->RfOffReason = 0;
bActionAllowed = true;
-
if (rtState == eRfOff &&
ChangeSource >= RF_CHANGE_BY_HW)
bConnectBySSID = true;
@@ -242,7 +240,6 @@ bool rtl92e_set_rf_state(struct net_device *dev,
StateToSet, priv->rtllib->RfOffReason);
PHY_SetRFPowerState(dev, StateToSet);
if (StateToSet == eRfOn) {
-
if (bConnectBySSID && priv->blinked_ingpio) {
schedule_delayed_work(
&ieee->associate_procedure_wq, 0);
@@ -401,8 +398,6 @@ static void _rtl92e_qos_activate(void *data)
for (i = 0; i < QOS_QUEUE_NUM; i++)
priv->rtllib->SetHwRegHandler(dev, HW_VAR_AC_PARAM, (u8 *)(&i));
-
-
success:
mutex_unlock(&priv->mutex);
}
@@ -462,7 +457,6 @@ static int _rtl92e_handle_beacon(struct net_device *dev,
schedule_delayed_work(&priv->update_beacon_wq, 0);
return 0;
-
}
static int _rtl92e_qos_assoc_resp(struct r8192_priv *priv,
@@ -888,7 +882,6 @@ static void _rtl92e_init_priv_constant(struct net_device *dev)
pPSC->RegMaxLPSAwakeIntvl = 5;
}
-
static void _rtl92e_init_priv_variable(struct net_device *dev)
{
struct r8192_priv *priv = rtllib_priv(dev);
@@ -1211,7 +1204,6 @@ static enum reset_type _rtl92e_if_check_reset(struct net_device *dev)
} else {
return RESET_TYPE_NORESET;
}
-
}
static void _rtl92e_if_silent_reset(struct net_device *dev)
@@ -1223,7 +1215,6 @@ static void _rtl92e_if_silent_reset(struct net_device *dev)
unsigned long flag;
if (priv->ResetProgress == RESET_TYPE_NORESET) {
-
RT_TRACE(COMP_RESET, "=========>Reset progress!!\n");
priv->ResetProgress = RESET_TYPE_SILENT;
@@ -1417,7 +1408,6 @@ static void _rtl92e_watchdog_wq_cb(void *data)
ieee->LinkDetectInfo.NumTxOkInPeriod > 100)
bBusyTraffic = true;
-
if (ieee->LinkDetectInfo.NumRxOkInPeriod > 4000 ||
ieee->LinkDetectInfo.NumTxOkInPeriod > 4000) {
bHigherBusyTraffic = true;
@@ -1466,7 +1456,6 @@ static void _rtl92e_watchdog_wq_cb(void *data)
else
priv->check_roaming_cnt = 0;
-
if (priv->check_roaming_cnt > 0) {
if (ieee->eRFPowerState == eRfOff)
netdev_info(dev, "%s(): RF is off\n", __func__);
@@ -1497,7 +1486,6 @@ static void _rtl92e_watchdog_wq_cb(void *data)
}
ieee->LinkDetectInfo.NumRecvBcnInPeriod = 0;
ieee->LinkDetectInfo.NumRecvDataInPeriod = 0;
-
}
spin_lock_irqsave(&priv->tx_lock, flags);
@@ -1549,7 +1537,6 @@ void rtl92e_tx_enable(struct net_device *dev)
rtllib_reset_queue(priv->rtllib);
}
-
static void _rtl92e_free_rx_ring(struct net_device *dev)
{
struct r8192_priv *priv = rtllib_priv(dev);
@@ -1951,13 +1938,11 @@ long rtl92e_translate_to_dbm(struct r8192_priv *priv, u8 signal_strength_index)
return signal_power;
}
-
void rtl92e_update_rx_statistics(struct r8192_priv *priv,
struct rtllib_rx_stats *pprevious_stats)
{
int weighting = 0;
-
if (priv->stats.recv_signal_power == 0)
priv->stats.recv_signal_power =
pprevious_stats->RecvSignalPower;
@@ -1981,7 +1966,6 @@ u8 rtl92e_rx_db_to_percent(s8 antpower)
return 100;
else
return 100 + antpower;
-
}
u8 rtl92e_evm_db_to_percent(s8 value)
@@ -2008,8 +1992,6 @@ void rtl92e_copy_mpdu_stats(struct rtllib_rx_stats *psrc_stats,
ptarget_stats->bFirstMPDU = psrc_stats->bFirstMPDU;
}
-
-
static void _rtl92e_rx_normal(struct net_device *dev)
{
struct r8192_priv *priv = rtllib_priv(dev);
@@ -2113,7 +2095,6 @@ static void _rtl92e_rx_normal(struct net_device *dev)
priv->rx_idx[rx_queue_idx] = (priv->rx_idx[rx_queue_idx] + 1) %
priv->rxringcount;
}
-
}
static void _rtl92e_tx_resume(struct net_device *dev)
@@ -2172,7 +2153,6 @@ static int _rtl92e_open(struct net_device *dev)
ret = _rtl92e_try_up(dev);
mutex_unlock(&priv->wx_mutex);
return ret;
-
}
static int _rtl92e_try_up(struct net_device *dev)
@@ -2184,7 +2164,6 @@ static int _rtl92e_try_up(struct net_device *dev)
return _rtl92e_up(dev, false);
}
-
static int _rtl92e_close(struct net_device *dev)
{
struct r8192_priv *priv = rtllib_priv(dev);
@@ -2202,7 +2181,6 @@ static int _rtl92e_close(struct net_device *dev)
mutex_unlock(&priv->wx_mutex);
return ret;
-
}
static int _rtl92e_down(struct net_device *dev, bool shutdownrf)
@@ -2245,10 +2223,8 @@ static void _rtl92e_set_multicast(struct net_device *dev)
promisc = (dev->flags & IFF_PROMISC) ? 1 : 0;
priv->promisc = promisc;
-
}
-
static int _rtl92e_set_mac_adr(struct net_device *dev, void *mac)
{
struct r8192_priv *priv = rtllib_priv(dev);
@@ -2388,7 +2364,6 @@ static int _rtl92e_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
return ret;
}
-
static irqreturn_t _rtl92e_irq(int irq, void *netdev)
{
struct net_device *dev = netdev;
@@ -2595,7 +2570,6 @@ static int _rtl92e_pci_probe(struct pci_dev *pdev,
goto err_rel_rtllib;
}
-
ioaddr = (unsigned long)ioremap_nocache(pmem_start, pmem_len);
if (ioaddr == (unsigned long)NULL) {
netdev_err(dev, "ioremap failed!");
--
1.9.1
[toc] | [prev] | [next] | [standalone]
Page 1 of 2 [1] 2 Next page →
Back to top | Article view | linux.kernel
csiph-web