dma/dpaa2: fix logtype register

Message ID 20231218154639.1508095-1-david.marchand@redhat.com (mailing list archive)
State Accepted, archived
Delegated to: David Marchand
Headers
Series dma/dpaa2: fix logtype register |

Checks

Context Check Description
ci/checkpatch warning coding style issues
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/github-robot: build success github build: passed
ci/iol-abi-testing success Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/iol-sample-apps-testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS
ci/intel-Functional success Functional PASS

Commit Message

David Marchand Dec. 18, 2023, 3:46 p.m. UTC
  This driver logtype was not initialized so its logs would end up under
the 0 logtype, iow, RTE_LOGTYPE_EAL.
This issue comes from a typo on the logtype variable name.

Fixes: 8caf8427f85a ("dma/dpaa2: introduce driver skeleton")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 drivers/dma/dpaa2/dpaa2_qdma.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
  

Comments

Stephen Hemminger Dec. 18, 2023, 4:34 p.m. UTC | #1
On Mon, 18 Dec 2023 16:46:39 +0100
David Marchand <david.marchand@redhat.com> wrote:

> This driver logtype was not initialized so its logs would end up under
> the 0 logtype, iow, RTE_LOGTYPE_EAL.
> This issue comes from a typo on the logtype variable name.
> 
> Fixes: 8caf8427f85a ("dma/dpaa2: introduce driver skeleton")
> Cc: stable@dpdk.org
> 
> Signed-off-by: David Marchand <david.marchand@redhat.com>

Good catch

Acked-by: Stephen Hemminger <stephen@networkplumber.org>
  
Hemant Agrawal Dec. 18, 2023, 4:43 p.m. UTC | #2
> -----Original Message-----
> From: David Marchand <david.marchand@redhat.com>
> Sent: Monday, December 18, 2023 9:17 PM
> To: dev@dpdk.org
> Cc: stable@dpdk.org; Gagandeep Singh <G.Singh@nxp.com>; Hemant Agrawal
> <hemant.agrawal@nxp.com>; Nipun Gupta <nipun.gupta@amd.com>
> Subject: [PATCH] dma/dpaa2: fix logtype register
> Importance: High
> 
> This driver logtype was not initialized so its logs would end up under the
0
> logtype, iow, RTE_LOGTYPE_EAL.
> This issue comes from a typo on the logtype variable name.
> 
> Fixes: 8caf8427f85a ("dma/dpaa2: introduce driver skeleton")
> Cc: stable@dpdk.org
> 
> Signed-off-by: David Marchand <david.marchand@redhat.com>

[Hemant] Thanks
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>

> ---
>  drivers/dma/dpaa2/dpaa2_qdma.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/dma/dpaa2/dpaa2_qdma.c
> b/drivers/dma/dpaa2/dpaa2_qdma.c index 8968bb853b..2c91ceec13 100644
> --- a/drivers/dma/dpaa2/dpaa2_qdma.c
> +++ b/drivers/dma/dpaa2/dpaa2_qdma.c
> @@ -16,9 +16,6 @@
> 
>  #define DPAA2_QDMA_PREFETCH "prefetch"
> 
> -/* Dynamic log type identifier */
> -int dpaa2_qdma_logtype;
> -
>  uint32_t dpaa2_coherent_no_alloc_cache;  uint32_t
> dpaa2_coherent_alloc_cache;
> 
> @@ -1699,4 +1696,4 @@ static struct rte_dpaa2_driver
> rte_dpaa2_qdma_pmd = {  RTE_PMD_REGISTER_DPAA2(dpaa2_qdma,
> rte_dpaa2_qdma_pmd);  RTE_PMD_REGISTER_PARAM_STRING(dpaa2_qdma,
>  	"no_prefetch=<int> ");
> -RTE_LOG_REGISTER_DEFAULT(dpaa_qdma2_logtype, INFO);
> +RTE_LOG_REGISTER_DEFAULT(dpaa2_qdma_logtype, INFO);
> --
> 2.43.0
  
David Marchand Jan. 19, 2024, 11:08 a.m. UTC | #3
On Mon, Dec 18, 2023 at 4:46 PM David Marchand
<david.marchand@redhat.com> wrote:
>
> This driver logtype was not initialized so its logs would end up under
> the 0 logtype, iow, RTE_LOGTYPE_EAL.
> This issue comes from a typo on the logtype variable name.
>
> Fixes: 8caf8427f85a ("dma/dpaa2: introduce driver skeleton")
> Cc: stable@dpdk.org
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>

Applied, thanks.
  

Patch

diff --git a/drivers/dma/dpaa2/dpaa2_qdma.c b/drivers/dma/dpaa2/dpaa2_qdma.c
index 8968bb853b..2c91ceec13 100644
--- a/drivers/dma/dpaa2/dpaa2_qdma.c
+++ b/drivers/dma/dpaa2/dpaa2_qdma.c
@@ -16,9 +16,6 @@ 
 
 #define DPAA2_QDMA_PREFETCH "prefetch"
 
-/* Dynamic log type identifier */
-int dpaa2_qdma_logtype;
-
 uint32_t dpaa2_coherent_no_alloc_cache;
 uint32_t dpaa2_coherent_alloc_cache;
 
@@ -1699,4 +1696,4 @@  static struct rte_dpaa2_driver rte_dpaa2_qdma_pmd = {
 RTE_PMD_REGISTER_DPAA2(dpaa2_qdma, rte_dpaa2_qdma_pmd);
 RTE_PMD_REGISTER_PARAM_STRING(dpaa2_qdma,
 	"no_prefetch=<int> ");
-RTE_LOG_REGISTER_DEFAULT(dpaa_qdma2_logtype, INFO);
+RTE_LOG_REGISTER_DEFAULT(dpaa2_qdma_logtype, INFO);