All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ASoC: sti-sas: Fix checking return value for ERR_PTR
@ 2015-07-13  5:25 Axel Lin
  2015-07-13  5:26 ` [PATCH 2/2] ASoC: sti-sas: Staticise local symbols Axel Lin
  2015-07-13 11:16 ` Applied "ASoC: sti-sas: Fix checking return value for ERR_PTR" " Mark Brown
  0 siblings, 2 replies; 4+ messages in thread
From: Axel Lin @ 2015-07-13  5:25 UTC (permalink / raw)
  To: Mark Brown; +Cc: alsa-devel, Arnaud Pouliquen, Liam Girdwood

Both devm_regmap_init and syscon_regmap_lookup_by_phandle return ERR_PTR
on failure.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 sound/soc/codecs/sti-sas.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sound/soc/codecs/sti-sas.c b/sound/soc/codecs/sti-sas.c
index 32db2c2..4168b88 100644
--- a/sound/soc/codecs/sti-sas.c
+++ b/sound/soc/codecs/sti-sas.c
@@ -568,17 +568,17 @@ static int sti_sas_driver_probe(struct platform_device *pdev)
 	/* Request the DAC & SPDIF registers memory region */
 	drvdata->dac.virt_regmap = devm_regmap_init(&pdev->dev, NULL, drvdata,
 						    drvdata->dev_data->regmap);
