* [patch] ASoC: rt5663: fix a debug statement
@ 2016-10-13 8:47 Dan Carpenter
2016-10-13 9:13 ` Bard Liao
2016-10-20 17:13 ` Applied "ASoC: rt5663: fix a debug statement" to the asoc tree Mark Brown
0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2016-10-13 8:47 UTC (permalink / raw)
To: Bard Liao
Cc: Oder Chiou, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai, alsa-devel, linux-kernel, kernel-janitors
We increment "i" before printing the debug statement. That makes it
the wrong sleep_time[] information and Smatch complains that the last
increment could be beyond the end of the array.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/sound/soc/codecs/rt5663.c b/sound/soc/codecs/rt5663.c
index 01a18d8..00ff278 100644
--- a/sound/soc/codecs/rt5663.c
+++ b/sound/soc/codecs/rt5663.c
@@ -1547,11 +1547,11 @@ static int rt5663_jack_detect(struct snd_soc_codec *codec, int jack_insert)
msleep(sleep_time[i]);
val = snd_soc_read(codec, RT5663_EM_JACK_TYPE_2) &
0x0003;
+ dev_dbg(codec->dev, "%s: MX-00e7 val=%x sleep %d\n",
+ __func__, val, sleep_time[i]);
i++;
if (val == 0x1 || val == 0x2 || val == 0x3)
break;
- dev_dbg(codec->dev, "%s: MX-00e7 val=%x sleep %d\n",
- __func__, val, sleep_time[i]);
}
dev_dbg(codec->dev, "%s val = %d\n", __func__, val);
switch (val) {
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [patch] ASoC: rt5663: fix a debug statement
2016-10-13 8:47 [patch] ASoC: rt5663: fix a debug statement Dan Carpenter
@ 2016-10-13 9:13 ` Bard Liao
2016-10-20 17:13 ` Applied "ASoC: rt5663: fix a debug statement" to the asoc tree Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Bard Liao @ 2016-10-13 9:13 UTC (permalink / raw)
To: Dan Carpenter
Cc: Oder Chiou, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai, alsa-devel@alsa-project.org,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
> -----Original Message-----
> From: Dan Carpenter [mailto:dan.carpenter@oracle.com]
> Sent: Thursday, October 13, 2016 4:47 PM
> To: Bard Liao
> Cc: Oder Chiou; Liam Girdwood; Mark Brown; Jaroslav Kysela; Takashi Iwai;
> alsa-devel@alsa-project.org; linux-kernel@vger.kernel.org;
> kernel-janitors@vger.kernel.org
> Subject: [patch] ASoC: rt5663: fix a debug statement
>
> We increment "i" before printing the debug statement. That makes it the
> wrong sleep_time[] information and Smatch complains that the last increment
> could be beyond the end of the array.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
Acked-by: Bard Liao <bardliao@realtek.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Applied "ASoC: rt5663: fix a debug statement" to the asoc tree
2016-10-13 8:47 [patch] ASoC: rt5663: fix a debug statement Dan Carpenter
2016-10-13 9:13 ` Bard Liao
@ 2016-10-20 17:13 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2016-10-20 17:13 UTC (permalink / raw)
To: Dan Carpenter; +Cc: Bard Liao, Mark Brown
The patch
ASoC: rt5663: fix a debug statement
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 c975e39ccadf6dc047356c60773a043a2293b8cd Mon Sep 17 00:00:00 2001
From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Thu, 13 Oct 2016 11:47:13 +0300
Subject: [PATCH] ASoC: rt5663: fix a debug statement
We increment "i" before printing the debug statement. That makes it
the wrong sleep_time[] information and Smatch complains that the last
increment could be beyond the end of the array.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/codecs/rt5663.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/rt5663.c b/sound/soc/codecs/rt5663.c
index 01a18d88f1eb..00ff2788879e 100644
--- a/sound/soc/codecs/rt5663.c
+++ b/sound/soc/codecs/rt5663.c
@@ -1547,11 +1547,11 @@ static int rt5663_jack_detect(struct snd_soc_codec *codec, int jack_insert)
msleep(sleep_time[i]);
val = snd_soc_read(codec, RT5663_EM_JACK_TYPE_2) &
0x0003;
+ dev_dbg(codec->dev, "%s: MX-00e7 val=%x sleep %d\n",
+ __func__, val, sleep_time[i]);
i++;
if (val == 0x1 || val == 0x2 || val == 0x3)
break;
- dev_dbg(codec->dev, "%s: MX-00e7 val=%x sleep %d\n",
- __func__, val, sleep_time[i]);
}
dev_dbg(codec->dev, "%s val = %d\n", __func__, val);
switch (val) {
--
2.9.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-10-20 17:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-13 8:47 [patch] ASoC: rt5663: fix a debug statement Dan Carpenter
2016-10-13 9:13 ` Bard Liao
2016-10-20 17:13 ` Applied "ASoC: rt5663: fix a debug statement" to the asoc tree 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).