Skip to content

Fix Clang 22 warnings part 2#7309

Open
KonstaT wants to merge 1 commit intoraspberrypi:rpi-6.18.yfrom
KonstaT:rpi-6.18.y-clang2
Open

Fix Clang 22 warnings part 2#7309
KonstaT wants to merge 1 commit intoraspberrypi:rpi-6.18.yfrom
KonstaT:rpi-6.18.y-clang2

Conversation

@KonstaT
Copy link
Copy Markdown

@KonstaT KonstaT commented Apr 9, 2026

Split one patch from #7299.

* Fixes build with Clang.

In file included from drivers/pwm/pwm-pio-rp1.c:20:
include/linux/pio_rp1.h:283:42: error: implicit conversion from 'uint' (aka 'unsigned int') to 'uint16_t' (aka 'unsigned short') changes value from 4294967295 to 65535 [-Werror,-Wconstant-conversion]
  283 |         args.origin = (program->origin == -1) ? PIO_ORIGIN_ANY : program->origin;
      |                     ~                           ^~~~~~~~~~~~~~
include/linux/pio_rp1.h:44:27: note: expanded from macro 'PIO_ORIGIN_ANY'
   44 | #define PIO_ORIGIN_ANY                  ((uint)(~0))
      |                                          ^~~~~~~~~~
include/linux/pio_rp1.h:312:42: error: implicit conversion from 'uint' (aka 'unsigned int') to 'uint16_t' (aka 'unsigned short') changes value from 4294967295 to 65535 [-Werror,-Wconstant-conversion]
  312 |         args.origin = (program->origin == -1) ? PIO_ORIGIN_ANY : program->origin;
      |                     ~                           ^~~~~~~~~~~~~~
include/linux/pio_rp1.h:44:27: note: expanded from macro 'PIO_ORIGIN_ANY'
   44 | #define PIO_ORIGIN_ANY                  ((uint)(~0))
      |                                          ^~~~~~~~~~
2 errors generated.
@KonstaT KonstaT mentioned this pull request Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant