* [PATCH] ASoC: fix odd_ptr_err.cocci warnings (fwd)
@ 2017-04-21 22:14 Julia Lawall
2017-04-22 6:54 ` Takashi Iwai
0 siblings, 1 reply; 3+ messages in thread
From: Julia Lawall @ 2017-04-21 22:14 UTC (permalink / raw)
To: Simon Ho
Cc: Takashi Iwai, alsa-devel, Liam Girdwood, Jaroslav Kysela,
Mark Brown, alsa-devel, linux-kernel, kbuild-all
I don't think the patch is correct, so I haven't bothered signing off on
it. Probably the & is not correct in the IS_ERR call?
julia
---------- Forwarded message ----------
Date: Sat, 22 Apr 2017 06:09:26 +0800
From: kbuild test robot <fengguang.wu@intel.com>
To: kbuild@01.org
Cc: Julia Lawall <julia.lawall@lip6.fr>
Subject: [PATCH] ASoC: fix odd_ptr_err.cocci warnings
PTR_ERR should access the value just tested by IS_ERR
Semantic patch information:
There can be false positives in the patch case, where it is the call to
IS_ERR that is wrong.
Generated by: scripts/coccinelle/tests/odd_ptr_err.cocci
CC: Simon Ho <simon.ho@conexant.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---
Please take the patch only if it's a positive warning. Thanks!
cx2072x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/sound/soc/codecs/cx2072x.c
+++ b/sound/soc/codecs/cx2072x.c
@@ -2183,7 +2183,7 @@ static int cx2072x_i2c_probe(struct i2c_
&cx2072x_regmap);
if (IS_ERR(&cx2072x->regmap)) {
- ret = PTR_ERR(cx2072x->regmap);
+ ret = PTR_ERR(&cx2072x->regmap);
dev_err(&i2c->dev, "Failed to init regmap: %d\n", ret);
return ret;
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: fix odd_ptr_err.cocci warnings (fwd)
2017-04-21 22:14 [PATCH] ASoC: fix odd_ptr_err.cocci warnings (fwd) Julia Lawall
@ 2017-04-22 6:54 ` Takashi Iwai
2017-04-24 17:04 ` [alsa-devel] " Simon Ho
0 siblings, 1 reply; 3+ messages in thread
From: Takashi Iwai @ 2017-04-22 6:54 UTC (permalink / raw)
To: Julia Lawall
Cc: Simon Ho, alsa-devel, Liam Girdwood, Jaroslav Kysela, Mark Brown,
linux-kernel, kbuild-all
On Sat, 22 Apr 2017 00:14:57 +0200,
Julia Lawall wrote:
>
> I don't think the patch is correct, so I haven't bothered signing off on
> it. Probably the & is not correct in the IS_ERR call?
Yes, IS_ERR() was called with the wrong argument. I fixed it now.
Note that it's no branch to be merged to upstream yet, it's just a
testing for the previously submitted patchset.
Simon, my latest version is found in topic/soc-cx2072x branch in sound
git tree:
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git
Please check that before the next submission.
thanks,
Takashi
>
> julia
>
> ---------- Forwarded message ----------
> Date: Sat, 22 Apr 2017 06:09:26 +0800
> From: kbuild test robot <fengguang.wu@intel.com>
> To: kbuild@01.org
> Cc: Julia Lawall <julia.lawall@lip6.fr>
> Subject: [PATCH] ASoC: fix odd_ptr_err.cocci warnings
>
> PTR_ERR should access the value just tested by IS_ERR
>
> Semantic patch information:
> There can be false positives in the patch case, where it is the call to
> IS_ERR that is wrong.
>
> Generated by: scripts/coccinelle/tests/odd_ptr_err.cocci
>
> CC: Simon Ho <simon.ho@conexant.com>
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
> ---
>
> Please take the patch only if it's a positive warning. Thanks!
>
> cx2072x.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- a/sound/soc/codecs/cx2072x.c
> +++ b/sound/soc/codecs/cx2072x.c
> @@ -2183,7 +2183,7 @@ static int cx2072x_i2c_probe(struct i2c_
> &cx2072x_regmap);
>
> if (IS_ERR(&cx2072x->regmap)) {
> - ret = PTR_ERR(cx2072x->regmap);
> + ret = PTR_ERR(&cx2072x->regmap);
> dev_err(&i2c->dev, "Failed to init regmap: %d\n", ret);
> return ret;
> }
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [alsa-devel] [PATCH] ASoC: fix odd_ptr_err.cocci warnings (fwd)
2017-04-22 6:54 ` Takashi Iwai
@ 2017-04-24 17:04 ` Simon Ho
0 siblings, 0 replies; 3+ messages in thread
From: Simon Ho @ 2017-04-24 17:04 UTC (permalink / raw)
To: Takashi Iwai
Cc: Julia Lawall, alsa-devel, Simon Ho, linux-kernel, Liam Girdwood,
Mark Brown, kbuild-all
On Sat, Apr 22, 2017 at 08:54:11AM +0200, Takashi Iwai wrote:
> On Sat, 22 Apr 2017 00:14:57 +0200,
> Julia Lawall wrote:
> >
> > I don't think the patch is correct, so I haven't bothered signing off on
> > it. Probably the & is not correct in the IS_ERR call?
>
> Yes, IS_ERR() was called with the wrong argument. I fixed it now.
>
> Note that it's no branch to be merged to upstream yet, it's just a
> testing for the previously submitted patchset.
>
> Simon, my latest version is found in topic/soc-cx2072x branch in sound
> git tree:
> git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git
>
> Please check that before the next submission.
>
>
> thanks,
>
> Takashi
>
I will merge this to my new patch, thank you for all your assistance.
Thanks,
Simon
> >
> > julia
> >
> > ---------- Forwarded message ----------
> > Date: Sat, 22 Apr 2017 06:09:26 +0800
> > From: kbuild test robot <fengguang.wu@intel.com>
> > To: kbuild@01.org
> > Cc: Julia Lawall <julia.lawall@lip6.fr>
> > Subject: [PATCH] ASoC: fix odd_ptr_err.cocci warnings
> >
> > PTR_ERR should access the value just tested by IS_ERR
> >
> > Semantic patch information:
> > There can be false positives in the patch case, where it is the call to
> > IS_ERR that is wrong.
> >
> > Generated by: scripts/coccinelle/tests/odd_ptr_err.cocci
> >
> > CC: Simon Ho <simon.ho@conexant.com>
> > Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
> > ---
> >
> > Please take the patch only if it's a positive warning. Thanks!
> >
> > cx2072x.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > --- a/sound/soc/codecs/cx2072x.c
> > +++ b/sound/soc/codecs/cx2072x.c
> > @@ -2183,7 +2183,7 @@ static int cx2072x_i2c_probe(struct i2c_
> > &cx2072x_regmap);
> >
> > if (IS_ERR(&cx2072x->regmap)) {
> > - ret = PTR_ERR(cx2072x->regmap);
> > + ret = PTR_ERR(&cx2072x->regmap);
> > dev_err(&i2c->dev, "Failed to init regmap: %d\n", ret);
> > return ret;
> > }
> >
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-04-24 17:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-21 22:14 [PATCH] ASoC: fix odd_ptr_err.cocci warnings (fwd) Julia Lawall
2017-04-22 6:54 ` Takashi Iwai
2017-04-24 17:04 ` [alsa-devel] " Simon Ho
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).