All of lore.kernel.org
 help / color / mirror / Atom feed
* [dm-devel] [PATCH] dm: remove unneeded variable
@ 2023-06-14  2:10 ` baomingtong001
  0 siblings, 0 replies; 8+ messages in thread
From: baomingtong001 @ 2023-06-14  2:10 UTC (permalink / raw)
  To: agk, snitzer, dm-devel; +Cc: linux-kernel

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



 


--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread
* [dm-devel] [PATCH] dm: remove unneeded variable
@ 2021-11-11  7:53 cgel.zte
  2021-11-11 16:50 ` kernel test robot
  0 siblings, 1 reply; 8+ messages in thread
From: cgel.zte @ 2021-11-11  7:53 UTC (permalink / raw)
  To: agk; +Cc: dm-devel, ran jianping, linux-kernel, snitzer, Zeal Robot

From: ran jianping <ran.jianping@zte.com.cn>

Fix the following coccicheck review:
./drivers/md/dm-ps-round-robin.c:91:5-7: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-ps-round-robin.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/md/dm-ps-round-robin.c b/drivers/md/dm-ps-round-robin.c
index 27f44c5fa04e..455fc02af1cf 100644
--- a/drivers/md/dm-ps-round-robin.c
+++ b/drivers/md/dm-ps-round-robin.c
@@ -88,7 +88,6 @@ static int rr_status(struct path_selector *ps, struct dm_path *path,
 		     status_type_t type, char *result, unsigned int maxlen)
 {
 	struct path_info *pi;
-	int sz = 0;
 
 	if (!path)
 		DMEMIT("0 ");
@@ -107,7 +106,7 @@ static int rr_status(struct path_selector *ps, struct dm_path *path,
 		}
 	}
 
-	return sz;
+	return 0;
 }
 
 /*
-- 
2.25.1

--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel


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

end of thread, other threads:[~2023-06-14 18:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-14  2:10 [dm-devel] [PATCH] dm: remove unneeded variable baomingtong001
2023-06-14  2:10 ` baomingtong001
2023-06-14  2:42 ` [dm-devel] " Alasdair G Kergon
2023-06-14  2:42   ` Alasdair G Kergon
     [not found]   ` <a78b787e3c45de04df95c80dfc2aa511@208suo.com>
2023-06-14 18:48     ` [dm-devel] " Alasdair G Kergon
2023-06-14 18:48       ` Alasdair G Kergon
  -- strict thread matches above, loose matches on Subject: below --
2021-11-11  7:53 [dm-devel] " cgel.zte
2021-11-11 16:50 ` kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.