Netdev List
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: austindh.kim@gmail.com
Cc: romieu@fr.zoreil.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net/velocity: fix -Wunused-but-set-variable warnings
Date: Fri, 04 Oct 2019 15:10:37 -0700 (PDT)	[thread overview]
Message-ID: <20191004.151037.207929699391829769.davem@davemloft.net> (raw)
In-Reply-To: <20191004045203.GA124692@LGEARND20B15>

From: Austin Kim <austindh.kim@gmail.com>
Date: Fri, 4 Oct 2019 13:52:03 +0900

> '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>

Please don't make these changes like a robot.

Always look at the surrounding context and even the history of how
this piece of code got here by using git blame and other tools.

There is a comment right under this variable assignment referring to
the variable.  So if you remove the variable, you should do something
with the comment as well.

Thank you.

      reply	other threads:[~2019-10-04 22:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-04  4:52 [PATCH] net/velocity: fix -Wunused-but-set-variable warnings Austin Kim
2019-10-04 22:10 ` David Miller [this message]

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=20191004.151037.207929699391829769.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=austindh.kim@gmail.com \
    --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