Skip to contentSkip to conversation

pwm: rcar: include linux/bitfield.h

PATCH In review Arnd Bergmann 2 participants 2 messages Apr 3, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pwm: rcar: include linux/bitfield.h

From: Arnd Bergmann <[email protected]>

The use of FIELD_MAX() breaks in some configurations because of a missing header:

drivers/pwm/pwm-rcar.c:114:12: error: call to undeclared function 'FIELD_MAX'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
114 | if (tmp > FIELD_MAX(RCAR_PWMCNT_CYC0_MASK))
| ^

Fixes edd549f4956b ("pwm: rcar: Improve register calculation")
---
 drivers/pwm/pwm-rcar.c | 1 +
 1 file changed, 1 insertion(+)
drivers/pwm/pwm-rcar.c +1 -0
index 19e5d0b849a6..578dbdd2d5a7 100644
@@ -8,6 +8,7 @@
  * - The hardware cannot generate a 0% duty cycle.
  */
 
+#include <linux/bitfield.h>
 #include <linux/clk.h>
 #include <linux/err.h>
 #include <linux/io.h>
Signature · 1 line
2.39.5
#1 lore raw

Hello Arnd,

Quoted 11 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The use of FIELD_MAX() breaks in some configurations because of a missing header:

drivers/pwm/pwm-rcar.c:114:12: error: call to undeclared function 'FIELD_MAX'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
114 | if (tmp > FIELD_MAX(RCAR_PWMCNT_CYC0_MASK))
| ^

Fixes edd549f4956b ("pwm: rcar: Improve register calculation")

I already fixed that in my pwm/for-next branch. I did exactly what you did and squashed that in the offending commit.

Thanks for caring
Uwe