Skip to contentSkip to conversation

ASoC: Intel: Skylake: Print constant literals from format specifier

PATCH In review Andy Shevchenko 4 participants 5 messages Jun 21, 2019 – Aug 15, 2019

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

PATCH 1/1 ASoC: Intel: Skylake: Print constant literals from format specifier

Instead of using two additional "%s" specifiers, put the constant string literals directly to the format specifier.

Cc Liam Girdwood <[email protected]>
Cc Mark Brown <[email protected]>
Cc Vinod Koul <[email protected]>
---
 sound/soc/intel/skylake/skl-sst.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
sound/soc/intel/skylake/skl-sst.c +1 -2
index 13c636dece56..f3e1399450db 100644
@@ -421,8 +421,7 @@ static int skl_load_module(struct sst_dsp *ctx, u16 mod_id, u8 *guid)
 	int ret = 0;
 	char mod_name[64]; /* guid str = 32 chars + 4 hyphens */
 
-	snprintf(mod_name, sizeof(mod_name), "%s%pUL%s",
-					     "intel/dsp_fw_", guid, ".bin");
+	snprintf(mod_name, sizeof(mod_name), "intel/dsp_fw_%pUL.bin", guid);
 
 	module_entry = skl_module_get_from_id(ctx, mod_id);
 	if (module_entry == NULL) {
Signature · 1 line
2.20.1
#1 lore raw
Quoted 3 lines · Andy Shevchenko

Instead of using two additional "%s" specifiers, put the constant string literals directly to the format specifier.

Pierre, does it look good to you?

Quoted 25 lines
Cc Liam Girdwood <[email protected]>
Cc Mark Brown <[email protected]>
Cc Vinod Koul <[email protected]>
---
 sound/soc/intel/skylake/skl-sst.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
sound/soc/intel/skylake/skl-sst.c +1 -2
index 13c636dece56..f3e1399450db 100644
@@ -421,8 +421,7 @@ static int skl_load_module(struct sst_dsp *ctx, u16 mod_id, u8 *guid)
 	int ret = 0;
 	char mod_name[64]; /* guid str = 32 chars + 4 hyphens */
 
-	snprintf(mod_name, sizeof(mod_name), "%s%pUL%s",
-					     "intel/dsp_fw_", guid, ".bin");
+	snprintf(mod_name, sizeof(mod_name), "intel/dsp_fw_%pUL.bin", guid);
 
 	module_entry = skl_module_get_from_id(ctx, mod_id);
 	if (module_entry == NULL) {
Signature · 1 line
2.20.1
Signature · 2 lines
With Best Regards,
Andy Shevchenko
#2 lore raw
Quoted 6 lines · Andy Shevchenko
Quoted 3 lines · Andy Shevchenko

Instead of using two additional "%s" specifiers, put the constant string literals directly to the format specifier.

Pierre, does it look good to you?

LGTM but Cezary should chime in for changes to the Skylake driver.

Quoted 27 lines
Quoted 26 lines
Cc Liam Girdwood <[email protected]>
Cc Mark Brown <[email protected]>
Cc Vinod Koul <[email protected]>
---
  sound/soc/intel/skylake/skl-sst.c | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)
sound/soc/intel/skylake/skl-sst.c +1 -2
index 13c636dece56..f3e1399450db 100644
@@ -421,8 +421,7 @@ static int skl_load_module(struct sst_dsp *ctx, u16 mod_id, u8 *guid)
  	int ret = 0;
  	char mod_name[64]; /* guid str = 32 chars + 4 hyphens */
 
-	snprintf(mod_name, sizeof(mod_name), "%s%pUL%s",
-					     "intel/dsp_fw_", guid, ".bin");
+	snprintf(mod_name, sizeof(mod_name), "intel/dsp_fw_%pUL.bin", guid);
 
  	module_entry = skl_module_get_from_id(ctx, mod_id);
  	if (module_entry == NULL) {
Signature · 1 line
2.20.1
maintainer
#3 lore raw
Quoted 9 lines · Pierre-Louis Bossart
Quoted 6 lines · Andy Shevchenko
Quoted 3 lines · Andy Shevchenko

Instead of using two additional "%s" specifiers, put the constant string literals directly to the format specifier.

Pierre, does it look good to you?

LGTM but Cezary should chime in for changes to the Skylake driver.

Seems this one escaped my eye. Looks good to me too.

Quoted 18 lines
Quoted 18 lines
Quoted 18 lines
Cc Liam Girdwood <[email protected]>
Cc Mark Brown <[email protected]>
Cc Vinod Koul <[email protected]>

---
  sound/soc/intel/skylake/skl-sst.c | 3 +--

  1 file changed, 1 insertion(+), 2 deletions(-)
sound/soc/intel/skylake/skl-sst.c +0 -0
index 13c636dece56..f3e1399450db 100644
@@ -421,8 +421,7 @@ static int skl_load_module(struct sst_dsp *ctx, 
 u16 mod_id, u8 *guid)
       int ret = 0;

      char mod_name[64]; /* guid str = 32 chars + 4 hyphens */ -    snprintf(mod_name, sizeof(mod_name), "%s%pUL%s", -                         "intel/dsp_fw_", guid, ".bin");

Quoted 9 lines
Quoted 8 lines
Quoted 7 lines

+    snprintf(mod_name, sizeof(mod_name), "intel/dsp_fw_%pUL.bin", guid);
      module_entry = skl_module_get_from_id(ctx, mod_id); if (module_entry == NULL) {

Signature · 1 line
2.20.1

_______________________________________________
Alsa-devel mailing list
[email protected]
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

maintainer
#4 lore raw

Applied "ASoC: Intel: Skylake: Print constant literals from format specifier" to the asoc tree

In reply to Andy Shevchenko

The patch

ASoC: Intel: Skylake: Print constant literals from format specifier

has been applied to the asoc tree at

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

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

Quoted 1 line

From ff30779bd50eb823e2e75cfc7cc8a3373bfa3fd9 Mon Sep 17 00:00:00 2001

From: Andy Shevchenko <[email protected]>
Date: Fri, 21 Jun 2019 14:31:16 +0300
Subject: [PATCH] ASoC: Intel: Skylake: Print constant literals from format
specifier

Instead of using two additional "%s" specifiers, put the constant string literals directly to the format specifier.

---
 sound/soc/intel/skylake/skl-sst.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
sound/soc/intel/skylake/skl-sst.c +1 -2
index 8af7546def1f..61a8e4756a2b 100644
@@ -413,8 +413,7 @@ static int skl_load_module(struct sst_dsp *ctx, u16 mod_id, u8 *guid)
 	int ret = 0;
 	char mod_name[64]; /* guid str = 32 chars + 4 hyphens */
 
-	snprintf(mod_name, sizeof(mod_name), "%s%pUL%s",
-					     "intel/dsp_fw_", guid, ".bin");
+	snprintf(mod_name, sizeof(mod_name), "intel/dsp_fw_%pUL.bin", guid);
 
 	module_entry = skl_module_get_from_id(ctx, mod_id);
 	if (module_entry == NULL) {
Signature · 1 line
2.20.1