From: Austin Kim <austindh.kim@gmail.com>
To: romieu@fr.zoreil.com, davem@davemloft.net
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
austindh.kim@gmail.com
Subject: [PATCH] net/velocity: fix -Wunused-but-set-variable warnings
Date: Fri, 4 Oct 2019 13:52:03 +0900 [thread overview]
Message-ID: <20191004045203.GA124692@LGEARND20B15> (raw)
'curr_status' is declared as u32.
But this variable is not used after below statement.
curr_status = vptr->mii_status & (~VELOCITY_LINK_FAIL);
This variable could be dropped to mute below warning message:
drivers/net/ethernet/via/via-velocity.c:868:6:
warning: variable ‘curr_status’ set but not used
[-Wunused-but-set-variable]
Signed-off-by: Austin Kim <austindh.kim@gmail.com>
---
drivers/net/ethernet/via/via-velocity.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/ethernet/via/via-velocity.c b/drivers/net/ethernet/via/via-velocity.c
index 346e441..36d402c 100644
--- a/drivers/net/ethernet/via/via-velocity.c
+++ b/drivers/net/ethernet/via/via-velocity.c
@@ -865,11 +865,9 @@ static u32 check_connection_type(struct mac_regs __iomem *regs)
*/
static int velocity_set_media_mode(struct velocity_info *vptr, u32 mii_status)
{
- u32 curr_status;
struct mac_regs __iomem *regs = vptr->mac_regs;
vptr->mii_status = mii_check_media_mode(vptr->mac_regs);
- curr_status = vptr->mii_status & (~VELOCITY_LINK_FAIL);
/* Set mii link status */
set_mii_flow_control(vptr);
--
2.6.2
next reply other threads:[~2019-10-04 4:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-04 4:52 Austin Kim [this message]
2019-10-04 22:10 ` [PATCH] net/velocity: fix -Wunused-but-set-variable warnings David Miller
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=20191004045203.GA124692@LGEARND20B15 \
--to=austindh.kim@gmail.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=romieu@fr.zoreil.com \
/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 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).