Skip to contentSkip to conversation

dm: remove unneeded variable from ql_status()

PATCH New [email protected] 1 participant 1 message Jun 14, 2023 1 message not in the archive Device mapper

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 dm: remove unneeded variable from ql_status()

fix the following coccicheck warning:

drivers/md/dm-ps-queue-length.c:90:14-16: Unneeded variable: "sz". Return "0".

---
 drivers/md/dm-ps-queue-length.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/md/dm-ps-queue-length.c +1 -2
index e305f05ad1e5..59411d0a2083 100644
@@ -87,7 +87,6 @@ static void ql_destroy(struct path_selector *ps)
 static int ql_status(struct path_selector *ps, struct dm_path *path,
              status_type_t type, char *result, unsigned int maxlen)
 {
-    unsigned int sz = 0;
     struct path_info *pi;
 
     /* When called with NULL path, return selector status/args. */
@@ -109,7 +108,7 @@ static int ql_status(struct path_selector *ps, struct dm_path *path,
         }
     }
 
-    return sz;
+    return 0;
 }
 
 static int ql_add_path(struct path_selector *ps, struct dm_path *path,