All global variables in kernel should be prefixed by the same
to avoid any symbol conflics. Rename dflt_carrier to kni_default_carrier.

Fixes: 89397a01ce4a ("kni: set default carrier state of interface")
Cc: d...@adax.com
Cc: sta...@dpdk.org
Signed-off-by: Stephen Hemminger <step...@networkplumber.org>
---
 kernel/linux/kni/kni_dev.h  |  2 +-
 kernel/linux/kni/kni_misc.c | 10 +++++-----
 kernel/linux/kni/kni_net.c  |  2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/kernel/linux/kni/kni_dev.h b/kernel/linux/kni/kni_dev.h
index 5e75c6371f22..ca5f92a47b70 100644
--- a/kernel/linux/kni/kni_dev.h
+++ b/kernel/linux/kni/kni_dev.h
@@ -32,7 +32,7 @@
 #define MBUF_BURST_SZ 32
 
 /* Default carrier state for created KNI network interfaces */
-extern uint32_t dflt_carrier;
+extern uint32_t kni_dflt_carrier;
 
 /**
  * A structure describing the private information for a kni device.
diff --git a/kernel/linux/kni/kni_misc.c b/kernel/linux/kni/kni_misc.c
index cda71bde08e1..2b464c438113 100644
--- a/kernel/linux/kni/kni_misc.c
+++ b/kernel/linux/kni/kni_misc.c
@@ -39,7 +39,7 @@ static uint32_t multiple_kthread_on;
 
 /* Default carrier state for created KNI network interfaces */
 static char *carrier;
-uint32_t dflt_carrier;
+uint32_t kni_dflt_carrier;
 
 #define KNI_DEV_IN_USE_BIT_NUM 0 /* Bit number for device in use */
 
@@ -554,14 +554,14 @@ static int __init
 kni_parse_carrier_state(void)
 {
        if (!carrier) {
-               dflt_carrier = 0;
+               kni_dflt_carrier = 0;
                return 0;
        }
 
        if (strcmp(carrier, "off") == 0)
-               dflt_carrier = 0;
+               kni_dflt_carrier = 0;
        else if (strcmp(carrier, "on") == 0)
-               dflt_carrier = 1;
+               kni_dflt_carrier = 1;
        else
                return -1;
 
@@ -588,7 +588,7 @@ kni_init(void)
                return -EINVAL;
        }
 
-       if (dflt_carrier == 0)
+       if (kni_dflt_carrier == 0)
                pr_debug("Default carrier state set to off.\n");
        else
                pr_debug("Default carrier state set to on.\n");
diff --git a/kernel/linux/kni/kni_net.c b/kernel/linux/kni/kni_net.c
index 1ba9b1b99f66..97fe85be9ac6 100644
--- a/kernel/linux/kni/kni_net.c
+++ b/kernel/linux/kni/kni_net.c
@@ -158,7 +158,7 @@ kni_net_open(struct net_device *dev)
        struct kni_dev *kni = netdev_priv(dev);
 
        netif_start_queue(dev);
-       if (dflt_carrier == 1)
+       if (kni_dflt_carrier == 1)
                netif_carrier_on(dev);
        else
                netif_carrier_off(dev);
-- 
2.20.1

Reply via email to