mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ALSA: usb-audio: make read-only array marker static const
@ 2022-08-09 18:15 Colin Ian King
  2022-08-10  9:54 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2022-08-09 18:15 UTC (permalink / raw)
  To: Jaroslav Kysela, alsa-devel; +Cc: kernel-janitors, linux-kernel

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.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 sound/usb/pcm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c
index e692ae04436a..d45d1d7e6664 100644
--- a/sound/usb/pcm.c
+++ b/sound/usb/pcm.c
@@ -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;
 
 	/*
-- 
2.35.3


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] ALSA: usb-audio: make read-only array marker static const
  2022-08-09 18:15 [PATCH] ALSA: usb-audio: make read-only array marker static const Colin Ian King
@ 2022-08-10  9:54 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2022-08-10  9:54 UTC (permalink / raw)
  To: Colin Ian King; +Cc: Jaroslav Kysela, alsa-devel, kernel-janitors, linux-kernel

On Tue, 09 Aug 2022 20:15:44 +0200,
Colin Ian King wrote:
> 
> 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.
> 
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>

Thanks, applied.


Takashi

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-08-10  9:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-09 18:15 [PATCH] ALSA: usb-audio: make read-only array marker static const Colin Ian King
2022-08-10  9:54 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®