From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 68CE5A0524; Tue, 20 Apr 2021 11:54:34 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 46467416C2; Tue, 20 Apr 2021 11:54:34 +0200 (CEST) Received: from szxga07-in.huawei.com (szxga07-in.huawei.com [45.249.212.35]) by mails.dpdk.org (Postfix) with ESMTP id 4889B411A5 for ; Tue, 20 Apr 2021 11:54:33 +0200 (CEST) Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4FPf9P4Vlmz7wMd; Tue, 20 Apr 2021 17:52:09 +0800 (CST) Received: from [10.67.103.128] (10.67.103.128) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.498.0; Tue, 20 Apr 2021 17:54:26 +0800 To: Andrew Rybchenko , CC: , , , , , , , References: <1618839289-33224-1-git-send-email-humin29@huawei.com> <1618839289-33224-4-git-send-email-humin29@huawei.com> From: "Min Hu (Connor)" Message-ID: <12152b43-42e2-0459-6b88-26b96bb8129b@huawei.com> Date: Tue, 20 Apr 2021 17:54:25 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.103.128] X-CFilter-Loop: Reflected Subject: Re: [dpdk-dev] [PATCH 03/10] bus/dpaa: fix management command init calling X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 在 2021/4/20 17:35, Andrew Rybchenko 写道: > On 4/19/21 4:34 PM, Min Hu (Connor) wrote: >> 'bm_mc_init' only return 0, but the function whicl calls int >> check the negative ret, and this is redundant. >> >> This patch fixed it by not checking the return value. >> >> Fixes: f38f61e982f8 ("bus/dpaa: add BMAN hardware interfaces") >> Cc: stable@dpdk.org >> >> Signed-off-by: Min Hu (Connor) >> --- >> drivers/bus/dpaa/base/qbman/bman.c | 6 ++---- >> 1 file changed, 2 insertions(+), 4 deletions(-) >> >> diff --git a/drivers/bus/dpaa/base/qbman/bman.c b/drivers/bus/dpaa/base/qbman/bman.c >> index 8a62907..e1ba2a8 100644 >> --- a/drivers/bus/dpaa/base/qbman/bman.c >> +++ b/drivers/bus/dpaa/base/qbman/bman.c >> @@ -70,10 +70,8 @@ struct bman_portal *bman_create_portal(struct bman_portal *portal, >> pr_err("Bman RCR initialisation failed\n"); >> return NULL; >> } >> - if (bm_mc_init(p)) { >> - pr_err("Bman MC initialisation failed\n"); >> - goto fail_mc; >> - } >> + (void)bm_mc_init(p); >> + > > As I understand compiler can do it for you and there is no > point to break the code in the case of future changes if > bm_mc_init() starts to return errors. > Agreed, this patch can be abandoned. >> portal->pools = kmalloc(2 * sizeof(*pools), GFP_KERNEL); >> if (!portal->pools) >> goto fail_pools; >> > > . >