netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <fengguang.wu@intel.com>
To: Hadar Hen Zion <hadarh@mellanox.com>
Cc: kbuild-all@01.org, Poli <a@b.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] net/mlx4_core: Add configfs entries for setting device specific parameters [net-next: fix err_cast.cocci warnings
Date: Mon, 16 Mar 2015 02:01:25 +0800	[thread overview]
Message-ID: <20150315180125.GA87996@athens> (raw)
In-Reply-To: <201503160206.B9vUvBdJ%fengguang.wu@intel.com>

drivers/net/ethernet/mellanox/mlx4/conf.c:218:9-16: WARNING: ERR_CAST can be used with pdev


 Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...))

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

CC: Hadar Hen Zion <hadarh@mellanox.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

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

--- a/drivers/net/ethernet/mellanox/mlx4/conf.c
+++ b/drivers/net/ethernet/mellanox/mlx4/conf.c
@@ -215,7 +215,7 @@ static struct config_group *mlx4_set_con
 
 	pdev = find_pdev_by_name(name);
 	if (IS_ERR(pdev))
-		return ERR_PTR(PTR_ERR(pdev));
+		return ERR_CAST(pdev);
 
 	pdev_config = kzalloc(sizeof(*pdev_config), GFP_KERNEL);
 	if (!pdev_config) {

       reply	other threads:[~2015-03-15 18:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <201503160206.B9vUvBdJ%fengguang.wu@intel.com>
2015-03-15 18:01 ` kbuild test robot [this message]
2015-03-16  2:26   ` [PATCH] net/mlx4_core: Add configfs entries for setting device specific parameters [net-next: fix err_cast.cocci warnings David Miller

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=20150315180125.GA87996@athens \
    --to=fengguang.wu@intel.com \
    --cc=a@b.com \
    --cc=hadarh@mellanox.com \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.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 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).