All of lore.kernel.org
 help / color / mirror / Atom feed
* [linuxtv-media:master 119/306] drivers/media/platform/exynos4-is/media-dev.c:1273:1-3: WARNING: PTR_ERR_OR_ZERO can be used
@ 2020-07-19 13:49 ` kernel test robot
  0 siblings, 0 replies; 8+ messages in thread
From: kernel test robot @ 2020-07-19 13:49 UTC (permalink / raw)
  To: Chuhong Yuan; +Cc: kbuild-all, linux-media, Mauro Carvalho Chehab, Hans Verkuil

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

tree:   git://linuxtv.org/media_tree.git master
head:   8f2a4a9d5ff5202d0b3e3a144ebb9b67aabadd29
commit: 18ffec750578f7447c288647d7282c7d12b1d969 [119/306] media: exynos4-is: Add missed check for pinctrl_lookup_state()
config: xtensa-randconfig-c023-20200719 (attached as .config)
compiler: xtensa-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>


coccinelle warnings: (new ones prefixed by >>)

>> drivers/media/platform/exynos4-is/media-dev.c:1273:1-3: WARNING: PTR_ERR_OR_ZERO can be used

Please review and possibly fold the followup patch.

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

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

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

* [linuxtv-media:master 119/306] drivers/media/platform/exynos4-is/media-dev.c:1273:1-3: WARNING: PTR_ERR_OR_ZERO can be used
@ 2020-07-19 13:49 ` kernel test robot
  0 siblings, 0 replies; 8+ messages in thread
From: kernel test robot @ 2020-07-19 13:49 UTC (permalink / raw)
  To: kbuild-all

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

tree:   git://linuxtv.org/media_tree.git master
head:   8f2a4a9d5ff5202d0b3e3a144ebb9b67aabadd29
commit: 18ffec750578f7447c288647d7282c7d12b1d969 [119/306] media: exynos4-is: Add missed check for pinctrl_lookup_state()
config: xtensa-randconfig-c023-20200719 (attached as .config)
compiler: xtensa-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>


coccinelle warnings: (new ones prefixed by >>)

>> drivers/media/platform/exynos4-is/media-dev.c:1273:1-3: WARNING: PTR_ERR_OR_ZERO can be used

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: 40362 bytes --]

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

* [PATCH] media: exynos4-is: fix ptr_ret.cocci warnings
  2020-07-19 13:49 ` kernel test robot
  (?)
@ 2020-07-19 13:49   ` kernel test robot
  -1 siblings, 0 replies; 8+ messages in thread
From: kernel test robot @ 2020-07-19 13:49 UTC (permalink / raw)
  To: Chuhong Yuan
  Cc: kbuild-all, linux-media, Mauro Carvalho Chehab, Hans Verkuil,
	Kyungmin Park, Sylwester Nawrocki, Kukjin Kim,
	Krzysztof Kozlowski, linux-arm-kernel, linux-samsung-soc

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

drivers/media/platform/exynos4-is/media-dev.c:1273:1-3: WARNING: PTR_ERR_OR_ZERO can be used


 Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

Generated by: scripts/coccinelle/api/ptr_ret.cocci

Fixes: 18ffec750578 ("media: exynos4-is: Add missed check for pinctrl_lookup_state()")
CC: Chuhong Yuan <hslester96@gmail.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   git://linuxtv.org/media_tree.git master
head:   8f2a4a9d5ff5202d0b3e3a144ebb9b67aabadd29
commit: 18ffec750578f7447c288647d7282c7d12b1d969 [119/306] media: exynos4-is: Add missed check for pinctrl_lookup_state()

 media-dev.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

--- a/drivers/media/platform/exynos4-is/media-dev.c
+++ b/drivers/media/platform/exynos4-is/media-dev.c
@@ -1270,10 +1270,7 @@ static int fimc_md_get_pinctrl(struct fi
 
 	pctl->state_idle = pinctrl_lookup_state(pctl->pinctrl,
 					PINCTRL_STATE_IDLE);
-	if (IS_ERR(pctl->state_idle))
-		return PTR_ERR(pctl->state_idle);
-
-	return 0;
+	return PTR_ERR_OR_ZERO(pctl->state_idle);
 }
 
 static int cam_clk_prepare(struct clk_hw *hw)

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

