bcachefs: eytzinger0_find() search should be const
authorKent Overstreet <kent.overstreet@linux.dev>
Sat, 6 Jan 2024 01:02:33 +0000 (20:02 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sat, 6 Jan 2024 04:24:46 +0000 (23:24 -0500)
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/eytzinger.h

index 05429c9631cdad6eced17ff7638cd61651e12bf5..9637f636e32d508571a5908c536b48b8e3ed792c 100644 (file)
@@ -261,11 +261,11 @@ static inline ssize_t eytzinger0_find_le(void *base, size_t nr, size_t size,
 
 #define eytzinger0_find(base, nr, size, _cmp, search)                  \
 ({                                                                     \
-       void *_base     = (base);                                       \
-       void *_search   = (search);                                     \
-       size_t _nr      = (nr);                                         \
-       size_t _size    = (size);                                       \
-       size_t _i       = 0;                                            \
+       void *_base             = (base);                               \
+       const void *_search     = (search);                             \
+       size_t _nr              = (nr);                                 \
+       size_t _size            = (size);                               \
+       size_t _i               = 0;                                    \
        int _res;                                                       \
                                                                        \
        while (_i < _nr &&                                              \