Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ALSA: usb-audio: Use __le16 for 16bit USB descriptor fields

Use proper notion for 16bit values for fixing the sparse warnings.

Fixes: f8ddb0fb3289 ("ALSA: usb-audio: Define USB MIDI 2.0 specs")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202305260528.wcqjXso8-lkp@intel.com/
Closes: https://lore.kernel.org/oe-kbuild-all/202305270534.odwHL9F0-lkp@intel.com/
Link: https://lore.kernel.org/r/20230605144758.6677-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>

+3 -3
+3 -3
include/linux/usb/midi-v2.h
··· 73 73 __u8 bLength; /* 5 */ 74 74 __u8 bDescriptorType; /* USB_DT_CS_GR_TRM_BLOCK */ 75 75 __u8 bDescriptorSubtype; /* USB_MS_GR_TRM_BLOCK_HEADER */ 76 - __u16 wTotalLength; /* Total number of bytes */ 76 + __le16 wTotalLength; /* Total number of bytes */ 77 77 } __packed; 78 78 79 79 /* 5.4.2.1 Group Terminal Block Descriptor */ ··· 87 87 __u8 nNumGroupTrm; /* Number of member Group Terminals spanned */ 88 88 __u8 iBlockItem; /* String ID of Block item */ 89 89 __u8 bMIDIProtocol; /* Default MIDI protocol */ 90 - __u16 wMaxInputBandwidth; /* Max input bandwidth capability in 4kB/s */ 91 - __u16 wMaxOutputBandwidth; /* Max output bandwidth capability in 4kB/s */ 90 + __le16 wMaxInputBandwidth; /* Max input bandwidth capability in 4kB/s */ 91 + __le16 wMaxOutputBandwidth; /* Max output bandwidth capability in 4kB/s */ 92 92 } __packed; 93 93 94 94 #endif /* __LINUX_USB_MIDI_V2_H */