net/sfc: use compat for 128-bit unsigned integer
[dpdk.git] / drivers / net / ipn3ke / ipn3ke_ethdev.c
index 5b5510f..4446d2a 100644 (file)
@@ -26,8 +26,6 @@
 #include "ipn3ke_logs.h"
 #include "ipn3ke_ethdev.h"
 
-int ipn3ke_afu_logtype;
-
 static const struct rte_afu_uuid afu_uuid_ipn3ke_map[] = {
        { MAP_UUID_10G_LOW,  MAP_UUID_10G_HIGH },
        { IPN3KE_UUID_10G_LOW, IPN3KE_UUID_10G_HIGH },
@@ -564,10 +562,8 @@ static int ipn3ke_vswitch_remove(struct rte_afu_device *afu_dev)
                        afu_dev->device.name, i);
 
                ethdev = rte_eth_dev_allocated(afu_dev->device.name);
-               if (!ethdev)
-                       return -ENODEV;
-
-               rte_eth_dev_destroy(ethdev, ipn3ke_rpst_uninit);
+               if (ethdev != NULL)
+                       rte_eth_dev_destroy(ethdev, ipn3ke_rpst_uninit);
        }
 
        ret = rte_eth_switch_domain_free(hw->switch_domain_id);
@@ -587,10 +583,4 @@ static struct rte_afu_driver afu_ipn3ke_driver = {
 };
 
 RTE_PMD_REGISTER_AFU(net_ipn3ke_afu, afu_ipn3ke_driver);
-
-RTE_INIT(ipn3ke_afu_init_log)
-{
-       ipn3ke_afu_logtype = rte_log_register("pmd.afu.ipn3ke");
-       if (ipn3ke_afu_logtype >= 0)
-               rte_log_set_level(ipn3ke_afu_logtype, RTE_LOG_NOTICE);
-}
+RTE_LOG_REGISTER(ipn3ke_afu_logtype, pmd.afu.ipn3ke, NOTICE);