All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Daniel Vacek <neelx@suse.com>
Cc: kernel test robot <lkp@intel.com>,
	Josef Bacik <josef@toxicpanda.com>,
	oe-kbuild-all@lists.linux.dev, David Sterba <dsterba@suse.com>
Subject: Re: [kdave-btrfs-devel:ext/dv/fscrypt 32/43] fs/btrfs/fscrypt.c:240:34: sparse: sparse: incorrect type in return expression (different base types)
Date: Fri, 15 May 2026 17:04:36 +0200	[thread overview]
Message-ID: <20260515150436.GS2558453@suse.cz> (raw)
In-Reply-To: <CAPjX3FduCSJWY_Qx53ADfh1tpvsAjM7XCa=j1JjL3OYF8B4D7w@mail.gmail.com>

On Thu, May 14, 2026 at 05:53:48PM +0200, Daniel Vacek wrote:
> On Thu, 14 May 2026 at 03:51, kernel test robot <lkp@intel.com> wrote:
> >
> > tree:   https://github.com/kdave/btrfs-devel.git ext/dv/fscrypt
> > head:   4c05f02641d57f578a685f7e8d27b9cb18d17cc7
> > commit: fda37caa264ff597b0fc03039dc95e392432bbc5 [32/43] btrfs: implement process_bio cb for fscrypt
> > config: alpha-randconfig-r122-20260514 (https://download.01.org/0day-ci/archive/20260514/202605140957.DjseWRNF-lkp@intel.com/config)
> > compiler: alpha-linux-gcc (GCC) 8.5.0
> > sparse: v0.6.5-rc1
> > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260514/202605140957.DjseWRNF-lkp@intel.com/reproduce)
> >
> > If you fix the issue in a separate patch/commit (i.e. not just a new version of
> > the same patch/commit), kindly add following tags
> > | Reported-by: kernel test robot <lkp@intel.com>
> > | Closes: https://lore.kernel.org/oe-kbuild-all/202605140957.DjseWRNF-lkp@intel.com/
> >
> > sparse warnings: (new ones prefixed by >>)
> > >> fs/btrfs/fscrypt.c:240:34: sparse: sparse: incorrect type in return expression (different base types) @@     expected restricted blk_status_t @@     got int @@
> >    fs/btrfs/fscrypt.c:240:34: sparse:     expected restricted blk_status_t
> >    fs/btrfs/fscrypt.c:240:34: sparse:     got int
> 
> @@ -238,7 +238,7 @@ static blk_status_t
> btrfs_process_encrypted_bio(struct bio *orig_bio,
>          ASSERT(orig_bio == enc_bio);
>          return btrfs_check_encrypted_read_bio(bbio, enc_bio);
>      }
> -    return btrfs_csum_one_bio(bbio, enc_bio, false);
> +    return btrfs_csum_one_bio(bbio, enc_bio, false)? BLK_STS_IOERR: BLK_STS_OK;
>  }
> 
> This should do the trick.

Please use errno_to_blk_status() as btrfs_csum_one_bio() can also return
-ENOMEM, which is BLK_STS_RESOURCE.

  reply	other threads:[~2026-05-15 15:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-14  1:50 [kdave-btrfs-devel:ext/dv/fscrypt 32/43] fs/btrfs/fscrypt.c:240:34: sparse: sparse: incorrect type in return expression (different base types) kernel test robot
2026-05-14 15:53 ` Daniel Vacek
2026-05-15 15:04   ` David Sterba [this message]
2026-05-18  7:16     ` Daniel Vacek

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=20260515150436.GS2558453@suse.cz \
    --to=dsterba@suse.cz \
    --cc=dsterba@suse.com \
    --cc=josef@toxicpanda.com \
    --cc=lkp@intel.com \
    --cc=neelx@suse.com \
    --cc=oe-kbuild-all@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.