* [PATCH] media: exynos4-is: fix ptr_ret.cocci warnings
@ 2020-07-19 13:49   ` kernel test robot
  0 siblings, 0 replies; 8+ messages in thread
From: kernel test robot @ 2020-07-19 13:49 UTC (permalink / raw)
  To: Chuhong Yuan
  Cc: linux-samsung-soc, kbuild-all, Krzysztof Kozlowski, Hans Verkuil,
	Kyungmin Park, Kukjin Kim, Sylwester Nawrocki,
	Mauro Carvalho Chehab, linux-arm-kernel, linux-media

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

drivers/media/platform/exynos4-is/media-dev.c:1273:1-3: WARNING: PTR_ERR_OR_ZERO can be used


 Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

Generated by: scripts/coccinelle/api/ptr_ret.cocci

Fixes: 18ffec750578 ("media: exynos4-is: Add missed check for pinctrl_lookup_state()")
CC: Chuhong Yuan <hslester96@gmail.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   git://linuxtv.org/media_tree.git master
head:   8f2a4a9d5ff5202d0b3e3a144ebb9b67aabadd29
commit: 18ffec750578f7447c288647d7282c7d12b1d969 [119/306] media: exynos4-is: Add missed check for pinctrl_lookup_state()

 media-dev.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

--- a/drivers/media/platform/exynos4-is/media-dev.c
+++ b/drivers/media/platform/exynos4-is/media-dev.c
@@ -1270,10 +1270,7 @@ static int fimc_md_get_pinctrl(struct fi
 
 	pctl->state_idle = pinctrl_lookup_state(pctl->pinctrl,
 					PINCTRL_STATE_IDLE);
-	if (IS_ERR(pctl->state_idle))
-		return PTR_ERR(pctl->state_idle);
-
-	return 0;
+	return PTR_ERR_OR_ZERO(pctl->state_idle);
 }
 
 static int cam_clk_prepare(struct clk_hw *hw)

_______________________________________________
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] 8+ messages in thread

* [PATCH] media: exynos4-is: fix ptr_ret.cocci warnings
@ 2020-07-19 13:49   ` kernel test robot
  0 siblings, 0 replies; 8+ messages in thread
From: kernel test robot @ 2020-07-19 13:49 UTC (permalink / raw)
  To: kbuild-all

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

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

drivers/media/platform/exynos4-is/media-dev.c:1273:1-3: WARNING: PTR_ERR_OR_ZERO can be used


 Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

Generated by: scripts/coccinelle/api/ptr_ret.cocci

Fixes: 18ffec750578 ("media: exynos4-is: Add missed check for pinctrl_lookup_state()")
CC: Chuhong Yuan <hslester96@gmail.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   git://linuxtv.org/media_tree.git master
head:   8f2a4a9d5ff5202d0b3e3a144ebb9b67aabadd29
commit: 18ffec750578f7447c288647d7282c7d12b1d969 [119/306] media: exynos4-is: Add missed check for pinctrl_lookup_state()

 media-dev.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

--- a/drivers/media/platform/exynos4-is/media-dev.c
+++ b/drivers/media/platform/exynos4-is/media-dev.c
@@ -1270,10 +1270,7 @@ static int fimc_md_get_pinctrl(struct fi
 
 	pctl->state_idle = pinctrl_lookup_state(pctl->pinctrl,
 					PINCTRL_STATE_IDLE);
-	if (IS_ERR(pctl->state_idle))
-		return PTR_ERR(pctl->state_idle);
-
-	return 0;
+	return PTR_ERR_OR_ZERO(pctl->state_idle);
 }
 
 static int cam_clk_prepare(struct clk_hw *hw)

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

* Re: [PATCH] media: exynos4-is: fix ptr_ret.cocci warnings
  2020-07-19 13:49   ` kernel test robot
  (?)
@ 2020-08-10  9:35     ` Sylwester Nawrocki
  -1 siblings, 0 replies; 8+ messages in thread
