linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dm snapshot: remove unneeded variable
@ 2021-11-11  7:56 cgel.zte
  2021-11-11 10:25 ` kernel test robot
  2021-11-12 15:09 ` Mike Snitzer
  0 siblings, 2 replies; 3+ messages in thread
From: cgel.zte @ 2021-11-11  7:56 UTC (permalink / raw)
  To: agk; +Cc: snitzer, dm-devel, linux-kernel, ran jianping, Zeal Robot

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-11-12 15:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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).