Skip to contentSkip to conversation

f2fs: remove set but not used variable 'params'

PATCH In review Jason Yan 2 participants 3 messages Apr 2, 2020 F2FS file system

lore
Share & tools
lore

Jason Yan

author
#0 lore raw

PATCH 1/1 f2fs: remove set but not used variable 'params'

Fix the following gcc warning:

fs/f2fs/compress.c:375:18: warning: variable 'params' set but not used [-Wunused-but-set-variable]

  ZSTD_parameters params;
                  ^~~~~~
---
 fs/f2fs/compress.c | 2 --
 1 file changed, 2 deletions(-)
fs/f2fs/compress.c +0 -2
index f05ecf4cb899..df7b2d15eacd 100644
@@ -372,12 +372,10 @@ static int zstd_compress_pages(struct compress_ctx *cc)
 
 static int zstd_init_decompress_ctx(struct decompress_io_ctx *dic)
 {
-	ZSTD_parameters params;
 	ZSTD_DStream *stream;
 	void *workspace;
 	unsigned int workspace_size;
 
-	params = ZSTD_getParams(F2FS_ZSTD_DEFAULT_CLEVEL, dic->clen, 0);
 	workspace_size = ZSTD_DStreamWorkspaceBound(MAX_COMPRESS_WINDOW_SIZE);
 
 	workspace = f2fs_kvmalloc(F2FS_I_SB(dic->inode),
Signature · 1 line
2.17.2
#1 lore raw

Hi Jason,

Quoted 8 lines · Jason Yan

Fix the following gcc warning:

fs/f2fs/compress.c:375:18: warning: variable 'params' set but not used [-Wunused-but-set-variable]

  ZSTD_parameters params;
                  ^~~~~~

Thanks for the patch, would you mind that just merge this fix into original path which is still in f2fs private git tree?

Thanks,

Quoted 12 lines
---
 fs/f2fs/compress.c | 2 --
 1 file changed, 2 deletions(-)
fs/f2fs/compress.c +0 -0
index f05ecf4cb899..df7b2d15eacd 100644
@@ -372,12 +372,10 @@ static int zstd_compress_pages(struct compress_ctx *cc)
 
 static int zstd_init_decompress_ctx(struct decompress_io_ctx *dic)

fs/f2fs/compress.c static int zstd_compress_pages(struct compress_ctx *cc) · line 381

Quoted 10 lines
fs/f2fs/compress.c +0 -2
 {
-	ZSTD_parameters params;
 	ZSTD_DStream *stream;
 	void *workspace;
 	unsigned int workspace_size;
 
-	params = ZSTD_getParams(F2FS_ZSTD_DEFAULT_CLEVEL, dic->clen, 0);
 	workspace_size = ZSTD_DStreamWorkspaceBound(MAX_COMPRESS_WINDOW_SIZE);
 
 	workspace = f2fs_kvmalloc(F2FS_I_SB(dic->inode),

_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

author
#2 lore raw

Hi Chao,

Quoted 9 lines · Chao Yu

Hi Jason,

Quoted 6 lines · Jason Yan

Fix the following gcc warning:

fs/f2fs/compress.c:375:18: warning: variable 'params' set but not used [-Wunused-but-set-variable]

   ZSTD_parameters params;
                   ^~~~~~
Quoted 6 lines
Quoted 2 lines

Thanks for the patch, would you mind that just merge this fix into original path which is still in f2fs private git tree?

It's ok to merge this into the original patch.

Quoted 27 lines

Thanks,

Quoted 12 lines
---
  fs/f2fs/compress.c | 2 --
  1 file changed, 2 deletions(-)
fs/f2fs/compress.c +0 -0
index f05ecf4cb899..df7b2d15eacd 100644
@@ -372,12 +372,10 @@ static int zstd_compress_pages(struct compress_ctx *cc)
 
  static int zstd_init_decompress_ctx(struct decompress_io_ctx *dic)

fs/f2fs/compress.c static int zstd_compress_pages(struct compress_ctx *cc) · line 381

Quoted 10 lines
fs/f2fs/compress.c +0 -2
  {
-	ZSTD_parameters params;
  	ZSTD_DStream *stream;
  	void *workspace;
  	unsigned int workspace_size;
 
-	params = ZSTD_getParams(F2FS_ZSTD_DEFAULT_CLEVEL, dic->clen, 0);
  	workspace_size = ZSTD_DStreamWorkspaceBound(MAX_COMPRESS_WINDOW_SIZE);
 
  	workspace = f2fs_kvmalloc(F2FS_I_SB(dic->inode),

.