mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: baomingtong001@208suo.com
To: agk@redhat.com, snitzer@kernel.org, dm-devel@redhat.com
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] dm: remove unneeded variable from ql_status()
Date: Wed, 14 Jun 2023 15:51:45 +0800	[thread overview]
Message-ID: <6b5a89f9478bae992bedf18dead1e60c@208suo.com> (raw)
In-Reply-To: <20230614074927.4072-1-luojianhong@cdjrlc.com>

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@208suo.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,

           reply	other threads:[~2023-06-14  7:53 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20230614074927.4072-1-luojianhong@cdjrlc.com>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6b5a89f9478bae992bedf18dead1e60c@208suo.com \
    --to=baomingtong001@208suo.com \
    --cc=agk@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=snitzer@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®