From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Larry Finger <Larry.Finger@lwfinger.net>
Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org,
netdev@vger.kernel.org
Subject: Re: [PATCH 2/7] rtlwifi: rtl8192de: Fix smatch warnings in rtl8192de/hw.c
Date: Sat, 14 Sep 2013 23:59:54 +0400 [thread overview]
Message-ID: <5234C03A.2070701@cogentembedded.com> (raw)
In-Reply-To: <1379094304-22041-3-git-send-email-Larry.Finger@lwfinger.net>
Hello.
On 09/13/2013 09:44 PM, Larry Finger wrote:
> Smatch lists the following:
> CHECK drivers/net/wireless/rtlwifi/rtl8192de/hw.c
> drivers/net/wireless/rtlwifi/rtl8192de/hw.c:1200 rtl92de_set_qos() info: ignoring unreachable code.
> drivers/net/wireless/rtlwifi/rtl8192de/hw.c:1200 rtl92de_set_qos() info: ignoring unreachable code.
> Dead code is removed.
It is instead commented out, including non-dead code it seems...
> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
> ---
> drivers/net/wireless/rtlwifi/rtl8192de/hw.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/hw.c b/drivers/net/wireless/rtlwifi/rtl8192de/hw.c
> index 7dd8f6d..c9b0894 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8192de/hw.c
> +++ b/drivers/net/wireless/rtlwifi/rtl8192de/hw.c
> @@ -1194,6 +1194,7 @@ void rtl92d_linked_set_reg(struct ieee80211_hw *hw)
> * mac80211 will send pkt when scan */
> void rtl92de_set_qos(struct ieee80211_hw *hw, int aci)
> {
> +/*
> struct rtl_priv *rtlpriv = rtl_priv(hw);
> rtl92d_dm_init_edca_turbo(hw);
> return;
Shouldn't the comment start here (and *return* removed)? It's also
better to remove the dead code than just to comment it out.
> @@ -1213,6 +1214,7 @@ void rtl92de_set_qos(struct ieee80211_hw *hw, int aci)
> RT_ASSERT(false, "invalid aci: %d !\n", aci);
> break;
> }
> + */
> }
WBR, Sergei
WARNING: multiple messages have this Message-ID (diff)
From: Sergei Shtylyov <sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
To: Larry Finger <Larry.Finger-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
Cc: linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org,
linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 2/7] rtlwifi: rtl8192de: Fix smatch warnings in rtl8192de/hw.c
Date: Sat, 14 Sep 2013 23:59:54 +0400 [thread overview]
Message-ID: <5234C03A.2070701@cogentembedded.com> (raw)
In-Reply-To: <1379094304-22041-3-git-send-email-Larry.Finger-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
Hello.
On 09/13/2013 09:44 PM, Larry Finger wrote:
> Smatch lists the following:
> CHECK drivers/net/wireless/rtlwifi/rtl8192de/hw.c
> drivers/net/wireless/rtlwifi/rtl8192de/hw.c:1200 rtl92de_set_qos() info: ignoring unreachable code.
> drivers/net/wireless/rtlwifi/rtl8192de/hw.c:1200 rtl92de_set_qos() info: ignoring unreachable code.
> Dead code is removed.
It is instead commented out, including non-dead code it seems...
> Signed-off-by: Larry Finger <Larry.Finger-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
> ---
> drivers/net/wireless/rtlwifi/rtl8192de/hw.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/hw.c b/drivers/net/wireless/rtlwifi/rtl8192de/hw.c
> index 7dd8f6d..c9b0894 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8192de/hw.c
> +++ b/drivers/net/wireless/rtlwifi/rtl8192de/hw.c
> @@ -1194,6 +1194,7 @@ void rtl92d_linked_set_reg(struct ieee80211_hw *hw)
> * mac80211 will send pkt when scan */
> void rtl92de_set_qos(struct ieee80211_hw *hw, int aci)
> {
> +/*
> struct rtl_priv *rtlpriv = rtl_priv(hw);
> rtl92d_dm_init_edca_turbo(hw);
> return;
Shouldn't the comment start here (and *return* removed)? It's also
better to remove the dead code than just to comment it out.
> @@ -1213,6 +1214,7 @@ void rtl92de_set_qos(struct ieee80211_hw *hw, int aci)
> RT_ASSERT(false, "invalid aci: %d !\n", aci);
> break;
> }
> + */
> }
WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2013-09-14 19:59 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-13 17:44 [PATCH 0/7] rtlwifi: Patches to fix problems shown by smatch Larry Finger
2013-09-13 17:44 ` Larry Finger
2013-09-13 17:44 ` [PATCH 1/7] rtlwifi: rtl8192du: Fix smatch errors in /rtl8192de/dm.c Larry Finger
2013-09-13 17:44 ` [PATCH 2/7] rtlwifi: rtl8192de: Fix smatch warnings in rtl8192de/hw.c Larry Finger
2013-09-13 17:44 ` Larry Finger
2013-09-14 19:59 ` Sergei Shtylyov [this message]
2013-09-14 19:59 ` Sergei Shtylyov
2013-09-14 20:30 ` Larry Finger
2013-09-13 17:45 ` [PATCH 3/7] rtlwifi: rtl8192cu: Fix smatch warning in rtl8192cu/trx.c Larry Finger
2013-09-13 17:45 ` Larry Finger
2013-09-13 17:45 ` [PATCH 4/7] rtlwifi: rtl8192_common: Fix smatch errors and warnings in rtl8192c/dm_common.c Larry Finger
2013-09-13 17:45 ` [PATCH 5/7: rtlwifi: Fix smatch warning in pci.c Larry Finger
2013-09-16 9:26 ` David Laight
2013-09-16 17:39 ` Larry Finger
2013-09-13 17:45 ` [PATCH 6/7] rtlwifi: Fix smatch warnings in usb.c Larry Finger
2013-09-13 17:45 ` Larry Finger
2013-09-14 19:44 ` Sergei Shtylyov
2013-09-14 19:44 ` Sergei Shtylyov
2013-09-14 20:26 ` Larry Finger
2013-09-14 20:26 ` Larry Finger
2013-09-13 17:45 ` [PATCH 7/7] rtlwifi: rtl8188ee: Fix smatch warning in rtl8188ee/hw.c Larry Finger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5234C03A.2070701@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=Larry.Finger@lwfinger.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.