Skip to contentSkip to conversation

ALSA: usb-audio: make read-only array marker static const

PATCH Applied Colin Ian King 2 participants 2 messages Aug 9, 2022 – Aug 10, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: usb-audio: make read-only array marker static const

Don't populate the read-only array marker on the stack but instead make it static const. Also makes the object code a little smaller.

---
 sound/usb/pcm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/usb/pcm.c +1 -1
index e692ae04436a..d45d1d7e6664 100644
@@ -1269,7 +1269,7 @@ static inline void fill_playback_urb_dsd_dop(struct snd_usb_substream *subs,
 	unsigned int wrap = subs->buffer_bytes;
 	u8 *dst = urb->transfer_buffer;
 	u8 *src = runtime->dma_area;
-	u8 marker[] = { 0x05, 0xfa };
+	static const u8 marker[] = { 0x05, 0xfa };
 	unsigned int queued = 0;
 
 	/*
Signature · 1 line
2.35.3
Applied
#1 lore raw
Quoted 5 lines · Colin Ian King

Don't populate the read-only array marker on the stack but instead make it static const. Also makes the object code a little smaller.

Thanks, applied.

Takashi