Skip to contentSkip to conversation

drivers: md: dm-log.c: Remove unused variable 'sz'

PATCH NAK Jieun Kim 1 participant 1 message Dec 1, 2019

Subsystems (2)
lore
Share & tools
lore

Jieun Kim

author
#0 lore raw

PATCH 2/2 drivers: md: dm-log.c: Remove unused variable 'sz'

Remove unused variable 'sz' in disk_status function detected by coccinelle scripts(returnvar.cocci)

---
 drivers/md/dm-log.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/md/dm-log.c +1 -2
index 8800ec1847b5..67e74362c6ac 100644
@@ -800,7 +800,6 @@ static int core_status(struct dm_dirty_log *log, status_type_t status,
 static int disk_status(struct dm_dirty_log *log, status_type_t status,
 		       char *result, unsigned int maxlen)
 {
-	int sz = 0;
 	struct log_c *lc = log->context;
 
 	switch(status) {
@@ -818,7 +817,7 @@ static int disk_status(struct dm_dirty_log *log, status_type_t status,
 		DMEMIT_SYNC;
 	}
 
-	return sz;
+	return 0;
 }
 
 static struct dm_dirty_log_type _core_type = {
Signature · 1 line
2.17.1