On Wed, 24 Jul 2024 13:03:35 +0000
Sivaprasad Tummala <sivaprasad.tumm...@amd.com> wrote:

> +     lcore_cpus = rte_lcore_cpuset(lcore_id);
> +     if (CPU_COUNT(&lcore_cpus) != 1) {
> +             POWER_LOG(ERR, "Power library doesn't support lcore %u mapping "
> +                             "to %u cpus", lcore_id, CPU_COUNT(&lcore_cpus));
> +             return -1;
> +     }
> +     for (cpu = 0; cpu < CPU_SETSIZE; cpu++) {
> +             if (CPU_ISSET(cpu, &lcore_cpus))
> +                     break;
> +     }

You are copy and pasting the same code into multiple places which
indicates it should be an API function.

Reply via email to