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 3D341A0547; Mon, 5 Dec 2022 09:02:44 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E8C0B40F18; Mon, 5 Dec 2022 09:02:43 +0100 (CET) Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by mails.dpdk.org (Postfix) with ESMTP id 2D07B40A87; Mon, 5 Dec 2022 09:02:43 +0100 (CET) Received: from dggpemm500008.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4NQbc0521hzRpgY; Mon, 5 Dec 2022 16:01:52 +0800 (CST) Received: from localhost (10.174.242.157) by dggpemm500008.china.huawei.com (7.185.36.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Mon, 5 Dec 2022 16:02:40 +0800 From: Yunjian Wang To: CC: , , , , Yunjian Wang , , Lipei Liang Subject: [dpdk-dev] [PATCH 1/1] eal: fix error log in rte_dev_probe Date: Mon, 5 Dec 2022 16:02:29 +0800 Message-ID: X-Mailer: git-send-email 1.9.5.msysgit.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.174.242.157] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpemm500008.china.huawei.com (7.185.36.136) X-CFilter-Loop: Reflected 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 In the device probing, there is no need to log the error message in the case, that device has been already probed and return with -EEXIST. Fixes: 244d5130719c ("eal: enable hotplug on multi-process") Cc: stable@dpdk.org Signed-off-by: Lipei Liang Signed-off-by: Yunjian Wang --- lib/eal/common/eal_common_dev.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/eal/common/eal_common_dev.c b/lib/eal/common/eal_common_dev.c index 614ef6c9fc..4650216c78 100644 --- a/lib/eal/common/eal_common_dev.c +++ b/lib/eal/common/eal_common_dev.c @@ -264,17 +264,17 @@ rte_dev_probe(const char *devargs) ret = local_dev_probe(devargs, &dev); if (ret != 0) { - RTE_LOG(ERR, EAL, - "Failed to attach device on primary process\n"); - /** * it is possible that secondary process failed to attached a * device that primary process have during initialization, * so for -EEXIST case, we still need to sync with secondary * process. */ - if (ret != -EEXIST) + if (ret != -EEXIST) { + RTE_LOG(ERR, EAL, + "Failed to attach device on primary process\n"); return ret; + } } /* primary send attach sync request to secondary. */ -- 2.27.0