All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-next:master 3775/3988] drivers/net/phy/mscc/mscc_ptp.c:1496:1-3: WARNING: PTR_ERR_OR_ZERO can be used
@ 2020-06-26  1:05 kernel test robot
  2020-06-26  1:05   ` kernel test robot
  0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2020-06-26  1:05 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   3f9437c6234d95d96967f1b438a4fb71b6be254d
commit: 7d272e63e0979d38a6256108adbe462d621c26c5 [3775/3988] net: phy: mscc: timestamping and PHC support
config: riscv-randconfig-c022-20200624 (attached as .config)
compiler: riscv64-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/net/phy/mscc/mscc_ptp.c:1496: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: 29376 bytes --]

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

* [PATCH] net: phy: mscc: fix ptr_ret.cocci warnings
  2020-06-26  1:05 [linux-next:master 3775/3988] drivers/net/phy/mscc/mscc_ptp.c:1496:1-3: WARNING: PTR_ERR_OR_ZERO can be used kernel test robot
@ 2020-06-26  1:05   ` kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2020-06-26  1:05 UTC (permalink / raw)
  To: Antoine Tenart
  Cc: kbuild-all, Quentin Schulz, Andrew Lunn, Florian Fainelli,
	Heiner Kallweit, Russell King, Jakub Kicinski, netdev,
	linux-kernel

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

drivers/net/phy/mscc/mscc_ptp.c:1496: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: 7d272e63e097 ("net: phy: mscc: timestamping and PHC support")
CC: Antoine Tenart <antoine.tenart@bootlin.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   3f9437c6234d95d96967f1b438a4fb71b6be254d
commit: 7d272e63e0979d38a6256108adbe462d621c26c5 [3775/3988] net: phy: mscc: timestamping and PHC support

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

--- a/drivers/net/phy/mscc/mscc_ptp.c
+++ b/drivers/net/phy/mscc/mscc_ptp.c
@@ -1493,10 +1493,7 @@ static int __vsc8584_init_ptp(struct phy
 
 	vsc8531->ptp->ptp_clock = ptp_clock_register(&vsc8531->ptp->caps,
 						     &phydev->mdio.dev);
-	if (IS_ERR(vsc8531->ptp->ptp_clock))
-		return PTR_ERR(vsc8531->ptp->ptp_clock);
-
-	return 0;
+	return PTR_ERR_OR_ZERO(vsc8531->ptp->ptp_clock);
 }
 
 void vsc8584_config_ts_intr(struct phy_device *phydev)

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

* [PATCH] net: phy: mscc: fix ptr_ret.cocci warnings
@ 2020-06-26  1:05   ` kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2020-06-26  1:05 UTC (permalink / raw)
  To: kbuild-all

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

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

drivers/net/phy/mscc/mscc_ptp.c:1496: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: 7d272e63e097 ("net: phy: mscc: timestamping and PHC support")
CC: Antoine Tenart <antoine.tenart@bootlin.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   3f9437c6234d95d96967f1b438a4fb71b6be254d
commit: 7d272e63e0979d38a6256108adbe462d621c26c5 [3775/3988] net: phy: mscc: timestamping and PHC support

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

--- a/drivers/net/phy/mscc/mscc_ptp.c
+++ b/drivers/net/phy/mscc/mscc_ptp.c
@@ -1493,10 +1493,7 @@ static int __vsc8584_init_ptp(struct phy
 
 	vsc8531->ptp->ptp_clock = ptp_clock_register(&vsc8531->ptp->caps,
 						     &phydev->mdio.dev);
-	if (IS_ERR(vsc8531->ptp->ptp_clock))
-		return PTR_ERR(vsc8531->ptp->ptp_clock);
-
-	return 0;
+	return PTR_ERR_OR_ZERO(vsc8531->ptp->ptp_clock);
 }
 
 void vsc8584_config_ts_intr(struct phy_device *phydev)

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

end of thread, other threads:[~2020-06-26  1:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-26  1:05 [linux-next:master 3775/3988] drivers/net/phy/mscc/mscc_ptp.c:1496:1-3: WARNING: PTR_ERR_OR_ZERO can be used kernel test robot
2020-06-26  1:05 ` [PATCH] net: phy: mscc: fix ptr_ret.cocci warnings kernel test robot
2020-06-26  1:05   ` kernel test robot

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.