mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: baomingtong001@208suo.com
To: terrelln@fb.com
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] lib: zstd: remove unneeded variable
Date: Wed, 14 Jun 2023 15:14:09 +0800	[thread overview]
Message-ID: <8c519982c1b73dfb4aa84c8215c8a5ac@208suo.com> (raw)
In-Reply-To: <20230614071235.55955-1-luojianhong@cdjrlc.com>

fix the following coccicheck warning:

lib/zstd/compress/zstd_cwksp.h:220:17-27: Unneeded variable: 
"slackSpace". Return "ZSTD_CWKSP_ALIGNMENT_BYTES".

Signed-off-by: Mingtong Bao <baomingtong001@208suo.com>
---
  lib/zstd/compress/zstd_cwksp.h | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lib/zstd/compress/zstd_cwksp.h 
b/lib/zstd/compress/zstd_cwksp.h
index 349fc923c355..36c574cd3d6f 100644
--- a/lib/zstd/compress/zstd_cwksp.h
+++ b/lib/zstd/compress/zstd_cwksp.h
@@ -217,8 +217,7 @@ MEM_STATIC size_t 
ZSTD_cwksp_slack_space_required(void) {
       * n_1 + n_2 == 64 bytes if the cwksp is freshly allocated, due to 
tables and
       * aligneds being sized in multiples of 64 bytes.
       */
-    size_t const slackSpace = ZSTD_CWKSP_ALIGNMENT_BYTES;
-    return slackSpace;
+    return ZSTD_CWKSP_ALIGNMENT_BYTES;
  }

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

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230614071235.55955-1-luojianhong@cdjrlc.com>
2023-06-14  7:14 ` baomingtong001 [this message]
2023-10-12 15:57   ` Nick Terrell

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=8c519982c1b73dfb4aa84c8215c8a5ac@208suo.com \
    --to=baomingtong001@208suo.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=terrelln@fb.com \
    /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®