[dpdk-dev] [PATCH v5 2/2] power: refactor pstate and acpi code

2021-06-22 Thread David Hunt
From: Anatoly Burakov Currently, ACPI and PSTATE modes have lots of code duplication, confusing logic, and a bunch of other issues that can, and have, led to various bugs and resource leaks. This commit factors out the common parts of sysfs reading/writing for ACPI and PSTATE drivers. Signed-of

Re: [dpdk-dev] [PATCH v5 2/2] power: refactor pstate and acpi code

2021-06-22 Thread David Hunt
Adding people to the CC list that were on v4 of this patch set, and Richael who raised some issues in v4. On 22/6/2021 1:58 PM, David Hunt wrote: From: Anatoly Burakov Currently, ACPI and PSTATE modes have lots of code duplication, confusing logic, and a bunch of other issues that can, and ha

Re: [dpdk-dev] [PATCH v5 2/2] power: refactor pstate and acpi code

2021-06-23 Thread Richael Zhuang
Hi, There is a bug in lib/power/power_common.c: +write_core_sysfs_s(FILE *f, const char *str) +{ + int ret; + + ret = fseek(f, 0, SEEK_SET); + if (ret != 0) + return -1; + + ret = fputs(str, f); + if (ret != 0) + return -1; Here, I mentione

Re: [dpdk-dev] [PATCH v5 2/2] power: refactor pstate and acpi code

2021-06-23 Thread David Hunt
On 23/6/2021 9:54 AM, Richael Zhuang wrote: Hi, There is a bug in lib/power/power_common.c: +write_core_sysfs_s(FILE *f, const char *str) +{ + int ret; + + ret = fseek(f, 0, SEEK_SET); + if (ret != 0) + return -1; + + ret = fputs(str, f); + if (ret