From mboxrd@z Thu Jan 1 00:00:00 1970 From: kbuild test robot Subject: [PATCH] qed: fix simple_return.cocci warnings Date: Wed, 30 Sep 2015 21:33:28 +0800 Message-ID: <20150930133328.GA193090@lkp-ib03> References: <201509302130.SXWHwgAF%fengguang.wu@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kbuild-all@01.org, netdev@vger.kernel.org, Ariel.Elior@qlogic.com, Yuval.Mintz@qlogic.com To: Yuval Mintz Return-path: 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 Content-Disposition: inline In-Reply-To: <1443618217-18069-2-git-send-email-Yuval.Mintz@qlogic.com> Sender: netdev-owner@vger.kernel.org List-ID: 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(-) --- 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,