mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: kernel test robot <lkp@intel.com>
Cc: Naohiro Aota <naohiro.aota@wdc.com>,
	oe-kbuild-all@lists.linux.dev, David Sterba <dsterba@suse.com>,
	Qu Wenruo <wqu@suse.com>, Christoph Hellwig <hch@lst.de>,
	Johannes Thumshirn <johannes.thumshirn@wdc.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [linux-next:master 4259/5321] fs/btrfs/bio.c:132:17: sparse: sparse: cast from restricted blk_status_t
Date: Mon, 21 Oct 2024 21:02:20 +0200	[thread overview]
Message-ID: <20241021190220.GD24631@suse.cz> (raw)
In-Reply-To: <202410180159.O8S1AyaN-lkp@intel.com>

On Fri, Oct 18, 2024 at 01:17:15AM +0800, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head:   7df1e7189cecb6965ce672e820a5ec6cf499b65b
> commit: c87222d18145c93b0ebd860ae9166afb1457129c [4259/5321] btrfs: fix error propagation of split bios
> config: microblaze-randconfig-r133-20241017 (https://download.01.org/0day-ci/archive/20241018/202410180159.O8S1AyaN-lkp@intel.com/config)
> compiler: microblaze-linux-gcc (GCC) 14.1.0

microblaze

> reproduce: (https://download.01.org/0day-ci/archive/20241018/202410180159.O8S1AyaN-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/202410180159.O8S1AyaN-lkp@intel.com/
> 
> sparse warnings: (new ones prefixed by >>)
> >> fs/btrfs/bio.c:132:17: sparse: sparse: cast from restricted blk_status_t
> >> fs/btrfs/bio.c:132:17: sparse: sparse: cast to restricted blk_status_t
>    fs/btrfs/bio.c: note: in included file (through include/linux/smp.h, include/linux/lockdep.h, include/linux/spinlock.h, ...):
>    include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
> 
> vim +132 fs/btrfs/bio.c
> 
>    116	
>    117	void btrfs_bio_end_io(struct btrfs_bio *bbio, blk_status_t status)
>    118	{
>    119		bbio->bio.bi_status = status;
>    120		if (bbio->bio.bi_pool == &btrfs_clone_bioset) {
>    121			struct btrfs_bio *orig_bbio = bbio->private;
>    122	
>    123			btrfs_cleanup_bio(bbio);
>    124			bbio = orig_bbio;
>    125		}
>    126	
>    127		/*
>    128		 * At this point, bbio always points to the original btrfs_bio. Save
>    129		 * the first error in it.
>    130		 */
>    131		if (status != BLK_STS_OK)
>  > 132			cmpxchg(&bbio->status, BLK_STS_OK, status);

I don't see an arch-specific implementation of cmpxchg in
arch/microblaze/ so I'm assuming it's using some fallback that's in C so
sparse detects the type mismatches. The attribute is __bitwise but it
should not matter here.

           reply	other threads:[~2024-10-21 19:02 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <202410180159.O8S1AyaN-lkp@intel.com>]

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=20241021190220.GD24631@suse.cz \
    --to=dsterba@suse.cz \
    --cc=dsterba@suse.com \
    --cc=hch@lst.de \
    --cc=johannes.thumshirn@wdc.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=naohiro.aota@wdc.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=wqu@suse.com \
    /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

all inboxes | Powered by JetHome®