platform: cznic: use ffs() instead of __bf_shf()

__bf_shf() on a 64-bit variable causes a link failure during
compile-testing:

drivers-platform-cznic-turris-omnia-mcu-gpio.c:(.text):undefined-reference-to-__ffsdi2

Open-code this using ffs()-1, which has the same result but avoids
the library call.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
Arnd Bergmann 2025-03-24 17:11:11 +01:00
parent 6429892873
commit b24e88b42d

View File

@ -1104,7 +1104,7 @@ int omnia_mcu_request_irq(struct omnia_mcu *mcu, u32 spec,
if (!spec)
return -EINVAL;
irq_idx = omnia_int_to_gpio_idx[__bf_shf(spec)];
irq_idx = omnia_int_to_gpio_idx[ffs(spec) - 1];
irq = gpiod_to_irq(gpio_device_get_desc(mcu->gc.gpiodev, irq_idx));
if (irq < 0)
return irq;