All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@inria.fr>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [PATCH] gwdpa: gswip: fix odd_ptr_err.cocci warnings
Date: Thu, 20 Feb 2020 15:43:40 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.21.2002201541470.2210@hadrien> (raw)

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

PTR_ERR should typically access the value just tested by IS_ERR

Generated by: scripts/coccinelle/tests/odd_ptr_err.cocci

Fixes: 69fab0a67a95 ("gwdpa: gswip: Introduce Gigabit Ethernet Switch (GSWIP) device driver")
CC: Jack Ping CHNG <jack.ping.chng@linux.intel.com>
Signed-off-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@inria.fr>

---

Maybe the code is correct, but just unnecessarily obscure.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git dev-queue
head:   7a6fc7fc71cf6316739b60fcffdb86e0c43f99b5
commit: 69fab0a67a95208a25af95de20a0301298ee23f6 [43/47] gwdpa: gswip: Introduce Gigabit Ethernet Switch (GSWIP) device driver
:::::: branch date: 9 hours ago
:::::: commit date: 9 hours ago

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

--- a/drivers/net/ethernet/intel/gwdpa/gswip/gswip_dev.c
+++ b/drivers/net/ethernet/intel/gwdpa/gswip/gswip_dev.c
@@ -96,7 +96,7 @@ static int np_gswip_parse_dt(struct plat

 	pdata->sw_clk = devm_clk_get(dev, "switch");
 	if (IS_ERR(pdata->sw_clk))
-		return PTR_ERR(priv->pdata.sw_clk);
+		return PTR_ERR(pdata->sw_clk);

 	for_each_node_by_name(node, GSWIP_MAC_DEV_NAME) {
 		priv->num_subdev_mac++;

WARNING: multiple messages have this Message-ID (diff)
From: Julia Lawall <julia.lawall@inria.fr>
To: kbuild-all@lists.01.org
Subject: [PATCH] gwdpa: gswip: fix odd_ptr_err.cocci warnings
Date: Thu, 20 Feb 2020 15:43:40 +0100	[thread overview]
Message-ID: <alpine.DEB.2.21.2002201541470.2210@hadrien> (raw)

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

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

PTR_ERR should typically access the value just tested by IS_ERR

Generated by: scripts/coccinelle/tests/odd_ptr_err.cocci

Fixes: 69fab0a67a95 ("gwdpa: gswip: Introduce Gigabit Ethernet Switch (GSWIP) device driver")
CC: Jack Ping CHNG <jack.ping.chng@linux.intel.com>
Signed-off-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@inria.fr>

---

Maybe the code is correct, but just unnecessarily obscure.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git dev-queue
head:   7a6fc7fc71cf6316739b60fcffdb86e0c43f99b5
commit: 69fab0a67a95208a25af95de20a0301298ee23f6 [43/47] gwdpa: gswip: Introduce Gigabit Ethernet Switch (GSWIP) device driver
:::::: branch date: 9 hours ago
:::::: commit date: 9 hours ago

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

--- a/drivers/net/ethernet/intel/gwdpa/gswip/gswip_dev.c
+++ b/drivers/net/ethernet/intel/gwdpa/gswip/gswip_dev.c
@@ -96,7 +96,7 @@ static int np_gswip_parse_dt(struct plat

 	pdata->sw_clk = devm_clk_get(dev, "switch");
 	if (IS_ERR(pdata->sw_clk))
-		return PTR_ERR(priv->pdata.sw_clk);
+		return PTR_ERR(pdata->sw_clk);

 	for_each_node_by_name(node, GSWIP_MAC_DEV_NAME) {
 		priv->num_subdev_mac++;

WARNING: multiple messages have this Message-ID (diff)
From: Julia Lawall <julia.lawall@inria.fr>
To: Jack Ping CHNG <jack.ping.chng@linux.intel.com>
Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>,
	Amireddy Mallikarjuna reddy 
	<mallikarjunax.reddy@linux.intel.com>,
	intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, kbuild-all@lists.01.org
Subject: [PATCH] gwdpa: gswip: fix odd_ptr_err.cocci warnings
Date: Thu, 20 Feb 2020 15:43:40 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.21.2002201541470.2210@hadrien> (raw)

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

PTR_ERR should typically access the value just tested by IS_ERR

Generated by: scripts/coccinelle/tests/odd_ptr_err.cocci

Fixes: 69fab0a67a95 ("gwdpa: gswip: Introduce Gigabit Ethernet Switch (GSWIP) device driver")
CC: Jack Ping CHNG <jack.ping.chng@linux.intel.com>
Signed-off-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@inria.fr>

---

Maybe the code is correct, but just unnecessarily obscure.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git dev-queue
head:   7a6fc7fc71cf6316739b60fcffdb86e0c43f99b5
commit: 69fab0a67a95208a25af95de20a0301298ee23f6 [43/47] gwdpa: gswip: Introduce Gigabit Ethernet Switch (GSWIP) device driver
:::::: branch date: 9 hours ago
:::::: commit date: 9 hours ago

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

--- a/drivers/net/ethernet/intel/gwdpa/gswip/gswip_dev.c
+++ b/drivers/net/ethernet/intel/gwdpa/gswip/gswip_dev.c
@@ -96,7 +96,7 @@ static int np_gswip_parse_dt(struct plat

 	pdata->sw_clk = devm_clk_get(dev, "switch");
 	if (IS_ERR(pdata->sw_clk))
-		return PTR_ERR(priv->pdata.sw_clk);
+		return PTR_ERR(pdata->sw_clk);

 	for_each_node_by_name(node, GSWIP_MAC_DEV_NAME) {
 		priv->num_subdev_mac++;

             reply	other threads:[~2020-02-20 14:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-20 14:43 Julia Lawall [this message]
2020-02-20 14:43 ` [PATCH] gwdpa: gswip: fix odd_ptr_err.cocci warnings Julia Lawall
2020-02-20 14:43 ` Julia Lawall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.21.2002201541470.2210@hadrien \
    --to=julia.lawall@inria.fr \
    --cc=intel-wired-lan@osuosl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.