From patchwork Wed Sep 30 13:33:28 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: 524415 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 2CC2F140D4F for ; Wed, 30 Sep 2015 23:34:24 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755159AbbI3NeU (ORCPT ); Wed, 30 Sep 2015 09:34:20 -0400 Received: from mga11.intel.com ([192.55.52.93]:50541 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752419AbbI3NeT (ORCPT ); Wed, 30 Sep 2015 09:34:19 -0400 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga102.fm.intel.com with ESMTP; 30 Sep 2015 06:34:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,612,1437462000"; d="scan'208";a="780921003" Received: from bee.sh.intel.com (HELO bee) ([10.239.97.14]) by orsmga001.jf.intel.com with ESMTP; 30 Sep 2015 06:34:18 -0700 Received: from kbuild by bee with local (Exim 4.83) (envelope-from ) id 1ZhHWI-0003pi-Ij; Wed, 30 Sep 2015 21:34:06 +0800 Date: Wed, 30 Sep 2015 21:33:28 +0800 From: kbuild test robot To: Yuval Mintz Cc: kbuild-all@01.org, netdev@vger.kernel.org, Ariel.Elior@qlogic.com, Yuval.Mintz@qlogic.com Subject: [PATCH] qed: fix simple_return.cocci warnings Message-ID: <20150930133328.GA193090@lkp-ib03> References: <201509302130.SXWHwgAF%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1443618217-18069-2-git-send-email-Yuval.Mintz@qlogic.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/qlogic/qed/qed_spq.c:673:1-3: WARNING: end returns can be simpified Simplify a trivial if-return sequence. Possibly combine with a preceding function call. Generated by: scripts/coccinelle/misc/simple_return.cocci CC: Yuval Mintz Signed-off-by: Fengguang Wu --- qed_spq.c | 6 +----- 1 file changed, 1 insertion(+), 5 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/qlogic/qed/qed_spq.c +++ b/drivers/net/ethernet/qlogic/qed/qed_spq.c @@ -670,13 +670,9 @@ static int qed_spq_pend_post(struct qed_ qed_spq_add_entry(p_hwfn, p_ent, p_ent->priority); } - rc = qed_spq_post_list(p_hwfn, + return qed_spq_post_list(p_hwfn, &p_spq->pending, SPQ_HIGH_PRI_RESERVE_DEFAULT); - if (rc) - return rc; - - return 0; } int qed_spq_post(struct qed_hwfn *p_hwfn,