From patchwork Thu Feb 22 09:13:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Duszynski X-Patchwork-Id: 136994 X-Patchwork-Delegate: jerinj@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 994EA43B73; Thu, 22 Feb 2024 10:13:28 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6710F402DA; Thu, 22 Feb 2024 10:13:28 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 95B6C40281 for ; Thu, 22 Feb 2024 10:13:27 +0100 (CET) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 41LNpF6Y007495; Thu, 22 Feb 2024 01:13:26 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding:content-type; s=pfpt0220; bh=OUMOvIBw W5fNrgquaX5ql4CyJKekzgx0bJSelFVlPPQ=; b=HERa/0SJ2oYcxqXuYmhq76mW k/MVmhXMv2cpC6PRa5Zg7N9DqtUxfywKIS0ocG5WC5T+W6RB2cOD9h0xdChA6KDS shyiGEsg1jDICveBgQ04ZxBJk+wijmcWrDIeBCZPUSa5f0rYEaeSnX6bvwWXMg5f 1Jt+TV7XpM9c8m230buMYsfz/amn9Js62P1qgaOPqZaGyoQImhnx6E3Pd/qbsZPk gG1QKsBRLXsJK70c4l7i8M1/YQgYVV832Qo7rKW7Zsklua9bV/z00SrmQCnKNHQu aZdMa+04Verq8vOc9SDcT5Px2RvCvFmK1o0zyrAtEd09oCTLAQiXmac1eq8Frw== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3wd21kfvqe-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 22 Feb 2024 01:13:26 -0800 (PST) Received: from DC5-EXCH05.marvell.com (10.69.176.209) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Thu, 22 Feb 2024 01:13:24 -0800 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH05.marvell.com (10.69.176.209) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.1258.12; Thu, 22 Feb 2024 01:13:24 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Thu, 22 Feb 2024 01:13:23 -0800 Received: from localhost.localdomain (unknown [10.28.34.39]) by maili.marvell.com (Postfix) with ESMTP id 7CEE03F7078; Thu, 22 Feb 2024 01:13:22 -0800 (PST) From: Tomasz Duszynski To: CC: , , Tomasz Duszynski Subject: [PATCH] raw/cnxk_bphy: use standard log calls Date: Thu, 22 Feb 2024 10:13:13 +0100 Message-ID: <20240222091313.4030144-1-tduszynski@marvell.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Proofpoint-GUID: A2IH2CMfNaKWoISIylE7tF_rV5IiB2jU X-Proofpoint-ORIG-GUID: A2IH2CMfNaKWoISIylE7tF_rV5IiB2jU X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-22_06,2024-02-22_01,2023-05-22_02 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 Use standard logging functions from DPDK instead of platform ones. Signed-off-by: Tomasz Duszynski --- drivers/raw/cnxk_bphy/cnxk_bphy.c | 27 +++++++++++++-------------- drivers/raw/cnxk_bphy/cnxk_bphy_irq.c | 2 +- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/drivers/raw/cnxk_bphy/cnxk_bphy.c b/drivers/raw/cnxk_bphy/cnxk_bphy.c index 1dbab6fb3e..57f77297a8 100644 --- a/drivers/raw/cnxk_bphy/cnxk_bphy.c +++ b/drivers/raw/cnxk_bphy/cnxk_bphy.c @@ -81,21 +81,21 @@ bphy_rawdev_selftest(uint16_t dev_id) goto err_desc; if (descs != 1) { ret = -ENODEV; - plt_err("Wrong number of descs reported\n"); + CNXK_BPHY_LOG(ERR, "Wrong number of descs reported"); goto err_desc; } ret = rte_pmd_bphy_npa_pf_func_get(dev_id, &pf_func); if (ret || pf_func == 0) - plt_warn("NPA pf_func is invalid"); + CNXK_BPHY_LOG(WARNING, "NPA pf_func is invalid"); ret = rte_pmd_bphy_sso_pf_func_get(dev_id, &pf_func); if (ret || pf_func == 0) - plt_warn("SSO pf_func is invalid"); + CNXK_BPHY_LOG(WARNING, "SSO pf_func is invalid"); ret = rte_pmd_bphy_intr_init(dev_id); if (ret) { - plt_err("intr init failed"); + CNXK_BPHY_LOG(ERR, "intr init failed"); return ret; } @@ -103,7 +103,7 @@ bphy_rawdev_selftest(uint16_t dev_id) test = rte_zmalloc("BPHY", max_irq * sizeof(*test), 0); if (test == NULL) { - plt_err("intr alloc failed"); + CNXK_BPHY_LOG(ERR, "intr alloc failed"); goto err_alloc; } @@ -132,7 +132,7 @@ bphy_rawdev_selftest(uint16_t dev_id) } if (ret) { - plt_err("intr register failed at irq %d", i); + CNXK_BPHY_LOG(ERR, "intr register failed at irq %d", i); goto err_register; } } @@ -142,12 +142,12 @@ bphy_rawdev_selftest(uint16_t dev_id) for (i = 0; i < max_irq; i++) { if (!test[i].handled_intr) { - plt_err("intr %u not handled", i); + CNXK_BPHY_LOG(ERR, "intr %u not handled", i); ret = -1; break; } if (test[i].handled_data != test[i].test_data) { - plt_err("intr %u has wrong handler", i); + CNXK_BPHY_LOG(ERR, "intr %u has wrong handler", i); ret = -1; break; } @@ -332,9 +332,8 @@ bphy_rawdev_probe(struct rte_pci_driver *pci_drv, return 0; if (!pci_dev->mem_resource[0].addr) { - plt_err("BARs have invalid values: BAR0 %p\n BAR2 %p", - pci_dev->mem_resource[0].addr, - pci_dev->mem_resource[2].addr); + CNXK_BPHY_LOG(ERR, "BARs have invalid values: BAR0 %p\n BAR2 %p", + pci_dev->mem_resource[0].addr, pci_dev->mem_resource[2].addr); return -ENODEV; } @@ -346,7 +345,7 @@ bphy_rawdev_probe(struct rte_pci_driver *pci_drv, bphy_rawdev = rte_rawdev_pmd_allocate(name, sizeof(*bphy_dev), rte_socket_id()); if (bphy_rawdev == NULL) { - plt_err("Failed to allocate rawdev"); + CNXK_BPHY_LOG(ERR, "Failed to allocate rawdev"); return -ENOMEM; } @@ -381,14 +380,14 @@ bphy_rawdev_remove(struct rte_pci_device *pci_dev) return 0; if (pci_dev == NULL) { - plt_err("invalid pci_dev"); + CNXK_BPHY_LOG(ERR, "invalid pci_dev"); return -EINVAL; } bphy_rawdev_get_name(name, pci_dev); rawdev = rte_rawdev_pmd_get_named_dev(name); if (rawdev == NULL) { - plt_err("invalid device name (%s)", name); + CNXK_BPHY_LOG(ERR, "invalid device name (%s)", name); return -EINVAL; } diff --git a/drivers/raw/cnxk_bphy/cnxk_bphy_irq.c b/drivers/raw/cnxk_bphy/cnxk_bphy_irq.c index b424d6127d..8978f03825 100644 --- a/drivers/raw/cnxk_bphy/cnxk_bphy_irq.c +++ b/drivers/raw/cnxk_bphy/cnxk_bphy_irq.c @@ -87,7 +87,7 @@ cnxk_bphy_intr_unregister(uint16_t dev_id, int irq_num) if (bphy_dev->irq_chip) roc_bphy_intr_clear(bphy_dev->irq_chip, irq_num); else - plt_err("Missing irq chip"); + CNXK_BPHY_LOG(ERR, "Missing irq chip"); } struct cnxk_bphy_mem *