]> git.ipfire.org Git - thirdparty/linux.git/commit
ALSA: usb-audio: us144mkii: Use le16_to_cpu() for product ID comparison
authorŠerif Rami <ramiserifpersia@gmail.com>
Tue, 19 Aug 2025 07:51:17 +0000 (09:51 +0200)
committerTakashi Iwai <tiwai@suse.de>
Tue, 19 Aug 2025 09:29:03 +0000 (11:29 +0200)
commitd9f0633867711cff87c5604a4f90daa8ab986e4f
treec8aabb8f392eed27deb95c58c00decca103b3204
parent0ec417aa85467c6fad0563621b74868be0faf00d
ALSA: usb-audio: us144mkii: Use le16_to_cpu() for product ID comparison

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`

Fixes: dee1bcf28a3d ("ALSA: usb-audio: Add initial driver for TASCAM US-144MKII")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202508190811.tjQJZI1X-lkp@intel.com/
Signed-off-by: Šerif Rami <ramiserifpersia@gmail.com>
Link: https://patch.msgid.link/20250819075118.9221-1-ramiserifpersia@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/usx2y/us144mkii.c