All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] PM / devfreq: fix odd_ptr_err.cocci warnings
  2020-05-21 16:09 [PATCH 06/12] PM / devfreq: Add cpu based scaling support to passive_governor kbuild test robot
@ 2020-05-21 16:09 ` kbuild test robot
  2020-05-22 12:59     ` Julia Lawall
  0 siblings, 1 reply; 7+ messages in thread
From: kbuild test robot @ 2020-05-21 16:09 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 2349 bytes --]

CC: kbuild-all(a)lists.01.org
In-Reply-To: <20200520034307.20435-7-andrew-sh.cheng@mediatek.com>
References: <20200520034307.20435-7-andrew-sh.cheng@mediatek.com>
TO: "Andrew-sh.Cheng" <andrew-sh.cheng@mediatek.com>
TO: MyungJoo Ham <myungjoo.ham@samsung.com>
TO: Kyungmin Park <kyungmin.park@samsung.com>
TO: Chanwoo Choi <cw00.choi@samsung.com>
TO: Rob Herring <robh+dt@kernel.org>
TO: Mark Rutland <mark.rutland@arm.com>
TO: Matthias Brugger <matthias.bgg@gmail.com>
TO: "Rafael J . Wysocki" <rjw@rjwysocki.net>
TO: Viresh Kumar <viresh.kumar@linaro.org>
TO: Nishanth Menon <nm@ti.com>
TO: Stephen Boyd <sboyd@kernel.org>
TO: Liam Girdwood <lgirdwood@gmail.com>
TO: Mark Brown <broonie@kernel.org>
CC: devicetree(a)vger.kernel.org
CC: "Andrew-sh . Cheng" <andrew-sh.cheng@mediatek.com>
CC: srv_heupstream(a)mediatek.com
CC: linux-pm(a)vger.kernel.org
CC: linux-kernel(a)vger.kernel.org
CC: Saravana Kannan <skannan@codeaurora.org>
CC: linux-mediatek(a)lists.infradead.org
CC: Sibi Sankar <sibis@codeaurora.org>
CC: linux-arm-kernel(a)lists.infradead.org

From: kbuild test robot <lkp@intel.com>

drivers/devfreq/governor_passive.c:336:7-13: inconsistent IS_ERR and PTR_ERR on line 337.

 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: Saravana Kannan <skannan@codeaurora.org>
Signed-off-by: kbuild test robot <lkp@intel.com>
---

url:    https://github.com/0day-ci/linux/commits/Andrew-sh-Cheng/Add-cpufreq-and-cci-devfreq-for-mt8183-and-SVS-support/20200520-222709
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
:::::: branch date: 26 hours ago
:::::: commit date: 26 hours ago

Please take the patch only if it's a positive warning. Thanks!

 governor_passive.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/devfreq/governor_passive.c
