Re: [PATCH 11/21] bcachefs: improve the eytzinger0_find_le tests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 30, 2025 at 12:36â?¯AM Kent Overstreet <kent.overstreet@xxxxxxxxx> wrote:
> I've fetched it to my repo and added it to the CI:
>
> https://evilpiepirate.org/~testdashboard/ci?user=kmo&branch=eytzinger

Ah, the following went wrong in "bcachefs: convert eytzinger0_find to be 1-based":

diff --git a/fs/bcachefs/eytzinger.h b/fs/bcachefs/eytzinger.h
index d3e8b9edf335..3afb346b0738 100644
--- a/fs/bcachefs/eytzinger.h
+++ b/fs/bcachefs/eytzinger.h
@@ -308,7 +308,7 @@ static inline int eytzinger0_find_ge(void *base, size_t nr, size_t size,
 #define eytzinger0_find(base, nr, size, _cmp, search)			\
 ({									\
 	size_t _size		= (size);				\
-	void *_base1		= (base) - _size;			\
+	void *_base1		= (void *)(base) - _size;		\
 	const void *_search	= (search);				\
 	size_t _nr		= (nr);					\
 	size_t _i		= 1;					\

The eytzinger0_find() macro is still a bit of a mess.

I've updated https://git.kernel.org/pub/scm/linux/kernel/git/agruen/linux.git/log/?h=bcachefs.

Thanks,
Andreas





[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux