mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] lib: zstd: remove unneeded variable
       [not found] <20230614071235.55955-1-luojianhong@cdjrlc.com>
@ 2023-06-14  7:14 ` baomingtong001
  2023-10-12 15:57   ` Nick Terrell
  0 siblings, 1 reply; 2+ messages in thread
From: baomingtong001 @ 2023-06-14  7:14 UTC (permalink / raw)
  To: terrelln; +Cc: linux-kernel

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;
  }

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] lib: zstd: remove unneeded variable
  2023-06-14  7:14 ` [PATCH] lib: zstd: remove unneeded variable baomingtong001
@ 2023-10-12 15:57   ` Nick Terrell
  0 siblings, 0 replies; 2+ messages in thread
From: Nick Terrell @ 2023-10-12 15:57 UTC (permalink / raw)
  To: baomingtong001; +Cc: Nick Terrell, Nick Terrell, Linux Kernel Mailing List

[-- Attachment #1: Type: text/plain, Size: 1365 bytes --]



> On Jun 14, 2023, at 3:14 AM, baomingtong001@208suo.com wrote:
> 
> !-------------------------------------------------------------------|
> This Message Is From an Untrusted Sender
> You have not previously corresponded with this sender.
> |-------------------------------------------------------------------!
> 
> fix the following coccicheck warning:
> 
> lib/zstd/compress/zstd_cwksp.h:220:17-27: Unneeded variable: "slackSpace". Return "ZSTD_CWKSP_ALIGNMENT_BYTES".

If you would like to fix this, please fix this upstream at https://github.com/facebook/zstd.
That will get synced to the kernel on the next update.

Thanks,
Nick Terrell

> 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;
> }


[-- Attachment #2: winmail.dat --]
[-- Type: application/ms-tnef, Size: 13468 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-10-12 15:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20230614071235.55955-1-luojianhong@cdjrlc.com>
2023-06-14  7:14 ` [PATCH] lib: zstd: remove unneeded variable baomingtong001
2023-10-12 15:57   ` Nick Terrell

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®