diff mbox

net/mlx4_core: Add configfs entries for setting device specific parameters [net-next: fix err_cast.cocci warnings

Message ID 20150315180125.GA87996@athens
State Changes Requested, archived
Delegated to: David Miller
Headers show

Commit Message

kbuild test robot March 15, 2015, 6:01 p.m. UTC
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(-)

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

David Miller March 16, 2015, 2:26 a.m. UTC | #1
From: kbuild test robot <fengguang.wu@intel.com>
Date: Mon, 16 Mar 2015 02:01:25 +0800

> 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>

Doesn't even come close to applying to net-next, please respin.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

--- 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) {