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: <d63fefa76e501dc05353a7d682d83541@208suo.com>
Date:   Wed, 14 Jun 2023 15:58:52 +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 log: remove unneeded variable

fix the following coccicheck warning:

drivers/md/dm-snap-transient.c:94:14-16: Unneeded variable: "sz". Return 
"0".
drivers/md/dm-ps-historical-service-time.c:240:14-16: Unneeded variable: 
"sz". Return "0".

Signed-off-by: Mingtong Bao <baomingtong001@...suo.com>
---
  drivers/md/dm-log.c | 6 ++----
  1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/md/dm-log.c b/drivers/md/dm-log.c
index f9f84236dfcd..38bcdd5ddb21 100644
--- a/drivers/md/dm-log.c
+++ b/drivers/md/dm-log.c
@@ -793,7 +793,6 @@ static region_t core_get_sync_count(struct 
dm_dirty_log *log)
  static int core_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) {
@@ -812,13 +811,12 @@ static int core_status(struct dm_dirty_log *log, 
status_type_t status,
          break;
      }

-    return sz;
+    return 0;
  }

  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) {
@@ -841,7 +839,7 @@ static int disk_status(struct dm_dirty_log *log, 
status_type_t status,
          break;
      }

-    return sz;
+    return 0;
  }

  static struct dm_dirty_log_type _core_type = {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