From: Sylwester Nawrocki @ 2020-08-10  9:35 UTC (permalink / raw)
  To: kernel test robot, Chuhong Yuan, linux-media
  Cc: kbuild-all, Mauro Carvalho Chehab, Hans Verkuil, Kyungmin Park,
	Kukjin Kim, Krzysztof Kozlowski, linux-arm-kernel,
	linux-samsung-soc

On 19.07.2020 15:49, kernel test robot wrote:
> From: kernel test robot <lkp@intel.com>
> 
> drivers/media/platform/exynos4-is/media-dev.c:1273:1-3: WARNING: PTR_ERR_OR_ZERO can be used
> 
> 
>  Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
> 
> Generated by: scripts/coccinelle/api/ptr_ret.cocci
 
> Fixes: 18ffec750578 ("media: exynos4-is: Add missed check for pinctrl_lookup_state()")

The above commit is incorrect, I'm going to post a patch that
removes the "idle" pinctrl state handling code from the driver
so there is no need to apply the $subject patch.

-- 
Thanks,
Sylwester

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

* Re: [PATCH] media: exynos4-is: fix ptr_ret.cocci warnings
@ 2020-08-10  9:35     ` Sylwester Nawrocki
  0 siblings, 0 replies; 8+ messages in thread
From: Sylwester Nawrocki @ 2020-08-10  9:35 UTC (permalink / raw)
  To: kernel test robot, Chuhong Yuan, linux-media
  Cc: linux-samsung-soc, kbuild-all, Krzysztof Kozlowski, Hans Verkuil,
	Kyungmin Park, Kukjin Kim, Mauro Carvalho Chehab,
	linux-arm-kernel

On 19.07.2020 15:49, kernel test robot wrote:
> From: kernel test robot <lkp@intel.com>
> 
> drivers/media/platform/exynos4-is/media-dev.c:1273:1-3: WARNING: PTR_ERR_OR_ZERO can be used
> 
> 
>  Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
> 
> Generated by: scripts/coccinelle/api/ptr_ret.cocci
 
> Fixes: 18ffec750578 ("media: exynos4-is: Add missed check for pinctrl_lookup_state()")

The above commit is incorrect, I'm going to post a patch that
removes the "idle" pinctrl state handling code from the driver
so there is no need to apply the $subject patch.

-- 
Thanks,
Sylwester

_______________________________________________
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] 8+ messages in thread

* Re: [PATCH] media: exynos4-is: fix ptr_ret.cocci warnings
@ 2020-08-10  9:35     ` Sylwester Nawrocki
  0 siblings, 0 replies; 8+ messages in thread
From: Sylwester Nawrocki @ 2020-08-10  9:35 UTC (permalink / raw)
  To: kbuild-all

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

On 19.07.2020 15:49, kernel test robot wrote:
> From: kernel test robot <lkp@intel.com>
> 
> drivers/media/platform/exynos4-is/media-dev.c:1273:1-3: WARNING: PTR_ERR_OR_ZERO can be used
> 
> 
>  Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
> 
> Generated by: scripts/coccinelle/api/ptr_ret.cocci
 
> Fixes: 18ffec750578 ("media: exynos4-is: Add missed check for pinctrl_lookup_state()")

The above commit is incorrect, I'm going to post a patch that
removes the "idle" pinctrl state handling code from the driver
so there is no need to apply the $subject patch.

-- 
Thanks,
Sylwester

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

end of thread, other threads:[~2020-08-10  9:36 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-19 13:49 [linuxtv-media:master 119/306] drivers/media/platform/exynos4-is/media-dev.c:1273:1-3: WARNING: PTR_ERR_OR_ZERO can be used kernel test robot
2020-07-19 13:49 ` kernel test robot
2020-07-19 13:49 ` [PATCH] media: exynos4-is: fix ptr_ret.cocci warnings kernel test robot
2020-07-19 13:49   ` kernel test robot
2020-07-19 13:49   ` kernel test robot
2020-08-10  9:35   ` Sylwester Nawrocki
2020-08-10  9:35     ` Sylwester Nawrocki
2020-08-10  9:35     ` Sylwester Nawrocki

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.