Skip to content

Commit 6d56740

Browse files
committed
m68k: bitops: Fix find_*_bit() signatures
The function signatures of the m68k-optimized implementations of the find_{first,next}_{,zero_}bit() helpers do not match the generic variants. Fix this by changing all non-pointer inputs and outputs to "unsigned long", and updating a few local variables. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202509092305.ncd9mzaZ-lkp@intel.com/ Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: "Yury Norov (NVIDIA)" <yury.norov@gmail.com> Link: https://patch.msgid.link/de6919554fbb4cd1427155c6bafbac8a9df822c8.1757517135.git.geert@linux-m68k.org
1 parent ac1440d commit 6d56740

1 file changed

Lines changed: 14 additions & 11 deletions

File tree

arch/m68k/include/asm/bitops.h

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -350,12 +350,12 @@ static inline bool xor_unlock_is_negative_byte(unsigned long mask,
350350
#include <asm-generic/bitops/ffz.h>
351351
#else
352352

353-
static inline int find_first_zero_bit(const unsigned long *vaddr,
354-
unsigned size)
353+
static inline unsigned long find_first_zero_bit(const unsigned long *vaddr,
354+
unsigned long size)
355355
{
356356
const unsigned long *p = vaddr;
357-
int res = 32;
358-
unsigned int words;
357+
unsigned long res = 32;
358+
unsigned long words;
359359
unsigned long num;
360360

361361
if (!size)
@@ -376,8 +376,9 @@ static inline int find_first_zero_bit(const unsigned long *vaddr,
376376
}
377377
#define find_first_zero_bit find_first_zero_bit
378378

379-
static inline int find_next_zero_bit(const unsigned long *vaddr, int size,
380-
int offset)
379+
static inline unsigned long find_next_zero_bit(const unsigned long *vaddr,
380+
unsigned long size,
381+
unsigned long offset)
381382
{
382383
const unsigned long *p = vaddr + (offset >> 5);
383384
int bit = offset & 31UL, res;
@@ -406,11 +407,12 @@ static inline int find_next_zero_bit(const unsigned long *vaddr, int size,
406407
}
407408
#define find_next_zero_bit find_next_zero_bit
408409

409-
static inline int find_first_bit(const unsigned long *vaddr, unsigned size)
410+
static inline unsigned long find_first_bit(const unsigned long *vaddr,
411+
unsigned long size)
410412
{
411413
const unsigned long *p = vaddr;
412-
int res = 32;
413-
unsigned int words;
414+
unsigned long res = 32;
415+
unsigned long words;
414416
unsigned long num;
415417

416418
if (!size)
@@ -431,8 +433,9 @@ static inline int find_first_bit(const unsigned long *vaddr, unsigned size)
431433
}
432434
#define find_first_bit find_first_bit
433435

434-
static inline int find_next_bit(const unsigned long *vaddr, int size,
435-
int offset)
436+
static inline unsigned long find_next_bit(const unsigned long *vaddr,
437+
unsigned long size,
438+
unsigned long offset)
436439
{
437440
const unsigned long *p = vaddr + (offset >> 5);
438441
int bit = offset & 31UL, res;

0 commit comments

Comments
 (0)