On 02-Apr-21 6:45 PM, Stephen Hemminger wrote:
On Thu, 1 Apr 2021 15:05:17 +
Anatoly Burakov wrote:
+#define FOPEN_OR_ERR_GOTO(f, label) do { \
+ if ((f) == NULL) { \
+ RTE_LOG(ERR, POWER, "File not opened\n"); \
+ goto label; \
On 02-Apr-21 6:46 PM, Stephen Hemminger wrote:
On Thu, 1 Apr 2021 15:05:17 +
Anatoly Burakov wrote:
+ /* fgets puts null terminator in, but do this just in case */
+ buf[BUFSIZ - 1] = '\0';
+
+ /* strip off any terminating newlines */
+ if (strlen(buf))
+
On Thu, 1 Apr 2021 15:05:17 +
Anatoly Burakov wrote:
> + /* fgets puts null terminator in, but do this just in case */
> + buf[BUFSIZ - 1] = '\0';
> +
> + /* strip off any terminating newlines */
> + if (strlen(buf))
> + strtok(buf, "\n");
Why not the simpler/sho
On Thu, 1 Apr 2021 15:05:17 +
Anatoly Burakov wrote:
>
> +#define FOPEN_OR_ERR_GOTO(f, label) do { \
> + if ((f) == NULL) { \
> + RTE_LOG(ERR, POWER, "File not opened\n"); \
> + goto label; \
> + } \
> +} while (0)
> +
I am n
Currently, pstate sysfs handling code is a bit of an unmaintainable
mess, which has contributed to various errors leading to bugs. Refactor
the code in a way that makes it more maintainable and less error prone.
Signed-off-by: Anatoly Burakov
---
lib/librte_power/meson.build| 7 +
5 matches
Mail list logo