Skip to contentSkip to conversation

ASoC: Intel: avs: Use str_on_off() in avs_dsp_core_power()

PATCH In review Thorsten Blum 3 participants 3 messages Feb 12, 2025 – Feb 13, 2025

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

PATCH 1/1 ASoC: Intel: avs: Use str_on_off() in avs_dsp_core_power()

Remove hard-coded strings by using the str_on_off() helper function.

---
 sound/soc/intel/avs/dsp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
sound/soc/intel/avs/dsp.c +2 -1
index 7b47e52c2b39..b9de691e9b9b 100644
@@ -6,6 +6,7 @@
 //          Amadeusz Slawinski <[email protected]>
 //
 
+#include <linux/string_choices.h>
 #include <sound/hdaudio_ext.h>
 #include "avs.h"
 #include "registers.h"
@@ -39,7 +40,7 @@ int avs_dsp_core_power(struct avs_dev *adev, u32 core_mask, bool power)
 				       AVS_ADSPCS_TIMEOUT_US);
 	if (ret)
 		dev_err(adev->dev, "core_mask %d power %s failed: %d\n",
-			core_mask, power ? "on" : "off", ret);
+			core_mask, str_on_off(power), ret);
 
 	return ret;
 }
Signature · 1 line
2.48.1
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 20 lines · Thorsten Blum

Remove hard-coded strings by using the str_on_off() helper function.

---
  sound/soc/intel/avs/dsp.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
sound/soc/intel/avs/dsp.c +1 -0
index 7b47e52c2b39..b9de691e9b9b 100644
@@ -6,6 +6,7 @@
  //          Amadeusz Slawinski <[email protected]>
  //
 
+#include <linux/string_choices.h>
  #include <sound/hdaudio_ext.h>
  #include "avs.h"
  #include "registers.h"

sound/soc/intel/avs/dsp.c int avs_dsp_core_power(struct avs_dev *adev, u32 core_mask, bool power) · line 46

Quoted 8 lines
sound/soc/intel/avs/dsp.c +1 -1
@@ -39,7 +40,7 @@ int avs_dsp_core_power(struct avs_dev *adev, u32 core_mask, bool power)
  				       AVS_ADSPCS_TIMEOUT_US);
  	if (ret)
  		dev_err(adev->dev, "core_mask %d power %s failed: %d\n",
-			core_mask, power ? "on" : "off", ret);
+			core_mask, str_on_off(power), ret);
 
  	return ret;
  }

LGTM

maintainer
#2 lore raw
In reply to Thorsten Blum
Quoted 3 lines · Thorsten Blum

Remove hard-coded strings by using the str_on_off() helper function.

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: Intel: avs: Use str_on_off() in avs_dsp_core_power()

      commit: 994719ed6d81a6f4677875ab6730254c0bc484ea

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