lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <6b5a89f9478bae992bedf18dead1e60c@208suo.com>
Date:   Wed, 14 Jun 2023 15:51:45 +0800
From:   baomingtong001@...suo.com
To:     agk@...hat.com, snitzer@...nel.org, dm-devel@...hat.com
Cc:     linux-kernel@...r.kernel.org
Subject: [PATCH] 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".

Signed-off-by: Mingtong Bao <baomingtong001@...suo.com>
---
  drivers/md/dm-ps-queue-length.c | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/md/dm-ps-queue-length.c 
b/drivers/md/dm-ps-queue-length.c
index e305f05ad1e5..59411d0a2083 100644
--- a/drivers/md/dm-ps-queue-length.c
+++ b/drivers/md/dm-ps-queue-length.c
@@ -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,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