raw/dpaa2_qdma: fix spin lock release
[dpdk.git] / drivers / event / opdl / opdl_evdev.c
index ef9fb30..d2d2be4 100644 (file)
@@ -422,16 +422,17 @@ opdl_dump(struct rte_eventdev *dev, FILE *f)
                        else
                                p_type = "????";
 
-                       sprintf(queue_id, "%02u", port->external_qid);
+                       snprintf(queue_id, sizeof(queue_id), "%02u",
+                                       port->external_qid);
                        if (port->p_type == OPDL_REGULAR_PORT ||
                                        port->p_type == OPDL_ASYNC_PORT)
-                               sprintf(total_cyc,
+                               snprintf(total_cyc, sizeof(total_cyc),
                                        " %'16"PRIu64"",
                                        (cpg != 0 ?
                                         port->port_stat[total_cycles] / cpg
                                         : 0));
                        else
-                               sprintf(total_cyc,
+                               snprintf(total_cyc, sizeof(total_cyc),
                                        "             ----");
                        fprintf(f,
                                "%4s %10u %8u %9s %'16"PRIu64" %'16"PRIu64" %s "
@@ -753,10 +754,7 @@ static struct rte_vdev_driver evdev_opdl_pmd_drv = {
        .remove = opdl_remove
 };
 
-RTE_INIT(opdl_init_log);
-
-static void
-opdl_init_log(void)
+RTE_INIT(opdl_init_log)
 {
        opdl_logtype_driver = rte_log_register("pmd.event.opdl.driver");
        if (opdl_logtype_driver >= 0)