public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dm: remove unneeded variable 'sz'
@ 2021-03-09  9:32 Yang Li
  2021-03-09 13:38 ` kernel test robot
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Yang Li @ 2021-03-09  9:32 UTC (permalink / raw)
  To: agk; +Cc: snitzer, dm-devel, linux-kernel, Yang Li

Fix the following coccicheck warning:
./drivers/md/dm-ps-service-time.c:85:10-12: Unneeded variable: "sz".
Return "0" on line 105

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
 drivers/md/dm-ps-service-time.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/md/dm-ps-service-time.c b/drivers/md/dm-ps-service-time.c
index 9cfda66..12dd5ce 100644
--- a/drivers/md/dm-ps-service-time.c
+++ b/drivers/md/dm-ps-service-time.c
@@ -82,7 +82,6 @@ static void st_destroy(struct path_selector *ps)
 static int st_status(struct path_selector *ps, struct dm_path *path,
 		     status_type_t type, char *result, unsigned maxlen)
 {
-	unsigned sz = 0;
 	struct path_info *pi;
 
 	if (!path)
@@ -102,7 +101,7 @@ static int st_status(struct path_selector *ps, struct dm_path *path,
 		}
 	}
 
-	return sz;
+	return 0;
 }
 
 static int st_add_path(struct path_selector *ps, struct dm_path *path,
-- 
1.8.3.1


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

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

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-09  9:32 [PATCH] dm: remove unneeded variable 'sz' Yang Li
2021-03-09 13:38 ` kernel test robot
2021-03-09 17:24 ` kernel test robot
2021-03-09 20:14 ` Mike Snitzer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox