lkml.org 
[lkml]   [2021]   [Nov]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] dm snapshot: remove unneeded variable
Date
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
\
 
 \ /
  Last update: 2021-11-11 08:57    [W:4.523 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site