Content-Type: multipart/mixed; boundary="===============1320147928814480489==" MIME-Version: 1.0 From: Fabio M. De Francesco To: kbuild-all@lists.01.org Subject: Re: [PATCH 3/3] btrfs: Replace kmap() with kmap_local_page() in zlib.c Date: Wed, 01 Jun 2022 21:57:28 +0200 Message-ID: <3146770.aV6nBDHxoP@opensuse> In-Reply-To: <202206010437.EX5Nj7cu-lkp@intel.com> List-Id: --===============1320147928814480489== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On marted=C3=AC 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 > = > 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 =3D=3D 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 =3D=3D NULL) { > ^~~~~~~~~~~~~~~~~~~~~~~ > fs/btrfs/zlib.c:115:6: warning: variable 'data_in' is used = uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] > if (Z_OK !=3D 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 !=3D 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; > ^ > =3D NULL > >> fs/btrfs/zlib.c:125:6: warning: variable 'cpage_out' is used = uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] > if (out_page =3D=3D 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 =3D=3D NULL) { > ^~~~~~~~~~~~~~~~~~~~~~~ > fs/btrfs/zlib.c:115:6: warning: variable 'cpage_out' is used = uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] > if (Z_OK !=3D 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 !=3D 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; > ^ > =3D NULL > 4 warnings generated. I'll initialize these variables in v2. Thanks, Fabio --===============1320147928814480489==--