Skip to content

Commit 4f4e711

Browse files
committed
ALSA: usb-audio: Use __le16 for 16bit USB descriptor fields
Use proper notion for 16bit values for fixing the sparse warnings. Fixes: f8ddb0f ("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>
1 parent 77700b8 commit 4f4e711

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

include/linux/usb/midi-v2.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ struct usb_ms20_gr_trm_block_header_descriptor {
7373
__u8 bLength; /* 5 */
7474
__u8 bDescriptorType; /* USB_DT_CS_GR_TRM_BLOCK */
7575
__u8 bDescriptorSubtype; /* USB_MS_GR_TRM_BLOCK_HEADER */
76-
__u16 wTotalLength; /* Total number of bytes */
76+
__le16 wTotalLength; /* Total number of bytes */
7777
} __packed;
7878

7979
/* 5.4.2.1 Group Terminal Block Descriptor */
@@ -87,8 +87,8 @@ struct usb_ms20_gr_trm_block_descriptor {
8787
__u8 nNumGroupTrm; /* Number of member Group Terminals spanned */
8888
__u8 iBlockItem; /* String ID of Block item */
8989
__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 */
9292
} __packed;
9393

9494
#endif /* __LINUX_USB_MIDI_V2_H */

0 commit comments

Comments
 (0)