lkml.org 
[lkml]   [2022]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 3/3] btrfs: Replace kmap() with kmap_local_page() in zlib.c
Date
On martedì 31 maggio 2022 22:35:30 CEST kernel test robot wrote:
> Hi "Fabio,
>
> Thank you for the patch! Perhaps something to improve:
>

[snip]

> If you fix the issue, kindly add following tag where applicable
> Reported-by: kernel test robot <lkp@intel.com>
>
> All warnings (new ones prefixed by >>):
>
> >> fs/btrfs/zlib.c:125:6: warning: variable 'data_in' is used
uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
> if (out_page == NULL) {
> ^~~~~~~~~~~~~~~~
> fs/btrfs/zlib.c:270:6: note: uninitialized use occurs here
> if (data_in) {
> ^~~~~~~
> fs/btrfs/zlib.c:125:2: note: remove the 'if' if its condition is
always false
> if (out_page == NULL) {
> ^~~~~~~~~~~~~~~~~~~~~~~
> fs/btrfs/zlib.c:115:6: warning: variable 'data_in' is used
uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
> if (Z_OK != zlib_deflateInit(&workspace->strm, workspace-
>level)) {
>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/linux/zlib.h:148:25: note: expanded from macro 'Z_OK'
> #define Z_OK 0
> ^
> fs/btrfs/zlib.c:270:6: note: uninitialized use occurs here
> if (data_in) {
> ^~~~~~~
> fs/btrfs/zlib.c:115:2: note: remove the 'if' if its condition is
always false
> if (Z_OK != zlib_deflateInit(&workspace->strm, workspace-
>level)) {
>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> fs/btrfs/zlib.c:100:15: note: initialize the variable 'data_in' to
silence this warning
> char *data_in;
> ^
> = NULL
> >> fs/btrfs/zlib.c:125:6: warning: variable 'cpage_out' is used
uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
> if (out_page == NULL) {
> ^~~~~~~~~~~~~~~~
> fs/btrfs/zlib.c:267:6: note: uninitialized use occurs here
> if (cpage_out)
> ^~~~~~~~~
> fs/btrfs/zlib.c:125:2: note: remove the 'if' if its condition is
always false
> if (out_page == NULL) {
> ^~~~~~~~~~~~~~~~~~~~~~~
> fs/btrfs/zlib.c:115:6: warning: variable 'cpage_out' is used
uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
> if (Z_OK != zlib_deflateInit(&workspace->strm, workspace-
>level)) {
>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/linux/zlib.h:148:25: note: expanded from macro 'Z_OK'
> #define Z_OK 0
> ^
> fs/btrfs/zlib.c:267:6: note: uninitialized use occurs here
> if (cpage_out)
> ^~~~~~~~~
> fs/btrfs/zlib.c:115:2: note: remove the 'if' if its condition is
always false
> if (Z_OK != zlib_deflateInit(&workspace->strm, workspace-
>level)) {
>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> fs/btrfs/zlib.c:101:17: note: initialize the variable 'cpage_out' to
silence this warning
> char *cpage_out;
> ^
> = NULL
> 4 warnings generated.

I'll initialize these variables in v2.

Thanks,

Fabio


\
 
 \ /
  Last update: 2022-06-01 22:47    [W:0.082 / U:0.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site