* [PATCH v2] ASoC: madera: Use str_enabled_disabled() helper function
@ 2025-01-07 1:13 Thorsten Blum
2025-01-07 10:00 ` Charles Keepax
2025-01-07 14:27 ` Mark Brown
0 siblings, 2 replies; 3+ messages in thread
From: Thorsten Blum @ 2025-01-07 1:13 UTC (permalink / raw)
To: Charles Keepax, Richard Fitzgerald, Liam Girdwood, Mark Brown,
Jaroslav Kysela, Takashi Iwai
Cc: Thorsten Blum, linux-sound, patches, linux-kernel
Remove hard-coded strings by using the str_enabled_disabled() helper
function.
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
Changes in v2:
- Include string_choices header as suggested by Charles Keepax
- Link to v1: https://lore.kernel.org/r/20241229174043.781856-2-thorsten.blum@linux.dev/
---
sound/soc/codecs/madera.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/sound/soc/codecs/madera.c b/sound/soc/codecs/madera.c
index b24d6472ad5f..a840a2eb92b9 100644
--- a/sound/soc/codecs/madera.c
+++ b/sound/soc/codecs/madera.c
@@ -11,6 +11,7 @@
#include <linux/module.h>
#include <linux/pm_runtime.h>
#include <linux/slab.h>
+#include <linux/string_choices.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/tlv.h>
@@ -3965,7 +3966,7 @@ static int madera_enable_fll(struct madera_fll *fll)
}
madera_fll_dbg(fll, "Enabling FLL, initially %s\n",
- already_enabled ? "enabled" : "disabled");
+ str_enabled_disabled(already_enabled));
if (fll->fout < MADERA_FLL_MIN_FOUT ||
fll->fout > MADERA_FLL_MAX_FOUT) {
@@ -4252,7 +4253,7 @@ static int madera_enable_fll_ao(struct madera_fll *fll,
pm_runtime_get_sync(madera->dev);
madera_fll_dbg(fll, "Enabling FLL_AO, initially %s\n",
- already_enabled ? "enabled" : "disabled");
+ str_enabled_disabled(already_enabled));
/* FLL_AO_HOLD must be set before configuring any registers */
regmap_update_bits(fll->madera->regmap,
@@ -4576,7 +4577,7 @@ static int madera_fllhj_enable(struct madera_fll *fll)
pm_runtime_get_sync(madera->dev);
madera_fll_dbg(fll, "Enabling FLL, initially %s\n",
- already_enabled ? "enabled" : "disabled");
+ str_enabled_disabled(already_enabled));
/* FLLn_HOLD must be set before configuring any registers */
regmap_update_bits(fll->madera->regmap,
--
2.47.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] ASoC: madera: Use str_enabled_disabled() helper function
2025-01-07 1:13 [PATCH v2] ASoC: madera: Use str_enabled_disabled() helper function Thorsten Blum
@ 2025-01-07 10:00 ` Charles Keepax
2025-01-07 14:27 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Charles Keepax @ 2025-01-07 10:00 UTC (permalink / raw)
To: Thorsten Blum
Cc: Richard Fitzgerald, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai, linux-sound, patches, linux-kernel
On Tue, Jan 07, 2025 at 02:13:54AM +0100, Thorsten Blum wrote:
> Remove hard-coded strings by using the str_enabled_disabled() helper
> function.
>
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
> ---
> Changes in v2:
> - Include string_choices header as suggested by Charles Keepax
> - Link to v1: https://lore.kernel.org/r/20241229174043.781856-2-thorsten.blum@linux.dev/
> ---
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Thanks,
Charles
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] ASoC: madera: Use str_enabled_disabled() helper function
2025-01-07 1:13 [PATCH v2] ASoC: madera: Use str_enabled_disabled() helper function Thorsten Blum
2025-01-07 10:00 ` Charles Keepax
@ 2025-01-07 14:27 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2025-01-07 14:27 UTC (permalink / raw)
To: Charles Keepax, Richard Fitzgerald, Liam Girdwood,
Jaroslav Kysela, Takashi Iwai, Thorsten Blum
Cc: linux-sound, patches, linux-kernel
On Tue, 07 Jan 2025 02:13:54 +0100, Thorsten Blum wrote:
> Remove hard-coded strings by using the str_enabled_disabled() helper
> function.
>
>
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: madera: Use str_enabled_disabled() helper function
commit: a83678be5ea152dca98791956f7bf2a0e899e3ad
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-01-07 14:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-07 1:13 [PATCH v2] ASoC: madera: Use str_enabled_disabled() helper function Thorsten Blum
2025-01-07 10:00 ` Charles Keepax
2025-01-07 14:27 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox