public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: baomingtong001@208suo.com
To: agk <agk@redhat.com>, snitzer <snitzer@kernel.org>,
	dm-devel <dm-devel@redhat.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH] dm: remove unneeded variable
Date: Wed, 14 Jun 2023 10:10:33 +0800	[thread overview]
Message-ID: <202306141008237478337@208suo.com> (raw)

fix the following coccicheck warning:



 



drivers/md/dm-snap-persistent.c:909:14-16: Unneeded variable: "sz".



 



Signed-off-by: Mingtong Bao <baomingtong001@208suo.com>



---



drivers/md/dm-snap-persistent.c | 3 +--



1 file changed, 1 insertion(+), 2 deletions(-)



 



diff --git a/drivers/md/dm-snap-persistent.c 
b/drivers/md/dm-snap-persistent.c



index 15649921f2a9..7ea01bceba59 100644



--- a/drivers/md/dm-snap-persistent.c



+++ b/drivers/md/dm-snap-persistent.c



@@ -906,7 +906,6 @@ static unsigned int persistent_status(struct 
dm_exception_store *store,



  status_type_t status, char *result,



  unsigned int maxlen)



{



- unsigned int sz = 0;



switch (status) {



case STATUSTYPE_INFO:



@@ -920,7 +919,7 @@ static unsigned int persistent_status(struct 
dm_exception_store *store,



break;



}



- return sz;



+ return 0;



}



static struct dm_exception_store_type _persistent_type = {



--



2.40.1



 



             reply	other threads:[~2023-06-14  2:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-14  2:10 baomingtong001 [this message]
2023-06-14  2:42 ` [PATCH] dm: remove unneeded variable Alasdair G Kergon
     [not found]   ` <a78b787e3c45de04df95c80dfc2aa511@208suo.com>
2023-06-14 18:48     ` Alasdair G Kergon
  -- strict thread matches above, loose matches on Subject: below --
2021-11-11  7:53 cgel.zte
2021-11-11 16:50 ` kernel test robot

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=202306141008237478337@208suo.com \
    --to=baomingtong001@208suo.com \
    --cc=agk@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=snitzer@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox