From patchwork Sat Oct 10 12:24:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: kernel test robot X-Patchwork-Id: 528616 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 8A7E71402D8 for ; Sat, 10 Oct 2015 23:25:37 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751842AbbJJMZd (ORCPT ); Sat, 10 Oct 2015 08:25:33 -0400 Received: from mga03.intel.com ([134.134.136.65]:50624 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750731AbbJJMZc (ORCPT ); Sat, 10 Oct 2015 08:25:32 -0400 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP; 10 Oct 2015 05:25:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,663,1437462000"; d="scan'208";a="807905273" Received: from bee.sh.intel.com (HELO bee) ([10.239.97.14]) by fmsmga001.fm.intel.com with ESMTP; 10 Oct 2015 05:25:31 -0700 Received: from kbuild by bee with local (Exim 4.83) (envelope-from ) id 1ZktDC-000X06-EI; Sat, 10 Oct 2015 20:25:18 +0800 Date: Sat, 10 Oct 2015 20:24:22 +0800 From: kbuild test robot To: Michael Chan Cc: kbuild-all@01.org, davem@davemloft.net, netdev@vger.kernel.org Subject: [PATCH] bnxt_en: fix returnvar.cocci warnings Message-ID: <20151010122422.GA58534@ivytown2> References: <201510102046.oAPUHudL%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1444477151-2225-1-git-send-email-mchan@broadcom.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/broadcom/bnxt/bnxt_ethtool.c:521:5-7: Unneeded variable: "rc". Return "0" on line 595 Remove unneeded variable used to store return value. Generated by: scripts/coccinelle/misc/returnvar.cocci CC: Michael Chan Signed-off-by: Fengguang Wu --- Please take the patch only if it's a positive warning. Thanks! bnxt_ethtool.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 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/broadcom/bnxt/bnxt_ethtool.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c @@ -518,7 +518,6 @@ u32 bnxt_fw_to_ethtool_speed(u16 fw_link static int bnxt_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) { - int rc = 0; struct bnxt *bp = netdev_priv(dev); struct bnxt_link_info *link_info = &bp->link_info; u16 ethtool_speed; @@ -592,7 +591,7 @@ static int bnxt_get_settings(struct net_ cmd->transceiver = XCVR_EXTERNAL; cmd->phy_address = link_info->phy_addr; - return rc; + return 0; } static u32 bnxt_get_fw_speed(struct net_device *dev, u16 ethtool_speed)