From: Mike Snitzer <snitzer@redhat.com>
To: cgel.zte@gmail.com
Cc: agk@redhat.com, dm-devel@redhat.com,
linux-kernel@vger.kernel.org,
ran jianping <ran.jianping@zte.com.cn>,
Zeal Robot <zealci@zte.com.cn>
Subject: Re: dm snapshot: remove unneeded variable
Date: Fri, 12 Nov 2021 10:09:07 -0500 [thread overview]
Message-ID: <YY6Dk0TEQzorBlOU@redhat.com> (raw)
In-Reply-To: <20211111075659.158155-1-ran.jianping@zte.com.cn>
On Thu, Nov 11 2021 at 2:56P -0500,
cgel.zte@gmail.com <cgel.zte@gmail.com> wrote:
> From: ran jianping <ran.jianping@zte.com.cn>
>
> Fix the following coccicheck review:
> ./drivers/md/dm-snap-transient.c:91:10-12: Unneeded variable
>
> Remove unneeded variable used to store return value.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: ran jianping <ran.jianping@zte.com.cn>
> ---
> drivers/md/dm-snap-transient.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/md/dm-snap-transient.c b/drivers/md/dm-snap-transient.c
> index 0e0ae4c36b37..d95b59855da0 100644
> --- a/drivers/md/dm-snap-transient.c
> +++ b/drivers/md/dm-snap-transient.c
> @@ -88,7 +88,6 @@ static unsigned transient_status(struct dm_exception_store *store,
> status_type_t status, char *result,
> unsigned maxlen)
> {
> - unsigned sz = 0;
>
> switch (status) {
> case STATUSTYPE_INFO:
> @@ -101,7 +100,7 @@ static unsigned transient_status(struct dm_exception_store *store,
> break;
> }
>
> - return sz;
> + return 0;
> }
>
> static struct dm_exception_store_type _transient_type = {
> --
> 2.25.1
>
You clearly didn't even compile test this.
Nacked-by: Mike Snitzer <snitzer@redhat.com>
prev parent reply other threads:[~2021-11-12 15:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-11 7:56 [PATCH] dm snapshot: remove unneeded variable cgel.zte
2021-11-11 10:25 ` kernel test robot
2021-11-12 15:09 ` Mike Snitzer [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=YY6Dk0TEQzorBlOU@redhat.com \
--to=snitzer@redhat.com \
--cc=agk@redhat.com \
--cc=cgel.zte@gmail.com \
--cc=dm-devel@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ran.jianping@zte.com.cn \
--cc=zealci@zte.com.cn \
/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