-	if (!drvdata->dac.virt_regmap) {
+	if (IS_ERR(drvdata->dac.virt_regmap)) {
 		dev_err(&pdev->dev, "audio registers not enabled\n");
-		return -EFAULT;
+		return PTR_ERR(drvdata->dac.virt_regmap);
 	}
 
 	/* Request the syscon region */
 	drvdata->dac.regmap =
 		syscon_regmap_lookup_by_phandle(pnode, "st,syscfg");
-	if (!drvdata->dac.regmap) {
+	if (IS_ERR(drvdata->dac.regmap)) {
 		dev_err(&pdev->dev, "syscon registers not available\n");
-		return -EFAULT;
+		return PTR_ERR(drvdata->dac.regmap);
 	}
 	drvdata->spdif.regmap = drvdata->dac.regmap;
 
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] ASoC: sti-sas: Staticise local symbols
  2015-07-13  5:25 [PATCH 1/2] ASoC: sti-sas: Fix checking return value for ERR_PTR Axel Lin
@ 2015-07-13  5:26 ` Axel Lin
  2015-07-13 11:16   ` Applied "ASoC: sti-sas: Staticise local symbols" to the asoc tree Mark Brown
  2015-07-13 11:16 ` Applied "ASoC: sti-sas: Fix checking return value for ERR_PTR" " Mark Brown
  1 sibling, 1 reply; 4+ messages in thread
From: Axel Lin @ 2015-07-13  5:26 UTC (permalink / raw)
  To: Mark Brown; +Cc: alsa-devel, Arnaud Pouliquen, Liam Girdwood

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 sound/soc/codecs/sti-sas.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/sound/soc/codecs/sti-sas.c b/sound/soc/codecs/sti-sas.c
index 4168b88..6c0bbe8 100644
--- a/sound/soc/codecs/sti-sas.c
+++ b/sound/soc/codecs/sti-sas.c
@@ -238,7 +238,7 @@ static int stih416_dac_probe(struct snd_soc_dai *dai)
 	return 0;
 }
 
-const struct snd_soc_dapm_widget stih416_sas_dapm_widgets[] = {
+static const struct snd_soc_dapm_widget stih416_sas_dapm_widgets[] = {
 	SND_SOC_DAPM_PGA("DAC bandgap", STIH416_AUDIO_DAC_CTRL,
 			 STIH416_DAC_NOT_PNDBG_MASK, 0, NULL, 0),
 	SND_SOC_DAPM_OUT_DRV("DAC standby ana", STIH416_AUDIO_DAC_CTRL,
@@ -248,7 +248,7 @@ const struct snd_soc_dapm_widget stih416_sas_dapm_widgets[] = {
 	SND_SOC_DAPM_OUTPUT("DAC Output"),
 };
 
-const struct snd_soc_dapm_widget stih407_sas_dapm_widgets[] = {
+static const struct snd_soc_dapm_widget stih407_sas_dapm_widgets[] = {
 	SND_SOC_DAPM_OUT_DRV("DAC standby ana", STIH407_AUDIO_DAC_CTRL,
 			     STIH407_DAC_STANDBY_ANA, 1, NULL, 0),
 	SND_SOC_DAPM_DAC("DAC standby",  "dac_p", STIH407_AUDIO_DAC_CTRL,
@@ -256,13 +256,13 @@ const struct snd_soc_dapm_widget stih407_sas_dapm_widgets[] = {
 	SND_SOC_DAPM_OUTPUT("DAC Output"),
 };
 
-const struct snd_soc_dapm_route stih416_sas_route[] = {
+static const struct snd_soc_dapm_route stih416_sas_route[] = {
 	{"DAC Output", NULL, "DAC bandgap"},
 	{"DAC Output", NULL, "DAC standby ana"},
 	{"DAC standby ana", NULL, "DAC standby"},
 };
 
-const struct snd_soc_dapm_route stih407_sas_route[] = {
+static const struct snd_soc_dapm_route stih407_sas_route[] = {
 	{"DAC Output", NULL, "DAC standby ana"},
 	{"DAC standby ana", NULL, "DAC standby"},
 };
@@ -407,21 +407,21 @@ static int sti_sas_prepare(struct snd_pcm_substream *substream,
 	return 0;
 }
 
-const struct snd_soc_dai_ops stih416_dac_ops = {
+static const struct snd_soc_dai_ops stih416_dac_ops = {
 	.set_fmt = sti_sas_dac_set_fmt,
 	.mute_stream = stih416_sas_dac_mute,
 	.prepare = sti_sas_prepare,
 	.set_sysclk = sti_sas_set_sysclk,
 };
 
-const struct snd_soc_dai_ops stih407_dac_ops = {
+static const struct snd_soc_dai_ops stih407_dac_ops = {
 	.set_fmt = sti_sas_dac_set_fmt,
 	.mute_stream = stih407_sas_dac_mute,
 	.prepare = sti_sas_prepare,
 	.set_sysclk = sti_sas_set_sysclk,
 };
 
-const struct regmap_config stih407_sas_regmap = {
+static const struct regmap_config stih407_sas_regmap = {
 	.reg_bits = 32,
 	.val_bits = 32,
 
@@ -434,7 +434,7 @@ const struct regmap_config stih407_sas_regmap = {
 	.reg_write = sti_sas_write_reg,
 };
 
-const struct regmap_config stih416_sas_regmap = {
+static const struct regmap_config stih416_sas_regmap = {
 	.reg_bits = 32,
 	.val_bits = 32,
 
@@ -447,7 +447,7 @@ const struct regmap_config stih416_sas_regmap = {
 	.reg_write = sti_sas_write_reg,
 };
 
-const struct sti_sas_dev_data stih416_data = {
+static const struct sti_sas_dev_data stih416_data = {
 	.chipid = CHIPID_STIH416,
 	.regmap = &stih416_sas_regmap,
 	.dac_ops = &stih416_dac_ops,
@@ -457,7 +457,7 @@ const struct sti_sas_dev_data stih416_data = {
 	.num_dapm_routes = ARRAY_SIZE(stih416_sas_route),
 };
 
-const struct sti_sas_dev_data stih407_data = {
+static const struct sti_sas_dev_data stih407_data = {
 	.chipid = CHIPID_STIH407,
 	.regmap = &stih407_sas_regmap,
 	.dac_ops = &stih407_dac_ops,
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Applied "ASoC: sti-sas: Staticise local symbols" to the asoc tree
  2015-07-13  5:26 ` [PATCH 2/2] ASoC: sti-sas: Staticise local symbols Axel Lin
@ 2015-07-13 11:16   ` Mark Brown
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2015-07-13 11:16 UTC (permalink / raw)
  To: Axel Lin, Mark Brown; +Cc: alsa-devel

The patch

   ASoC: sti-sas: Staticise local symbols

has been applied to the asoc tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

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

>From 589bef3296317b5507a9a6e2e14fb30dd40ee764 Mon Sep 17 00:00:00 2001
From: Axel Lin <axel.lin@ingics.com>
Date: Mon, 13 Jul 2015 13:26:45 +0800
Subject: [PATCH] ASoC: sti-sas: Staticise local symbols

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/codecs/sti-sas.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/sound/soc/codecs/sti-sas.c b/sound/soc/codecs/sti-sas.c
index 4168b88ba3b1..6c0bbe8b495e 100644
--- a/sound/soc/codecs/sti-sas.c
+++ b/sound/soc/codecs/sti-sas.c
@@ -238,7 +238,7 @@ static int stih416_dac_probe(struct snd_soc_dai *dai)
 	return 0;
 }
 
-const struct snd_soc_dapm_widget stih416_sas_dapm_widgets[] = {
+static const struct snd_soc_dapm_widget stih416_sas_dapm_widgets[] = {
 	SND_SOC_DAPM_PGA("DAC bandgap", STIH416_AUDIO_DAC_CTRL,
 			 STIH416_DAC_NOT_PNDBG_MASK, 0, NULL, 0),
 	SND_SOC_DAPM_OUT_DRV("DAC standby ana", STIH416_AUDIO_DAC_CTRL,
@@ -248,7 +248,7 @@ const struct snd_soc_dapm_widget stih416_sas_dapm_widgets[] = {
 	SND_SOC_DAPM_OUTPUT("DAC Output"),
 };
 
-const struct snd_soc_dapm_widget stih407_sas_dapm_widgets[] = {
+static const struct snd_soc_dapm_widget stih407_sas_dapm_widgets[] = {
 	SND_SOC_DAPM_OUT_DRV("DAC standby ana", STIH407_AUDIO_DAC_CTRL,
 			     STIH407_DAC_STANDBY_ANA, 1, NULL, 0),
 	SND_SOC_DAPM_DAC("DAC standby",  "dac_p", STIH407_AUDIO_DAC_CTRL,
@@ -256,13 +256,13 @@ const struct snd_soc_dapm_widget stih407_sas_dapm_widgets[] = {
 	SND_SOC_DAPM_OUTPUT("DAC Output"),
 };
 
-const struct snd_soc_dapm_route stih416_sas_route[] = {
+static const struct snd_soc_dapm_route stih416_sas_route[] = {
 	{"DAC Output", NULL, "DAC bandgap"},
 	{"DAC Output", NULL, "DAC standby ana"},
 	{"DAC standby ana", NULL, "DAC standby"},
 };
 
-const struct snd_soc_dapm_route stih407_sas_route[] = {
+static const struct snd_soc_dapm_route stih407_sas_route[] = {
 	{"DAC Output", NULL, "DAC standby ana"},
 	{"DAC standby ana", NULL, "DAC standby"},
 };
@@ -407,21 +407,21 @@ static int sti_sas_prepare(struct snd_pcm_substream *substream,
 	return 0;
 }
 
-const struct snd_soc_dai_ops stih416_dac_ops = {
+static const struct snd_soc_dai_ops stih416_dac_ops = {
 	.set_fmt = sti_sas_dac_set_fmt,
 	.mute_stream = stih416_sas_dac_mute,
 	.prepare = sti_sas_prepare,
 	.set_sysclk = sti_sas_set_sysclk,
 };
 
-const struct snd_soc_dai_ops stih407_dac_ops = {
+static const struct snd_soc_dai_ops stih407_dac_ops = {
 	.set_fmt = sti_sas_dac_set_fmt,
 	.mute_stream = stih407_sas_dac_mute,
 	.prepare = sti_sas_prepare,
 	.set_sysclk = sti_sas_set_sysclk,
 };
 
-const struct regmap_config stih407_sas_regmap = {
+static const struct regmap_config stih407_sas_regmap = {
 	.reg_bits = 32,
 	.val_bits = 32,
 
@@ -434,7 +434,7 @@ const struct regmap_config stih407_sas_regmap = {
 	.reg_write = sti_sas_write_reg,
 };
 
-const struct regmap_config stih416_sas_regmap = {
+static const struct regmap_config stih416_sas_regmap = {
 	.reg_bits = 32,
 	.val_bits = 32,
 
@@ -447,7 +447,7 @@ const struct regmap_config stih416_sas_regmap = {
 	.reg_write = sti_sas_write_reg,
 };
 
-const struct sti_sas_dev_data stih416_data = {
+static const struct sti_sas_dev_data stih416_data = {
 	.chipid = CHIPID_STIH416,
 	.regmap = &stih416_sas_regmap,
 	.dac_ops = &stih416_dac_ops,
@@ -457,7 +457,7 @@ const struct sti_sas_dev_data stih416_data = {
 	.num_dapm_routes = ARRAY_SIZE(stih416_sas_route),
 };
 
-const struct sti_sas_dev_data stih407_data = {
+static const struct sti_sas_dev_data stih407_data = {
 	.chipid = CHIPID_STIH407,
 	.regmap = &stih407_sas_regmap,
 	.dac_ops = &stih407_dac_ops,
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Applied "ASoC: sti-sas: Fix checking return value for ERR_PTR" to the asoc tree
  2015-07-13  5:25 [PATCH 1/2] ASoC: sti-sas: Fix checking return value for ERR_PTR Axel Lin
  2015-07-13  5:26 ` [PATCH 2/2] ASoC: sti-sas: Staticise local symbols Axel Lin
@ 2015-07-13 11:16 ` Mark Brown
  1 sibling, 0 replies; 4+ messages in thread
From: Mark Brown @ 2015-07-13 11:16 UTC (permalink / raw)
  To: Axel Lin, Mark Brown; +Cc: alsa-devel

The patch

   ASoC: sti-sas: Fix checking return value for ERR_PTR

has been applied to the asoc tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

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

>From e27d9ee6e709db070145847f9b5f52008f6eab84 Mon Sep 17 00:00:00 2001
From: Axel Lin <axel.lin@ingics.com>
Date: Mon, 13 Jul 2015 13:25:34 +0800
Subject: [PATCH] ASoC: sti-sas: Fix checking return value for ERR_PTR

Both devm_regmap_init and syscon_regmap_lookup_by_phandle return ERR_PTR
on failure.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/codecs/sti-sas.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sound/soc/codecs/sti-sas.c b/sound/soc/codecs/sti-sas.c
index 32db2c25a33f..4168b88ba3b1 100644
--- a/sound/soc/codecs/sti-sas.c
+++ b/sound/soc/codecs/sti-sas.c
@@ -568,17 +568,17 @@ static int sti_sas_driver_probe(struct platform_device *pdev)
 	/* Request the DAC & SPDIF registers memory region */
 	drvdata->dac.virt_regmap = devm_regmap_init(&pdev->dev, NULL, drvdata,
 						    drvdata->dev_data->regmap);
-	if (!drvdata->dac.virt_regmap) {
+	if (IS_ERR(drvdata->dac.virt_regmap)) {
 		dev_err(&pdev->dev, "audio registers not enabled\n");
-		return -EFAULT;
+		return PTR_ERR(drvdata->dac.virt_regmap);
 	}
 
 	/* Request the syscon region */
 	drvdata->dac.regmap =
 		syscon_regmap_lookup_by_phandle(pnode, "st,syscfg");
-	if (!drvdata->dac.regmap) {
+	if (IS_ERR(drvdata->dac.regmap)) {
 		dev_err(&pdev->dev, "syscon registers not available\n");
-		return -EFAULT;
+		return PTR_ERR(drvdata->dac.regmap);
 	}
 	drvdata->spdif.regmap = drvdata->dac.regmap;
 
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-07-13 11:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-13  5:25 [PATCH 1/2] ASoC: sti-sas: Fix checking return value for ERR_PTR Axel Lin
2015-07-13  5:26 ` [PATCH 2/2] ASoC: sti-sas: Staticise local symbols Axel Lin
2015-07-13 11:16   ` Applied "ASoC: sti-sas: Staticise local symbols" to the asoc tree Mark Brown
2015-07-13 11:16 ` Applied "ASoC: sti-sas: Fix checking return value for ERR_PTR" " Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.