* [PATCH 1/3] ASoC: cs35l36: Remove unneeded variable initialisation
@ 2021-05-11 10:10 Charles Keepax
2021-05-11 10:10 ` [PATCH 2/3] ASoC: cs4265: Minor tidy up of error paths Charles Keepax
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Charles Keepax @ 2021-05-11 10:10 UTC (permalink / raw)
To: broonie
Cc: pierre-louis.bossart, alsa-devel, patches, lgirdwood,
james.schulman, david.rhodes
Reported-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
---
sound/soc/codecs/cs35l36.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/cs35l36.c b/sound/soc/codecs/cs35l36.c
index a038bcec2d17c..db5472b10465b 100644
--- a/sound/soc/codecs/cs35l36.c
+++ b/sound/soc/codecs/cs35l36.c
@@ -1156,7 +1156,7 @@ static int cs35l36_component_probe(struct snd_soc_component *component)
{
struct cs35l36_private *cs35l36 =
snd_soc_component_get_drvdata(component);
- int ret = 0;
+ int ret;
if ((cs35l36->rev_id == CS35L36_REV_A0) && cs35l36->pdata.dcm_mode) {
regmap_update_bits(cs35l36->regmap, CS35L36_BSTCVRT_DCM_CTRL,
--
2.11.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/3] ASoC: cs4265: Minor tidy up of error paths
2021-05-11 10:10 [PATCH 1/3] ASoC: cs35l36: Remove unneeded variable initialisation Charles Keepax
@ 2021-05-11 10:10 ` Charles Keepax
2021-05-11 10:10 ` [PATCH 3/3] ASoC: cs42l52: " Charles Keepax
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Charles Keepax @ 2021-05-11 10:10 UTC (permalink / raw)
To: broonie
Cc: pierre-louis.bossart, alsa-devel, patches, lgirdwood,
james.schulman, david.rhodes
Fixup a needlessly initialised variable and an unchecked return value.
Reported-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
---
sound/soc/codecs/cs4265.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/sound/soc/codecs/cs4265.c b/sound/soc/codecs/cs4265.c
index d76be44f46b40..cffd6111afaca 100644
--- a/sound/soc/codecs/cs4265.c
+++ b/sound/soc/codecs/cs4265.c
@@ -573,7 +573,7 @@ static int cs4265_i2c_probe(struct i2c_client *i2c_client,
const struct i2c_device_id *id)
{
struct cs4265_private *cs4265;
- int ret = 0;
+ int ret;
unsigned int devid = 0;
unsigned int reg;
@@ -602,6 +602,11 @@ static int cs4265_i2c_probe(struct i2c_client *i2c_client,
i2c_set_clientdata(i2c_client, cs4265);
ret = regmap_read(cs4265->regmap, CS4265_CHIP_ID, ®);
+ if (ret) {
+ dev_err(&i2c_client->dev, "Failed to read chip ID: %d\n", ret);
+ return ret;
+ }
+
devid = reg & CS4265_CHIP_ID_MASK;
if (devid != CS4265_CHIP_ID_VAL) {
ret = -ENODEV;
@@ -616,10 +621,9 @@ static int cs4265_i2c_probe(struct i2c_client *i2c_client,
regmap_write(cs4265->regmap, CS4265_PWRCTL, 0x0F);
- ret = devm_snd_soc_register_component(&i2c_client->dev,
+ return devm_snd_soc_register_component(&i2c_client->dev,
&soc_component_cs4265, cs4265_dai,
ARRAY_SIZE(cs4265_dai));
- return ret;
}
static const struct of_device_id cs4265_of_match[] = {
--
2.11.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/3] ASoC: cs42l52: Minor tidy up of error paths
2021-05-11 10:10 [PATCH 1/3] ASoC: cs35l36: Remove unneeded variable initialisation Charles Keepax
2021-05-11 10:10 ` [PATCH 2/3] ASoC: cs4265: Minor tidy up of error paths Charles Keepax
@ 2021-05-11 10:10 ` Charles Keepax
2021-05-11 16:31 ` [PATCH 1/3] ASoC: cs35l36: Remove unneeded variable initialisation Pierre-Louis Bossart
2021-05-11 18:21 ` Mark Brown
3 siblings, 0 replies; 5+ messages in thread
From: Charles Keepax @ 2021-05-11 10:10 UTC (permalink / raw)
To: broonie
Cc: pierre-louis.bossart, alsa-devel, patches, lgirdwood,
james.schulman, david.rhodes
Fixup a needlessly initialised variable and an unchecked return
value.
Reported-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
---
sound/soc/codecs/cs42l52.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/sound/soc/codecs/cs42l52.c b/sound/soc/codecs/cs42l52.c
index 796b894c390fe..88547e2cd53dc 100644
--- a/sound/soc/codecs/cs42l52.c
+++ b/sound/soc/codecs/cs42l52.c
@@ -1093,7 +1093,7 @@ static int cs42l52_i2c_probe(struct i2c_client *i2c_client,
struct cs42l52_private *cs42l52;
struct cs42l52_platform_data *pdata = dev_get_platdata(&i2c_client->dev);
int ret;
- unsigned int devid = 0;
+ unsigned int devid;
unsigned int reg;
u32 val32;
@@ -1163,6 +1163,11 @@ static int cs42l52_i2c_probe(struct i2c_client *i2c_client,
ret);
ret = regmap_read(cs42l52->regmap, CS42L52_CHIP, ®);
+ if (ret) {
+ dev_err(&i2c_client->dev, "Failed to read chip ID: %d\n", ret);
+ return ret;
+ }
+
devid = reg & CS42L52_CHIP_ID_MASK;
if (devid != CS42L52_CHIP_ID) {
ret = -ENODEV;
@@ -1199,11 +1204,8 @@ static int cs42l52_i2c_probe(struct i2c_client *i2c_client,
CS42L52_IFACE_CTL2_BIAS_LVL,
cs42l52->pdata.micbias_lvl);
- ret = devm_snd_soc_register_component(&i2c_client->dev,
+ return devm_snd_soc_register_component(&i2c_client->dev,
&soc_component_dev_cs42l52, &cs42l52_dai, 1);
- if (ret < 0)
- return ret;
- return 0;
}
static const struct of_device_id cs42l52_of_match[] = {
--
2.11.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/3] ASoC: cs35l36: Remove unneeded variable initialisation
2021-05-11 10:10 [PATCH 1/3] ASoC: cs35l36: Remove unneeded variable initialisation Charles Keepax
2021-05-11 10:10 ` [PATCH 2/3] ASoC: cs4265: Minor tidy up of error paths Charles Keepax
2021-05-11 10:10 ` [PATCH 3/3] ASoC: cs42l52: " Charles Keepax
@ 2021-05-11 16:31 ` Pierre-Louis Bossart
2021-05-11 18:21 ` Mark Brown
3 siblings, 0 replies; 5+ messages in thread
From: Pierre-Louis Bossart @ 2021-05-11 16:31 UTC (permalink / raw)
To: Charles Keepax, broonie
Cc: patches, alsa-devel, david.rhodes, lgirdwood, james.schulman
On 5/11/21 5:10 AM, Charles Keepax wrote:
> Reported-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
> Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Thanks, I rechecked with this patchset applied on top of the previous
one, there's only one warning left:
sound/soc/codecs/cs42l56.c:1308:6: style: Variable 'ret' is reassigned a
value before the old one has been used. [redundantAssignment]
ret = devm_snd_soc_register_component(&i2c_client->dev,
^
sound/soc/codecs/cs42l56.c:1247:6: note: ret is assigned
ret = regmap_read(cs42l56->regmap, CS42L56_CHIP_ID_1, ®);
^
sound/soc/codecs/cs42l56.c:1308:6: note: ret is overwritten
ret = devm_snd_soc_register_component(&i2c_client->dev,
^
> ---
> sound/soc/codecs/cs35l36.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sound/soc/codecs/cs35l36.c b/sound/soc/codecs/cs35l36.c
> index a038bcec2d17c..db5472b10465b 100644
> --- a/sound/soc/codecs/cs35l36.c
> +++ b/sound/soc/codecs/cs35l36.c
> @@ -1156,7 +1156,7 @@ static int cs35l36_component_probe(struct snd_soc_component *component)
> {
> struct cs35l36_private *cs35l36 =
> snd_soc_component_get_drvdata(component);
> - int ret = 0;
> + int ret;
>
> if ((cs35l36->rev_id == CS35L36_REV_A0) && cs35l36->pdata.dcm_mode) {
> regmap_update_bits(cs35l36->regmap, CS35L36_BSTCVRT_DCM_CTRL,
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/3] ASoC: cs35l36: Remove unneeded variable initialisation
2021-05-11 10:10 [PATCH 1/3] ASoC: cs35l36: Remove unneeded variable initialisation Charles Keepax
` (2 preceding siblings ...)
2021-05-11 16:31 ` [PATCH 1/3] ASoC: cs35l36: Remove unneeded variable initialisation Pierre-Louis Bossart
@ 2021-05-11 18:21 ` Mark Brown
3 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2021-05-11 18:21 UTC (permalink / raw)
To: Charles Keepax
Cc: alsa-devel, patches, lgirdwood, pierre-louis.bossart, Mark Brown,
james.schulman, david.rhodes
On Tue, 11 May 2021 11:10:49 +0100, Charles Keepax wrote:
>
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/3] ASoC: cs35l36: Remove unneeded variable initialisation
commit: 634a4be0f9d16428779d60bb40fd852f888f0a34
[2/3] ASoC: cs4265: Minor tidy up of error paths
commit: fd4e6baa6256b9c5cb6d8d6a020093ee9aee0372
[3/3] ASoC: cs42l52: Minor tidy up of error paths
commit: 4ac9b48adf4d561d0e33419d548278f205dd70b5
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] 5+ messages in thread
end of thread, other threads:[~2021-05-11 18:24 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-11 10:10 [PATCH 1/3] ASoC: cs35l36: Remove unneeded variable initialisation Charles Keepax
2021-05-11 10:10 ` [PATCH 2/3] ASoC: cs4265: Minor tidy up of error paths Charles Keepax
2021-05-11 10:10 ` [PATCH 3/3] ASoC: cs42l52: " Charles Keepax
2021-05-11 16:31 ` [PATCH 1/3] ASoC: cs35l36: Remove unneeded variable initialisation Pierre-Louis Bossart
2021-05-11 18:21 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).