On Mon, 28 Oct 2024 19:55:52 +0000 Sivaprasad Tummala <sivaprasad.tumm...@amd.com> wrote:
> + /* Auto Detect Environment */ > + RTE_TAILQ_FOREACH(ops, &uncore_ops_list, next) > + if (ops) { > + POWER_LOG(INFO, > + "Attempting to initialise %s power > management...", > + ops->name); > + ret = ops->init(pkg, die); > + if (ret == 0) { > + for (env = 0; env < RTE_DIM(uncore_env_str); > env++) > + if (strncmp(ops->name, > uncore_env_str[env], > + RTE_POWER_UNCORE_DRIVER_NAMESZ) > == 0) { > + rte_power_set_uncore_env(env); > + goto out; > + } > + } > + } > out: Static analyzer complains: lib/power/rte_power_uncore.c:113:1: warning: V547 Expression 'ops' is always true. Since the macro RTE_TAILQ_FOREACH() iterates until ops is NULL, that whole if() part can be removed.