* [ath9k-devel] [PATCH 0/2] net-ath9k_htc: Fine-tuning for two function implementations [not found] <566ABCD9.1060404@users.sourceforge.net> @ 2016-01-01 18:21 ` SF Markus Elfring 2016-01-01 18:23 ` [ath9k-devel] [PATCH 1/2] net-ath9k_htc: Delete an unnecessary variable initialisation in ath9k_hif_usb_rx_stream() SF Markus Elfring 2016-01-01 18:25 ` [ath9k-devel] [PATCH 2/2] net-ath9k_htc: Replace a variable initialisation by an assignment in ath9k_htc_set_channel() SF Markus Elfring 0 siblings, 2 replies; 9+ messages in thread From: SF Markus Elfring @ 2016-01-01 18:21 UTC (permalink / raw) To: ath9k-devel From: Markus Elfring <elfring@users.sourceforge.net> Date: Fri, 1 Jan 2016 19:16:05 +0100 A few update suggestions were taken into account from static source code analysis. Markus Elfring (2): Delete an unnecessary variable initialisation in ath9k_hif_usb_rx_stream() Replace a variable initialisation by an assignment in ath9k_htc_set_channel() drivers/net/wireless/ath/ath9k/hif_usb.c | 2 +- drivers/net/wireless/ath/ath9k/htc_drv_main.c | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) -- 2.6.3 ^ permalink raw reply [flat|nested] 9+ messages in thread
* [ath9k-devel] [PATCH 1/2] net-ath9k_htc: Delete an unnecessary variable initialisation in ath9k_hif_usb_rx_stream() 2016-01-01 18:21 ` [ath9k-devel] [PATCH 0/2] net-ath9k_htc: Fine-tuning for two function implementations SF Markus Elfring @ 2016-01-01 18:23 ` SF Markus Elfring 2016-01-01 19:14 ` Oleksij Rempel 2016-01-01 18:25 ` [ath9k-devel] [PATCH 2/2] net-ath9k_htc: Replace a variable initialisation by an assignment in ath9k_htc_set_channel() SF Markus Elfring 1 sibling, 1 reply; 9+ messages in thread From: SF Markus Elfring @ 2016-01-01 18:23 UTC (permalink / raw) To: ath9k-devel From: Markus Elfring <elfring@users.sourceforge.net> Date: Fri, 1 Jan 2016 19:00:53 +0100 Omit explicit initialisation at the beginning for one local variable that is redefined before its first use. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> --- drivers/net/wireless/ath/ath9k/hif_usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c index 165dd20..51bd61b 100644 --- a/drivers/net/wireless/ath/ath9k/hif_usb.c +++ b/drivers/net/wireless/ath/ath9k/hif_usb.c @@ -525,7 +525,7 @@ static void ath9k_hif_usb_rx_stream(struct hif_device_usb *hif_dev, struct sk_buff *skb) { struct sk_buff *nskb, *skb_pool[MAX_PKT_NUM_IN_TRANSFER]; - int index = 0, i = 0, len = skb->len; + int index = 0, i, len = skb->len; int rx_remain_len, rx_pkt_len; u16 pool_index = 0; u8 *ptr; -- 2.6.3 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [ath9k-devel] [PATCH 1/2] net-ath9k_htc: Delete an unnecessary variable initialisation in ath9k_hif_usb_rx_stream() 2016-01-01 18:23 ` [ath9k-devel] [PATCH 1/2] net-ath9k_htc: Delete an unnecessary variable initialisation in ath9k_hif_usb_rx_stream() SF Markus Elfring @ 2016-01-01 19:14 ` Oleksij Rempel 0 siblings, 0 replies; 9+ messages in thread From: Oleksij Rempel @ 2016-01-01 19:14 UTC (permalink / raw) To: ath9k-devel Am 01.01.2016 um 19:23 schrieb SF Markus Elfring: > From: Markus Elfring <elfring@users.sourceforge.net> > Date: Fri, 1 Jan 2016 19:00:53 +0100 > > Omit explicit initialisation at the beginning for one local variable > that is redefined before its first use. > > Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> > --- > drivers/net/wireless/ath/ath9k/hif_usb.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c > index 165dd20..51bd61b 100644 > --- a/drivers/net/wireless/ath/ath9k/hif_usb.c > +++ b/drivers/net/wireless/ath/ath9k/hif_usb.c > @@ -525,7 +525,7 @@ static void ath9k_hif_usb_rx_stream(struct hif_device_usb *hif_dev, > struct sk_buff *skb) > { > struct sk_buff *nskb, *skb_pool[MAX_PKT_NUM_IN_TRANSFER]; > - int index = 0, i = 0, len = skb->len; > + int index = 0, i, len = skb->len; > int rx_remain_len, rx_pkt_len; > u16 pool_index = 0; > u8 *ptr; > Reviewed-by: Oleksij Rempel <linux@rempel-privat.de> -- Regards, Oleksij -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 213 bytes Desc: OpenPGP digital signature Url : http://lists.ath9k.org/pipermail/ath9k-devel/attachments/20160101/9f7764b8/attachment.pgp ^ permalink raw reply [flat|nested] 9+ messages in thread
* [ath9k-devel] [PATCH 2/2] net-ath9k_htc: Replace a variable initialisation by an assignment in ath9k_htc_set_channel() 2016-01-01 18:21 ` [ath9k-devel] [PATCH 0/2] net-ath9k_htc: Fine-tuning for two function implementations SF Markus Elfring 2016-01-01 18:23 ` [ath9k-devel] [PATCH 1/2] net-ath9k_htc: Delete an unnecessary variable initialisation in ath9k_hif_usb_rx_stream() SF Markus Elfring @ 2016-01-01 18:25 ` SF Markus Elfring 2016-01-01 19:14 ` Oleksij Rempel 2016-04-08 1:40 ` Julian Calaby 1 sibling, 2 replies; 9+ messages in thread From: SF Markus Elfring @ 2016-01-01 18:25 UTC (permalink / raw) To: ath9k-devel From: Markus Elfring <elfring@users.sourceforge.net> Date: Fri, 1 Jan 2016 19:09:32 +0100 Replace an explicit initialisation for one local variable at the beginning by a conditional assignment. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> --- drivers/net/wireless/ath/ath9k/htc_drv_main.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c index a680a97..30bd59e 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c @@ -246,7 +246,7 @@ static int ath9k_htc_set_channel(struct ath9k_htc_priv *priv, struct ieee80211_conf *conf = &common->hw->conf; bool fastcc; struct ieee80211_channel *channel = hw->conf.chandef.chan; - struct ath9k_hw_cal_data *caldata = NULL; + struct ath9k_hw_cal_data *caldata; enum htc_phymode mode; __be16 htc_mode; u8 cmd_rsp; @@ -274,10 +274,7 @@ static int ath9k_htc_set_channel(struct ath9k_htc_priv *priv, priv->ah->curchan->channel, channel->center_freq, conf_is_ht(conf), conf_is_ht40(conf), fastcc); - - if (!fastcc) - caldata = &priv->caldata; - + caldata = fastcc ? NULL : &priv->caldata; ret = ath9k_hw_reset(ah, hchan, caldata, fastcc); if (ret) { ath_err(common, -- 2.6.3 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [ath9k-devel] [PATCH 2/2] net-ath9k_htc: Replace a variable initialisation by an assignment in ath9k_htc_set_channel() 2016-01-01 18:25 ` [ath9k-devel] [PATCH 2/2] net-ath9k_htc: Replace a variable initialisation by an assignment in ath9k_htc_set_channel() SF Markus Elfring @ 2016-01-01 19:14 ` Oleksij Rempel 2016-04-08 1:40 ` Julian Calaby 1 sibling, 0 replies; 9+ messages in thread From: Oleksij Rempel @ 2016-01-01 19:14 UTC (permalink / raw) To: ath9k-devel Am 01.01.2016 um 19:25 schrieb SF Markus Elfring: > From: Markus Elfring <elfring@users.sourceforge.net> > Date: Fri, 1 Jan 2016 19:09:32 +0100 > > Replace an explicit initialisation for one local variable at the beginning > by a conditional assignment. > > Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> > --- > drivers/net/wireless/ath/ath9k/htc_drv_main.c | 7 ++----- > 1 file changed, 2 insertions(+), 5 deletions(-) > > diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c > index a680a97..30bd59e 100644 > --- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c > +++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c > @@ -246,7 +246,7 @@ static int ath9k_htc_set_channel(struct ath9k_htc_priv *priv, > struct ieee80211_conf *conf = &common->hw->conf; > bool fastcc; > struct ieee80211_channel *channel = hw->conf.chandef.chan; > - struct ath9k_hw_cal_data *caldata = NULL; > + struct ath9k_hw_cal_data *caldata; > enum htc_phymode mode; > __be16 htc_mode; > u8 cmd_rsp; > @@ -274,10 +274,7 @@ static int ath9k_htc_set_channel(struct ath9k_htc_priv *priv, > priv->ah->curchan->channel, > channel->center_freq, conf_is_ht(conf), conf_is_ht40(conf), > fastcc); > - > - if (!fastcc) > - caldata = &priv->caldata; > - > + caldata = fastcc ? NULL : &priv->caldata; > ret = ath9k_hw_reset(ah, hchan, caldata, fastcc); > if (ret) { > ath_err(common, > Reviewed-by: Oleksij Rempel <linux@rempel-privat.de> -- Regards, Oleksij -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 213 bytes Desc: OpenPGP digital signature Url : http://lists.ath9k.org/pipermail/ath9k-devel/attachments/20160101/a7f6d86e/attachment.pgp ^ permalink raw reply [flat|nested] 9+ messages in thread
* [ath9k-devel] [PATCH 2/2] net-ath9k_htc: Replace a variable initialisation by an assignment in ath9k_htc_set_channel() 2016-01-01 18:25 ` [ath9k-devel] [PATCH 2/2] net-ath9k_htc: Replace a variable initialisation by an assignment in ath9k_htc_set_channel() SF Markus Elfring 2016-01-01 19:14 ` Oleksij Rempel @ 2016-04-08 1:40 ` Julian Calaby 2016-04-15 12:09 ` Kalle Valo 2016-04-19 16:13 ` Kalle Valo 1 sibling, 2 replies; 9+ messages in thread From: Julian Calaby @ 2016-04-08 1:40 UTC (permalink / raw) To: ath9k-devel Hi Kalle, On Sat, Jan 2, 2016 at 5:25 AM, SF Markus Elfring <elfring@users.sourceforge.net> wrote: > From: Markus Elfring <elfring@users.sourceforge.net> > Date: Fri, 1 Jan 2016 19:09:32 +0100 > > Replace an explicit initialisation for one local variable at the beginning > by a conditional assignment. > > Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> This looks sane to me. Reviewed-by: Julian Calaby <julian.calaby@gmail.com> Thanks, Julian Calaby > --- > drivers/net/wireless/ath/ath9k/htc_drv_main.c | 7 ++----- > 1 file changed, 2 insertions(+), 5 deletions(-) > > diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c > index a680a97..30bd59e 100644 > --- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c > +++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c > @@ -246,7 +246,7 @@ static int ath9k_htc_set_channel(struct ath9k_htc_priv *priv, > struct ieee80211_conf *conf = &common->hw->conf; > bool fastcc; > struct ieee80211_channel *channel = hw->conf.chandef.chan; > - struct ath9k_hw_cal_data *caldata = NULL; > + struct ath9k_hw_cal_data *caldata; > enum htc_phymode mode; > __be16 htc_mode; > u8 cmd_rsp; > @@ -274,10 +274,7 @@ static int ath9k_htc_set_channel(struct ath9k_htc_priv *priv, > priv->ah->curchan->channel, > channel->center_freq, conf_is_ht(conf), conf_is_ht40(conf), > fastcc); > - > - if (!fastcc) > - caldata = &priv->caldata; > - > + caldata = fastcc ? NULL : &priv->caldata; > ret = ath9k_hw_reset(ah, hchan, caldata, fastcc); > if (ret) { > ath_err(common, > -- > 2.6.3 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-wireless" in > the body of a message to majordomo at vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- Julian Calaby Email: julian.calaby at gmail.com Profile: http://www.google.com/profiles/julian.calaby/ ^ permalink raw reply [flat|nested] 9+ messages in thread
* [ath9k-devel] [PATCH 2/2] net-ath9k_htc: Replace a variable initialisation by an assignment in ath9k_htc_set_channel() 2016-04-08 1:40 ` Julian Calaby @ 2016-04-15 12:09 ` Kalle Valo 2016-04-15 14:34 ` Julian Calaby 2016-04-19 16:13 ` Kalle Valo 1 sibling, 1 reply; 9+ messages in thread From: Kalle Valo @ 2016-04-15 12:09 UTC (permalink / raw) To: ath9k-devel Julian Calaby <julian.calaby@gmail.com> writes: > Hi Kalle, > > On Sat, Jan 2, 2016 at 5:25 AM, SF Markus Elfring > <elfring@users.sourceforge.net> wrote: >> From: Markus Elfring <elfring@users.sourceforge.net> >> Date: Fri, 1 Jan 2016 19:09:32 +0100 >> >> Replace an explicit initialisation for one local variable at the beginning >> by a conditional assignment. >> >> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> > > This looks sane to me. > > Reviewed-by: Julian Calaby <julian.calaby@gmail.com> Before I commit I'll just change the commit title to: ath9k_htc: Replace a variable initialisation by an assignment in ath9k_htc_set_channel() -- Kalle Valo ^ permalink raw reply [flat|nested] 9+ messages in thread
* [ath9k-devel] [PATCH 2/2] net-ath9k_htc: Replace a variable initialisation by an assignment in ath9k_htc_set_channel() 2016-04-15 12:09 ` Kalle Valo @ 2016-04-15 14:34 ` Julian Calaby 0 siblings, 0 replies; 9+ messages in thread From: Julian Calaby @ 2016-04-15 14:34 UTC (permalink / raw) To: ath9k-devel Hi Kalle, On Fri, Apr 15, 2016 at 10:09 PM, Kalle Valo <kvalo@codeaurora.org> wrote: > Julian Calaby <julian.calaby@gmail.com> writes: > >> Hi Kalle, >> >> On Sat, Jan 2, 2016 at 5:25 AM, SF Markus Elfring >> <elfring@users.sourceforge.net> wrote: >>> From: Markus Elfring <elfring@users.sourceforge.net> >>> Date: Fri, 1 Jan 2016 19:09:32 +0100 >>> >>> Replace an explicit initialisation for one local variable at the beginning >>> by a conditional assignment. >>> >>> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> >> >> This looks sane to me. >> >> Reviewed-by: Julian Calaby <julian.calaby@gmail.com> > > Before I commit I'll just change the commit title to: > > ath9k_htc: Replace a variable initialisation by an assignment in ath9k_htc_set_channel() Sounds good to me. Thanks, -- Julian Calaby Email: julian.calaby at gmail.com Profile: http://www.google.com/profiles/julian.calaby/ ^ permalink raw reply [flat|nested] 9+ messages in thread
* [ath9k-devel] [PATCH 2/2] net-ath9k_htc: Replace a variable initialisation by an assignment in ath9k_htc_set_channel() 2016-04-08 1:40 ` Julian Calaby 2016-04-15 12:09 ` Kalle Valo @ 2016-04-19 16:13 ` Kalle Valo 1 sibling, 0 replies; 9+ messages in thread From: Kalle Valo @ 2016-04-19 16:13 UTC (permalink / raw) To: ath9k-devel Julian Calaby <julian.calaby@gmail.com> writes: > On Sat, Jan 2, 2016 at 5:25 AM, SF Markus Elfring > <elfring@users.sourceforge.net> wrote: >> From: Markus Elfring <elfring@users.sourceforge.net> >> Date: Fri, 1 Jan 2016 19:09:32 +0100 >> >> Replace an explicit initialisation for one local variable at the beginning >> by a conditional assignment. >> >> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> > > This looks sane to me. > > Reviewed-by: Julian Calaby <julian.calaby@gmail.com> Applied, thanks. -- Kalle Valo ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2016-04-19 16:13 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <566ABCD9.1060404@users.sourceforge.net>
2016-01-01 18:21 ` [ath9k-devel] [PATCH 0/2] net-ath9k_htc: Fine-tuning for two function implementations SF Markus Elfring
2016-01-01 18:23 ` [ath9k-devel] [PATCH 1/2] net-ath9k_htc: Delete an unnecessary variable initialisation in ath9k_hif_usb_rx_stream() SF Markus Elfring
2016-01-01 19:14 ` Oleksij Rempel
2016-01-01 18:25 ` [ath9k-devel] [PATCH 2/2] net-ath9k_htc: Replace a variable initialisation by an assignment in ath9k_htc_set_channel() SF Markus Elfring
2016-01-01 19:14 ` Oleksij Rempel
2016-04-08 1:40 ` Julian Calaby
2016-04-15 12:09 ` Kalle Valo
2016-04-15 14:34 ` Julian Calaby
2016-04-19 16:13 ` Kalle Valo
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).