From patchwork Sun Mar 15 18:01:25 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: kbuild test robot X-Patchwork-Id: 450325 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 70DAF1400A0 for ; Mon, 16 Mar 2015 05:02:28 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753175AbbCOSCY (ORCPT ); Sun, 15 Mar 2015 14:02:24 -0400 Received: from mga01.intel.com ([192.55.52.88]:1955 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752097AbbCOSCW (ORCPT ); Sun, 15 Mar 2015 14:02:22 -0400 Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP; 15 Mar 2015 11:02:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,405,1422950400"; d="scan'208";a="467577346" Received: from bee.sh.intel.com (HELO bee) ([10.239.97.14]) by FMSMGA003.fm.intel.com with ESMTP; 15 Mar 2015 10:55:14 -0700 Received: from kbuild by bee with local (Exim 4.83) (envelope-from ) id 1YXCri-000EbK-Vx; Mon, 16 Mar 2015 02:02:19 +0800 Date: Mon, 16 Mar 2015 02:01:25 +0800 From: kbuild test robot To: Hadar Hen Zion Cc: kbuild-all@01.org, Poli , 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 Message-ID: <20150315180125.GA87996@athens> References: <201503160206.B9vUvBdJ%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <201503160206.B9vUvBdJ%fengguang.wu@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: fengguang.wu@intel.com X-SA-Exim-Scanned: No (on bee); SAEximRunCond expanded to false Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 Signed-off-by: Fengguang Wu --- 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 --- 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) {