From: Takashi Iwai <tiwai@suse.de>
To: linux-sound@vger.kernel.org
Subject: [PATCH 6/7] ALSA: seq: oss: Simplify with str_enabled_disabled()
Date: Tue, 7 Jan 2025 16:56:36 +0100 [thread overview]
Message-ID: <20250107155641.4435-7-tiwai@suse.de> (raw)
In-Reply-To: <20250107155641.4435-1-tiwai@suse.de>
Use the standard helper str_enabled_disabled() to simplify the code.
Only code refactoring, no behavior change.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
sound/core/seq/oss/seq_oss_device.h | 4 ----
sound/core/seq/oss/seq_oss_init.c | 6 ------
sound/core/seq/oss/seq_oss_synth.c | 4 ++--
3 files changed, 2 insertions(+), 12 deletions(-)
diff --git a/sound/core/seq/oss/seq_oss_device.h b/sound/core/seq/oss/seq_oss_device.h
index c0b1cce127a3..6163a00bc8de 100644
--- a/sound/core/seq/oss/seq_oss_device.h
+++ b/sound/core/seq/oss/seq_oss_device.h
@@ -156,8 +156,4 @@ snd_seq_oss_fill_addr(struct seq_oss_devinfo *dp, struct snd_seq_event *ev,
ev->dest.port = dest_port;
}
-
-/* misc. functions for proc interface */
-char *enabled_str(bool b);
-
#endif /* __SEQ_OSS_DEVICE_H */
diff --git a/sound/core/seq/oss/seq_oss_init.c b/sound/core/seq/oss/seq_oss_init.c
index e0733efba027..e6d7d83ed0e7 100644
--- a/sound/core/seq/oss/seq_oss_init.c
+++ b/sound/core/seq/oss/seq_oss_init.c
@@ -449,12 +449,6 @@ snd_seq_oss_reset(struct seq_oss_devinfo *dp)
/*
* misc. functions for proc interface
*/
-char *
-enabled_str(bool b)
-{
- return b ? "enabled" : "disabled";
-}
-
static const char *
filemode_str(int val)
{
diff --git a/sound/core/seq/oss/seq_oss_synth.c b/sound/core/seq/oss/seq_oss_synth.c
index 02a90c960992..9de47e098b29 100644
--- a/sound/core/seq/oss/seq_oss_synth.c
+++ b/sound/core/seq/oss/seq_oss_synth.c
@@ -608,8 +608,8 @@ snd_seq_oss_synth_info_read(struct snd_info_buffer *buf)
rec->synth_type, rec->synth_subtype,
rec->nr_voices);
snd_iprintf(buf, " capabilities : ioctl %s / load_patch %s\n",
- enabled_str((long)rec->oper.ioctl),
- enabled_str((long)rec->oper.load_patch));
+ str_enabled_disabled((long)rec->oper.ioctl),
+ str_enabled_disabled((long)rec->oper.load_patch));
snd_use_lock_free(&rec->use_lock);
}
}
--
2.43.0
next prev parent reply other threads:[~2025-01-07 15:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-07 15:56 [PATCH 0/7] ALSA: Simplify with standard helpers Takashi Iwai
2025-01-07 15:56 ` [PATCH 1/7] ALSA: trident: Simplify with str_on_off() Takashi Iwai
2025-01-07 15:56 ` [PATCH 2/7] ALSA: sonicvibes: Simplify with str_off_on() Takashi Iwai
2025-01-07 15:56 ` [PATCH 3/7] ALSA: hdspm: Simplify with str_on_off() Takashi Iwai
2025-01-07 15:56 ` [PATCH 4/7] ALSA: emu10k1: " Takashi Iwai
2025-01-07 15:56 ` [PATCH 5/7] ALSA: firewire: " Takashi Iwai
2025-01-07 23:59 ` Takashi Sakamoto
2025-01-07 15:56 ` Takashi Iwai [this message]
2025-01-07 15:56 ` [PATCH 7/7] ALSA: hda: Simplify with str_enable_disable() Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250107155641.4435-7-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=linux-sound@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox