Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1300081 > unrolled thread
| Started by | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| First post | 2016-01-02 15:50 +0100 |
| Last post | 2016-01-15 14:20 +0100 |
| Articles | 6 — 2 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 0/3] net-rsi: Fine-tuning for two function implementations SF Markus Elfring <elfring@users.sourceforge.net> - 2016-01-02 15:50 +0100
[PATCH v3 0/3] net-rsi: Fine-tuning for two function implementations SF Markus Elfring <elfring@users.sourceforge.net> - 2016-01-15 14:10 +0100
[PATCH v3 1/3] rsi: Delete unnecessary variable initialisations in rsi_send_mgmt_pkt() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-01-15 14:10 +0100
[PATCH v3 3/3] rsi: Replace variable initialisations by assignments in rsi_send_data_pkt() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-01-15 14:20 +0100
Re: [PATCH v3 3/3] rsi: Replace variable initialisations by assignments in rsi_send_data_pkt() Dan Carpenter <dan.carpenter@oracle.com> - 2016-01-19 13:50 +0100
[PATCH v3 2/3] rsi: Delete unnecessary variable initialisations in rsi_send_data_pkt() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-01-15 14:20 +0100
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Date | 2016-01-02 15:50 +0100 |
| Subject | [PATCH 0/3] net-rsi: Fine-tuning for two function implementations |
| Message-ID | <qMvFg-RW-3@gated-at.bofh.it> |
From: Markus Elfring <elfring@users.sourceforge.net> Date: Sat, 2 Jan 2016 15:36:25 +0100 A few update suggestions were taken into account from static source code analysis. Markus Elfring (3): Delete unnecessary variable initialisations in rsi_send_mgmt_pkt() Delete unnecessary variable initialisations in rsi_send_data_pkt() Replace variable initialisations by assignments in rsi_send_data_pkt() drivers/net/wireless/rsi/rsi_91x_pkt.c | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) -- 2.6.3 -- 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]
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Date | 2016-01-15 14:10 +0100 |
| Subject | [PATCH v3 0/3] net-rsi: Fine-tuning for two function implementations |
| Message-ID | <qRciB-6vV-19@gated-at.bofh.it> |
| In reply to | #1300081 |
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Fri, 15 Jan 2016 13:54:43 +0100
A few update suggestions were taken into account
from static source code analysis.
Markus Elfring (3):
Delete unnecessary variable initialisations in rsi_send_mgmt_pkt()
Delete unnecessary variable initialisations in rsi_send_data_pkt()
Replace variable initialisations by assignments in rsi_send_data_pkt()
drivers/net/wireless/rsi/rsi_91x_pkt.c | 26 ++++++++++++++------------
1 file changed, 14 insertions(+), 12 deletions(-)
---
v3: Rebase proposed changes on the source files for the software
"Linux next-20160114".
v2: Unfortunately, the first update step from this series contained
an inappropriate suggestion.
Thus fix that.
--
2.6.3
[toc] | [prev] | [next] | [standalone]
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Date | 2016-01-15 14:10 +0100 |
| Subject | [PATCH v3 1/3] rsi: Delete unnecessary variable initialisations in rsi_send_mgmt_pkt() |
| Message-ID | <qRciC-6vV-25@gated-at.bofh.it> |
| In reply to | #1310092 |
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Fri, 15 Jan 2016 13:30:39 +0100
Omit explicit initialisation at the beginning for four local variables
which are redefined before their first use.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/net/wireless/rsi/rsi_91x_pkt.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/rsi/rsi_91x_pkt.c b/drivers/net/wireless/rsi/rsi_91x_pkt.c
index 702593f..571eaba 100644
--- a/drivers/net/wireless/rsi/rsi_91x_pkt.c
+++ b/drivers/net/wireless/rsi/rsi_91x_pkt.c
@@ -123,15 +123,15 @@ int rsi_send_mgmt_pkt(struct rsi_common *common,
struct sk_buff *skb)
{
struct rsi_hw *adapter = common->priv;
- struct ieee80211_hdr *wh = NULL;
+ struct ieee80211_hdr *wh;
struct ieee80211_tx_info *info;
- struct ieee80211_bss_conf *bss = NULL;
+ struct ieee80211_bss_conf *bss;
struct ieee80211_hw *hw = adapter->hw;
struct ieee80211_conf *conf = &hw->conf;
struct skb_info *tx_params;
int status = -E2BIG;
- __le16 *msg = NULL;
- u8 extnd_size = 0;
+ __le16 *msg;
+ u8 extnd_size;
u8 vap_id = 0;
info = IEEE80211_SKB_CB(skb);
--
2.6.3
[toc] | [prev] | [next] | [standalone]
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Date | 2016-01-15 14:20 +0100 |
| Subject | [PATCH v3 3/3] rsi: Replace variable initialisations by assignments in rsi_send_data_pkt() |
| Message-ID | <qRcsh-6zK-7@gated-at.bofh.it> |
| In reply to | #1310092 |
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Fri, 15 Jan 2016 13:40:22 +0100
Replace explicit initialisation for two local variables at the beginning
by assignments.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/net/wireless/rsi/rsi_91x_pkt.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/rsi/rsi_91x_pkt.c b/drivers/net/wireless/rsi/rsi_91x_pkt.c
index 4322df1..2c18c01 100644
--- a/drivers/net/wireless/rsi/rsi_91x_pkt.c
+++ b/drivers/net/wireless/rsi/rsi_91x_pkt.c
@@ -26,12 +26,12 @@
*/
int rsi_send_data_pkt(struct rsi_common *common, struct sk_buff *skb)
{
- struct rsi_hw *adapter = common->priv;
+ struct rsi_hw *adapter;
struct ieee80211_hdr *tmp_hdr;
struct ieee80211_tx_info *info;
struct skb_info *tx_params;
struct ieee80211_bss_conf *bss;
- int status = -EINVAL;
+ int status;
u8 ieee80211_size = MIN_802_11_HDR_LEN;
u8 extnd_size;
__le16 *frame_desc;
@@ -41,8 +41,10 @@ int rsi_send_data_pkt(struct rsi_common *common, struct sk_buff *skb)
bss = &info->control.vif->bss_conf;
tx_params = (struct skb_info *)info->driver_data;
- if (!bss->assoc)
+ if (!bss->assoc) {
+ status = -EINVAL;
goto err;
+ }
tmp_hdr = (struct ieee80211_hdr *)&skb->data[0];
seq_num = (le16_to_cpu(tmp_hdr->seq_ctrl) >> 4);
@@ -97,7 +99,7 @@ int rsi_send_data_pkt(struct rsi_common *common, struct sk_buff *skb)
frame_desc[7] = cpu_to_le16(((tx_params->tid & 0xf) << 4) |
(skb->priority & 0xf) |
(tx_params->sta_id << 8));
-
+ adapter = common->priv;
status = adapter->host_intf_write_pkt(common->priv,
skb->data,
skb->len);
--
2.6.3
[toc] | [prev] | [next] | [standalone]
| From | Dan Carpenter <dan.carpenter@oracle.com> |
|---|---|
| Date | 2016-01-19 13:50 +0100 |
| Subject | Re: [PATCH v3 3/3] rsi: Replace variable initialisations by assignments in rsi_send_data_pkt() |
| Message-ID | <qSDTs-7Wg-9@gated-at.bofh.it> |
| In reply to | #1310097 |
Still makes no sense for adapter like Francois Romieu said. regards, dan carpenter
[toc] | [prev] | [next] | [standalone]
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Date | 2016-01-15 14:20 +0100 |
| Subject | [PATCH v3 2/3] rsi: Delete unnecessary variable initialisations in rsi_send_data_pkt() |
| Message-ID | <qRcsh-6zK-9@gated-at.bofh.it> |
| In reply to | #1310092 |
From 017d1bb49f46266ffeb33178ddd3022d6b341d71 Mon Sep 17 00:00:00 2001
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Fri, 15 Jan 2016 13:35:47 +0100
Subject: [PATCH 2/3] rsi: Delete unnecessary variable initialisations in
rsi_send_data_pkt()
Omit explicit initialisation at the beginning for four local variables
which are redefined before their first use.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/net/wireless/rsi/rsi_91x_pkt.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/rsi/rsi_91x_pkt.c b/drivers/net/wireless/rsi/rsi_91x_pkt.c
index 571eaba..4322df1 100644
--- a/drivers/net/wireless/rsi/rsi_91x_pkt.c
+++ b/drivers/net/wireless/rsi/rsi_91x_pkt.c
@@ -27,15 +27,15 @@
int rsi_send_data_pkt(struct rsi_common *common, struct sk_buff *skb)
{
struct rsi_hw *adapter = common->priv;
- struct ieee80211_hdr *tmp_hdr = NULL;
+ struct ieee80211_hdr *tmp_hdr;
struct ieee80211_tx_info *info;
struct skb_info *tx_params;
- struct ieee80211_bss_conf *bss = NULL;
+ struct ieee80211_bss_conf *bss;
int status = -EINVAL;
u8 ieee80211_size = MIN_802_11_HDR_LEN;
- u8 extnd_size = 0;
+ u8 extnd_size;
__le16 *frame_desc;
- u16 seq_num = 0;
+ u16 seq_num;
info = IEEE80211_SKB_CB(skb);
bss = &info->control.vif->bss_conf;
--
2.6.3
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web