mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: [linux-next:master 4259/5321] fs/btrfs/bio.c:132:17: sparse: sparse: cast from restricted blk_status_t
       [not found] <202410180159.O8S1AyaN-lkp@intel.com>
@ 2024-10-21 19:02 ` David Sterba
  0 siblings, 0 replies; only message in thread
From: David Sterba @ 2024-10-21 19:02 UTC (permalink / raw)
  To: kernel test robot
  Cc: Naohiro Aota, oe-kbuild-all, David Sterba, Qu Wenruo,
	Christoph Hellwig, Johannes Thumshirn, linux-kernel

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.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-10-21 19:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <202410180159.O8S1AyaN-lkp@intel.com>
2024-10-21 19:02 ` [linux-next:master 4259/5321] fs/btrfs/bio.c:132:17: sparse: sparse: cast from restricted blk_status_t David Sterba

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®