crypto/null: fix global variable multiple definitions
authorFerruh Yigit <ferruh.yigit@intel.com>
Thu, 5 Sep 2019 14:53:08 +0000 (15:53 +0100)
committerDavid Marchand <david.marchand@redhat.com>
Fri, 25 Oct 2019 21:16:23 +0000 (23:16 +0200)
'null_logtype_driver' global variable is defined in a header file which
was causing multiple definitions of the variable, fixed it by moving it
to the .c file.

Issue has been detected by '-fno-common' gcc flag.

Fixes: 735b783d8c2b ("crypto/null: add dynamic logging")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
drivers/crypto/null/null_crypto_pmd.c
drivers/crypto/null/null_crypto_pmd_private.h

index d5e3064..f11636c 100644 (file)
@@ -10,6 +10,7 @@
 #include "null_crypto_pmd_private.h"
 
 static uint8_t cryptodev_driver_id;
+int null_logtype_driver;
 
 /** verify and set session parameters */
 int
index d7bfd9c..89c4345 100644 (file)
@@ -8,7 +8,7 @@
 #define CRYPTODEV_NAME_NULL_PMD                crypto_null
 /**< Null crypto PMD device name */
 
-int null_logtype_driver;
+extern int null_logtype_driver;
 
 #define NULL_LOG(level, fmt, ...)  \
        rte_log(RTE_LOG_ ## level, null_logtype_driver,  \