bus/fslmc: fix global variable multiple definitions
authorFerruh Yigit <ferruh.yigit@intel.com>
Thu, 5 Sep 2019 14:53:06 +0000 (15:53 +0100)
committerDavid Marchand <david.marchand@redhat.com>
Fri, 25 Oct 2019 21:16:22 +0000 (23:16 +0200)
'qman_version' 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: 293c0ca94c36 ("bus/fslmc: support memory backed portals with QBMAN 5.0")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Sachin Saxena <sachin.saxena@nxp.com>
drivers/bus/fslmc/qbman/qbman_portal.c
drivers/bus/fslmc/qbman/qbman_portal.h

index e6066ce..12a7181 100644 (file)
@@ -61,6 +61,8 @@ enum qbman_sdqcr_fc {
 #define MAX_QBMAN_PORTALS  64
 static struct qbman_swp *portal_idx_map[MAX_QBMAN_PORTALS];
 
+uint32_t qman_version;
+
 /* Internal Function declaration */
 static int
 qbman_swp_enqueue_array_mode_direct(struct qbman_swp *s,
index e54f266..0e9de8a 100644 (file)
@@ -11,7 +11,7 @@
 #include "qbman_sys.h"
 #include <fsl_qbman_portal.h>
 
-uint32_t qman_version;
+extern uint32_t qman_version;
 #define QMAN_REV_4000   0x04000000
 #define QMAN_REV_4100   0x04010000
 #define QMAN_REV_4101   0x04010001