+++ b/drivers/devfreq/governor_passive.c
@@ -334,7 +334,7 @@ static int cpufreq_passive_register(stru
 
 			opp_table = dev_pm_opp_get_opp_table(cpu_dev);
 			if (IS_ERR(devfreq->opp_table)) {
-				ret = PTR_ERR(opp_table);
+				ret = PTR_ERR(devfreq->opp_table);
 				goto out;
 			}
 

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

* Re: [PATCH] PM / devfreq: fix odd_ptr_err.cocci warnings
  2020-05-21 16:09 ` [PATCH] PM / devfreq: fix odd_ptr_err.cocci warnings kbuild test robot
  2020-05-22 12:59     ` Julia Lawall
  (?)
@ 2020-05-22 12:59     ` Julia Lawall
  0 siblings, 0 replies; 7+ messages in thread
From: Julia Lawall @ 2020-05-22 12:59 UTC (permalink / raw)
  To: kbuild-all, Andrew-sh.Cheng, MyungJoo Ham, Kyungmin Park,
	Chanwoo Choi, Rob Herring, Mark Rutland, Matthias Brugger,
	Rafael J . Wysocki, Viresh Kumar, Nishanth Menon, Stephen Boyd,
	Liam Girdwood, Mark Brown, devicetree, Andrew-sh . Cheng,
	srv_heupstream, linux-pm, linux-kernel, Saravana Kannan,
	linux-mediatek, Sibi Sankar, linux-arm-kernel

Hello,

This provides a patch, but it doesn't look like the right one.  It looks
like the if test should be testing opp_table,

julia

On Fri, 22 May 2020, kbuild test robot wrote:

> From: kbuild test robot <lkp@intel.com>
>
> drivers/devfreq/governor_passive.c:336:7-13: inconsistent IS_ERR and PTR_ERR on line 337.
>
>  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: Saravana Kannan <skannan@codeaurora.org>
> Signed-off-by: kbuild test robot <lkp@intel.com>
> ---
>
> url:    https://github.com/0day-ci/linux/commits/Andrew-sh-Cheng/Add-cpufreq-and-cci-devfreq-for-mt8183-and-SVS-support/20200520-222709
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
> :::::: branch date: 26 hours ago
> :::::: commit date: 26 hours ago
>
> Please take the patch only if it's a positive warning. Thanks!
>
>  governor_passive.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- a/drivers/devfreq/governor_passive.c
> +++ b/drivers/devfreq/governor_passive.c
> @@ -334,7 +334,7 @@ static int cpufreq_passive_register(stru
>
>  			opp_table = dev_pm_opp_get_opp_table(cpu_dev);
>  			if (IS_ERR(devfreq->opp_table)) {
> -				ret = PTR_ERR(opp_table);
> +				ret = PTR_ERR(devfreq->opp_table);
>  				goto out;
>  			}
>
>

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* Re: [PATCH] PM / devfreq: fix odd_ptr_err.cocci warnings
@ 2020-05-22 12:59     ` Julia Lawall
  0 siblings, 0 replies; 7+ messages in thread
From: Julia Lawall @ 2020-05-22 12:59 UTC (permalink / raw)
  To: kbuild-all, Andrew-sh.Cheng, MyungJoo Ham, Kyungmin Park,
	Chanwoo Choi, Rob Herring, Mark Rutland, Matthias Brugger,
	Rafael J . Wysocki, Viresh Kumar, Nishanth Menon, Stephen Boyd,
	Liam Girdwood, Mark Brown, devicetree, Andrew-sh . Cheng,
	srv_heupstream, linux-pm, linux-kernel, Saravana Kannan,
	linux-mediatek, Sibi Sankar, linux-arm-kernel

Hello,

This provides a patch, but it doesn't look like the right one.  It looks
like the if test should be testing opp_table,

julia

On Fri, 22 May 2020, kbuild test robot wrote:

> From: kbuild test robot <lkp@intel.com>
>
> drivers/devfreq/governor_passive.c:336:7-13: inconsistent IS_ERR and PTR_ERR on line 337.
>
>  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: Saravana Kannan <skannan@codeaurora.org>
> Signed-off-by: kbuild test robot <lkp@intel.com>
> ---
>
> url:    https://github.com/0day-ci/linux/commits/Andrew-sh-Cheng/Add-cpufreq-and-cci-devfreq-for-mt8183-and-SVS-support/20200520-222709
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
> :::::: branch date: 26 hours ago
> :::::: commit date: 26 hours ago
>
> Please take the patch only if it's a positive warning. Thanks!
>
>  governor_passive.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- a/drivers/devfreq/governor_passive.c
> +++ b/drivers/devfreq/governor_passive.c
> @@ -334,7 +334,7 @@ static int cpufreq_passive_register(stru
>
>  			opp_table = dev_pm_opp_get_opp_table(cpu_dev);
>  			if (IS_ERR(devfreq->opp_table)) {
> -				ret = PTR_ERR(opp_table);
> +				ret = PTR_ERR(devfreq->opp_table);
>  				goto out;
>  			}
>
>

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

* Re: [PATCH] PM / devfreq: fix odd_ptr_err.cocci warnings
@ 2020-05-22 12:59     ` Julia Lawall
  0 siblings, 0 replies; 7+ messages in thread
From: Julia Lawall @ 2020-05-22 12:59 UTC (permalink / raw)
  To: kbuild-all, Andrew-sh.Cheng, MyungJoo Ham, Kyungmin Park,
	Chanwoo Choi, Rob Herring, Mark Rutland, Matthias Brugger,
	Rafael J . Wysocki, Viresh Kumar, Nishanth Menon, Stephen Boyd,
	Liam Girdwood, Mark Brown, devicetree, Andrew-sh . Cheng,
	srv_heupstream, linux-pm, linux-kernel, Saravana Kannan,
	linux-mediatek, Sibi Sankar, linux-arm-kernel

Hello,

This provides a patch, but it doesn't look like the right one.  It looks
like the if test should be testing opp_table,

julia

On Fri, 22 May 2020, kbuild test robot wrote:

> From: kbuild test robot <lkp@intel.com>
>
> drivers/devfreq/governor_passive.c:336:7-13: inconsistent IS_ERR and PTR_ERR on line 337.
>
>  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: Saravana Kannan <skannan@codeaurora.org>
> Signed-off-by: kbuild test robot <lkp@intel.com>
> ---
>
> url:    https://github.com/0day-ci/linux/commits/Andrew-sh-Cheng/Add-cpufreq-and-cci-devfreq-for-mt8183-and-SVS-support/20200520-222709
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
> :::::: branch date: 26 hours ago
> :::::: commit date: 26 hours ago
>
> Please take the patch only if it's a positive warning. Thanks!
>
>  governor_passive.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- a/drivers/devfreq/governor_passive.c
> +++ b/drivers/devfreq/governor_passive.c
> @@ -334,7 +334,7 @@ static int cpufreq_passive_register(stru
>
>  			opp_table = dev_pm_opp_get_opp_table(cpu_dev);
>  			if (IS_ERR(devfreq->opp_table)) {
> -				ret = PTR_ERR(opp_table);
> +				ret = PTR_ERR(devfreq->opp_table);
>  				goto out;
>  			}
>
>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] PM / devfreq: fix odd_ptr_err.cocci warnings
@ 2020-05-22 12:59     ` Julia Lawall
  0 siblings, 0 replies; 7+ messages in thread
From: Julia Lawall @ 2020-05-22 12:59 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1520 bytes --]

Hello,

This provides a patch, but it doesn't look like the right one.  It looks
like the if test should be testing opp_table,

julia

On Fri, 22 May 2020, kbuild test robot wrote:

> From: kbuild test robot <lkp@intel.com>
>
> drivers/devfreq/governor_passive.c:336:7-13: inconsistent IS_ERR and PTR_ERR on line 337.
>
>  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: Saravana Kannan <skannan@codeaurora.org>
> Signed-off-by: kbuild test robot <lkp@intel.com>
> ---
>
> url:    https://github.com/0day-ci/linux/commits/Andrew-sh-Cheng/Add-cpufreq-and-cci-devfreq-for-mt8183-and-SVS-support/20200520-222709
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
> :::::: branch date: 26 hours ago
> :::::: commit date: 26 hours ago
>
> Please take the patch only if it's a positive warning. Thanks!
>
>  governor_passive.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- a/drivers/devfreq/governor_passive.c
> +++ b/drivers/devfreq/governor_passive.c
> @@ -334,7 +334,7 @@ static int cpufreq_passive_register(stru
>
>  			opp_table = dev_pm_opp_get_opp_table(cpu_dev);
>  			if (IS_ERR(devfreq->opp_table)) {
> -				ret = PTR_ERR(opp_table);
> +				ret = PTR_ERR(devfreq->opp_table);
>  				goto out;
>  			}
>
>

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

* [chanwoo:devfreq-testing-passive-gov 3/3] drivers/devfreq/governor_passive.c:318:7-13: inconsistent IS_ERR and PTR_ERR on line 319.
@ 2021-03-01  8:35 kernel test robot
  2021-03-01  8:35 ` [PATCH] PM / devfreq: fix odd_ptr_err.cocci warnings kernel test robot
  0 siblings, 1 reply; 7+ messages in thread
From: kernel test robot @ 2021-03-01  8:35 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 1089 bytes --]

CC: kbuild-all(a)lists.01.org
TO: Saravana Kannan <skannan@codeaurora.org>
CC: Chanwoo Choi <cw00.choi@samsung.com>
CC: Sibi Sankar <sibis@codeaurora.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux.git devfreq-testing-passive-gov
head:   82d4ff586ae2fb6d89cad871949004bed3438ccb
commit: 82d4ff586ae2fb6d89cad871949004bed3438ccb [3/3] PM / devfreq: Add cpu based scaling support to passive governor
:::::: branch date: 3 hours ago
:::::: commit date: 3 hours ago
config: arm64-randconfig-c003-20210301 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Julia Lawall <julia.lawall@lip6.fr>


"coccinelle warnings: (new ones prefixed by >>)"
>> drivers/devfreq/governor_passive.c:318:7-13: inconsistent IS_ERR and PTR_ERR on line 319.

Please review and possibly fold the followup patch.

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 30358 bytes --]

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

* [PATCH] PM / devfreq: fix odd_ptr_err.cocci warnings
  2021-03-01  8:35 [chanwoo:devfreq-testing-passive-gov 3/3] drivers/devfreq/governor_passive.c:318:7-13: inconsistent IS_ERR and PTR_ERR on line 319 kernel test robot
@ 2021-03-01  8:35 ` kernel test robot
  0 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2021-03-01  8:35 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 1769 bytes --]

CC: kbuild-all(a)lists.01.org
TO: Saravana Kannan <skannan@codeaurora.org>
CC: Chanwoo Choi <cw00.choi@samsung.com>
CC: Sibi Sankar <sibis@codeaurora.org>
CC: MyungJoo Ham <myungjoo.ham@samsung.com>
CC: Kyungmin Park <kyungmin.park@samsung.com>
CC: linux-pm(a)vger.kernel.org
CC: linux-kernel(a)vger.kernel.org

From: kernel test robot <lkp@intel.com>

drivers/devfreq/governor_passive.c:318:7-13: inconsistent IS_ERR and PTR_ERR on line 319.

 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

Fixes: 82d4ff586ae2 ("PM / devfreq: Add cpu based scaling support to passive governor")
CC: Saravana Kannan <skannan@codeaurora.org>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux.git devfreq-testing-passive-gov
head:   82d4ff586ae2fb6d89cad871949004bed3438ccb
commit: 82d4ff586ae2fb6d89cad871949004bed3438ccb [3/3] PM / devfreq: Add cpu based scaling support to passive governor
:::::: branch date: 3 hours ago
:::::: commit date: 3 hours ago

Please take the patch only if it's a positive warning. Thanks!

 governor_passive.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/devfreq/governor_passive.c
+++ b/drivers/devfreq/governor_passive.c
@@ -316,7 +316,7 @@ static int cpufreq_passive_register(stru
 
 			opp_table = dev_pm_opp_get_opp_table(cpu_dev);
 			if (IS_ERR(devfreq->opp_table)) {
-				ret = PTR_ERR(opp_table);
+				ret = PTR_ERR(devfreq->opp_table);
 				goto out;
 			}
 

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

end of thread, other threads:[~2021-03-01  8:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-01  8:35 [chanwoo:devfreq-testing-passive-gov 3/3] drivers/devfreq/governor_passive.c:318:7-13: inconsistent IS_ERR and PTR_ERR on line 319 kernel test robot
2021-03-01  8:35 ` [PATCH] PM / devfreq: fix odd_ptr_err.cocci warnings kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2020-05-21 16:09 [PATCH 06/12] PM / devfreq: Add cpu based scaling support to passive_governor kbuild test robot
2020-05-21 16:09 ` [PATCH] PM / devfreq: fix odd_ptr_err.cocci warnings kbuild test robot
2020-05-22 12:59   ` Julia Lawall
2020-05-22 12:59     ` Julia Lawall
2020-05-22 12:59     ` Julia Lawall
2020-05-22 12:59     ` Julia Lawall

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.