* [PATCH] ALSA: sb: Use str_enabled_disabled() helper in info_read()
@ 2025-01-09 23:05 Thorsten Blum
2025-01-10 8:12 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Thorsten Blum @ 2025-01-09 23:05 UTC (permalink / raw)
To: Jaroslav Kysela, Takashi Iwai
Cc: Thorsten Blum, Christophe JAILLET, Takashi Iwai, linux-sound,
linux-kernel
Remove hard-coded strings by using the str_enabled_disabled() helper
function.
Suggested-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
sound/isa/sb/sb16_csp.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/sound/isa/sb/sb16_csp.c b/sound/isa/sb/sb16_csp.c
index 071ba85f76bb..7034072c80d4 100644
--- a/sound/isa/sb/sb16_csp.c
+++ b/sound/isa/sb/sb16_csp.c
@@ -13,6 +13,7 @@
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/module.h>
+#include <linux/string_choices.h>
#include <sound/core.h>
#include <sound/control.h>
#include <sound/info.h>
@@ -1157,8 +1158,8 @@ static void info_read(struct snd_info_entry *entry, struct snd_info_buffer *buff
((p->acc_rates & SNDRV_SB_CSP_RATE_44100) ? "44100Hz" : ""));
}
if (p->mode == SNDRV_SB_CSP_MODE_QSOUND) {
- snd_iprintf(buffer, "QSound decoder %sabled\n",
- p->q_enabled ? "en" : "dis");
+ snd_iprintf(buffer, "QSound decoder %s\n",
+ str_enabled_disabled(p->q_enabled));
} else {
snd_iprintf(buffer, "PCM format ID: 0x%x (%s/%s) [%s/%s] [%s/%s]\n",
p->acc_format,
--
2.47.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ALSA: sb: Use str_enabled_disabled() helper in info_read()
2025-01-09 23:05 [PATCH] ALSA: sb: Use str_enabled_disabled() helper in info_read() Thorsten Blum
@ 2025-01-10 8:12 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2025-01-10 8:12 UTC (permalink / raw)
To: Thorsten Blum
Cc: Jaroslav Kysela, Takashi Iwai, Christophe JAILLET, Takashi Iwai,
linux-sound, linux-kernel
On Fri, 10 Jan 2025 00:05:19 +0100,
Thorsten Blum wrote:
>
> Remove hard-coded strings by using the str_enabled_disabled() helper
> function.
>
> Suggested-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Applied now. Thanks.
Takashi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-01-10 8:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-09 23:05 [PATCH] ALSA: sb: Use str_enabled_disabled() helper in info_read() Thorsten Blum
2025-01-10 8:12 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox