Re: [PATCH] ALSA: usb-audio: us144mkii: Use le16_to_cpu() for product ID comparison

From: Takashi Iwai
Date: Tue Aug 19 2025 - 05:34:23 EST


On Tue, 19 Aug 2025 09:51:17 +0200,
Šerif Rami wrote:
>
> The `us144mkii.c` driver was generating sparse warnings due to direct
> comparisons of `dev->descriptor.idProduct` (a `__le16` type) with
> integer constants. This commit resolves these warnings by explicitly
> converting `idProduct` to a CPU-endian integer using `le16_to_cpu()`
> before comparison.
>
> This ensures correct handling of endianness and eliminates the sparse
> warnings:
> - `restricted __le16 degrades to integer`
>
> Reported-by: kernel test robot <lkp@xxxxxxxxx>
> Closes: https://lore.kernel.org/oe-kbuild-all/202508190811.tjQJZI1X-lkp@xxxxxxxxx/
> Signed-off-by: Šerif Rami <ramiserifpersia@xxxxxxxxx>

Thanks, I applied now with Fixes tag.


Takashi