linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Fabio M. De Francesco" <fmdefrancesco@gmail.com>
To: Chris Mason <chris.mason@fusionio.com>,
	Josef Bacik <josef@toxicpanda.com>,
	David Sterba <dsterba@suse.com>, Ira Weiny <ira.weiny@intel.com>,
	linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel test robot <lkp@intel.com>
Cc: llvm@lists.linux.dev, 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	[thread overview]
Message-ID: <3146770.aV6nBDHxoP@opensuse> (raw)
In-Reply-To: <202206010437.EX5Nj7cu-lkp@intel.com>

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



  reply	other threads:[~2022-06-01 20:46 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-31 14:53 [PATCH 0/3] btrfs: Replace kmap() with kmap_local_page() Fabio M. De Francesco
2022-05-31 14:53 ` [PATCH 1/3] btrfs: Replace kmap() with kmap_local_page() in inode.c Fabio M. De Francesco
2022-05-31 15:46   ` Christoph Hellwig
2022-05-31 14:53 ` [PATCH 2/3] btrfs: Replace kmap() with kmap_local_page() in lzo.c Fabio M. De Francesco
2022-05-31 15:53   ` Christoph Hellwig
2022-05-31 14:53 ` [PATCH 3/3] btrfs: Replace kmap() with kmap_local_page() in zlib.c Fabio M. De Francesco
2022-05-31 15:53   ` Christoph Hellwig
2022-05-31 20:35   ` kernel test robot
2022-06-01 19:57     ` Fabio M. De Francesco [this message]
2022-06-06 12:11   ` Dan Carpenter
2022-06-01 13:25 ` [PATCH 0/3] btrfs: Replace kmap() with kmap_local_page() David Sterba
2022-06-02 16:22   ` Ira Weiny
2022-06-02 16:46     ` Matthew Wilcox
2022-06-02 18:01   ` Fabio M. De Francesco
2022-06-02 15:20 ` Christoph Hellwig
2022-06-02 15:55   ` Ira Weiny
2022-06-02 16:28   ` David Sterba
2022-06-05 15:11     ` Fabio M. De Francesco
2022-06-06 10:32       ` David Sterba
2022-06-06 14:32         ` Fabio M. De Francesco

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=3146770.aV6nBDHxoP@opensuse \
    --to=fmdefrancesco@gmail.com \
    --cc=chris.mason@fusionio.com \
    --cc=dsterba@suse.com \
    --cc=ira.weiny@intel.com \
    --cc=josef@toxicpanda.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    /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;
as well as URLs for NNTP newsgroup(s).