DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Hunt <david.hunt@intel.com>
To: Richael Zhuang <Richael.Zhuang@arm.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "anatoly.burakov@intel.com" <anatoly.burakov@intel.com>,
	"stephen@networkplumber.org" <stephen@networkplumber.org>,
	Reshma Pattan <reshma.pattan@intel.com>, nd <nd@arm.com>
Subject: Re: [dpdk-dev] [PATCH v5 2/2] power: refactor pstate and acpi code
Date: Wed, 23 Jun 2021 10:00:31 +0100	[thread overview]
Message-ID: <4895a7a2-997d-bb2d-37d8-6bc29140c5f9@intel.com> (raw)
In-Reply-To: <AM8PR08MB57962F61BED6B16583BAC5BB92089@AM8PR08MB5796.eurprd08.prod.outlook.com>


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 != 0)
> +		return -1;
> Here, I mentioned in the V4 patch:  ret >=0 if success, EOF means failure.  It seems you forgot to fix this.


Ah, OK. Will fix in v6. Hopefully I'll reply to the correct email-id 
this time. :)


> +
> +	/* flush the output */
> +	ret = fflush(f);
> +	if (ret != 0)
> +		return -1;
> +
> +	return 0;
> +}
>
> Best regards,
> Richael
>> -----Original Message-----
>> From: David Hunt <david.hunt@intel.com>
>> Sent: Tuesday, June 22, 2021 9:28 PM
>> To: dev@dpdk.org
>> Cc: anatoly.burakov@intel.com; stephen@networkplumber.org; Richael
>> Zhuang <Richael.Zhuang@arm.com>; Reshma Pattan
>> <reshma.pattan@intel.com>; nd <nd@arm.com>
>> Subject: Re: [PATCH v5 2/2] power: refactor pstate and acpi code
>>
>> 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 <anatoly.burakov@intel.com>
>>>
>>> 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-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
>>> Signed-off-by: David Hunt <david.hunt@intel.com>
>>>
>>> ---
>>> changes in v2 (should read v5)
>>> * fixed bugs raised by Richael Zhuang in review - open file rw+, etc.
>>> * removed FOPS* and FOPEN* macros, which contained control statements.
>>> * fixed some checkpatch warnings.
>>
>> So in the process of posting v5, I picked the email id from v4 in patchwork,
>> used that in my --in-reply-to, and somehow it screwed up the threading as it
>> looks like I'm responding to v3. So I'm sending this email to make sure all the
>> people CC'd in v4 are included in this (v5).
>>
>> Anatoly is busy at the moment, so I'm addressing the issues raised in v4, and
>> additionally adressing the checkpatch issues where it does not like the
>> macros with control statements, so removing those, as I don't like them
>> either.
>>
>> Regards,
>> Dave.
>>
>>
>>

  reply	other threads:[~2021-06-23  9:00 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-01 15:05 [dpdk-dev] [PATCH 21.08] power: refactor pstate sysfs handling Anatoly Burakov
2021-04-02  9:27 ` [dpdk-dev] [21.08 v2] " Anatoly Burakov
2021-04-02 17:45 ` [dpdk-dev] [PATCH 21.08] " Stephen Hemminger
2021-04-06 10:06   ` Burakov, Anatoly
2021-04-02 17:46 ` Stephen Hemminger
2021-04-06 10:05   ` Burakov, Anatoly
2021-04-22 15:08     ` [dpdk-dev] [21.08 PATCH v3 1/1] " Anatoly Burakov
2021-04-23 11:03       ` [dpdk-dev] [21.08 PATCH v4 1/2] power: don't use rte prefix in internal code Anatoly Burakov
2021-05-31 10:23         ` David Hunt
2021-06-22 12:43         ` [dpdk-dev] [PATCH v2 " David Hunt
2021-06-22 12:43           ` [dpdk-dev] [PATCH v2 2/2] power: refactor pstate and acpi code David Hunt
2021-06-22 13:00             ` David Hunt
2021-06-22 12:59           ` [dpdk-dev] [PATCH v2 1/2] power: don't use rte prefix in internal code David Hunt
2021-06-22 12:58         ` [dpdk-dev] [PATCH v5 " David Hunt
2021-06-22 12:58           ` [dpdk-dev] [PATCH v5 2/2] power: refactor pstate and acpi code David Hunt
2021-06-22 13:27             ` David Hunt
2021-06-23  8:54               ` Richael Zhuang
2021-06-23  9:00                 ` David Hunt [this message]
2021-06-23 12:03           ` [dpdk-dev] [PATCH v6 1/2] power: don't use rte prefix in internal code David Hunt
2021-06-23 12:03             ` [dpdk-dev] [PATCH v6 2/2] power: refactor pstate and acpi code David Hunt
2021-06-23 12:27               ` Burakov, Anatoly
2021-06-30  5:32               ` Richael Zhuang
2021-07-08 12:49               ` David Marchand
2021-07-08 13:33                 ` David Hunt
2021-07-08 15:38             ` [dpdk-dev] [PATCH v7 1/2] power: don't use rte prefix in internal code David Hunt
2021-07-08 15:38               ` [dpdk-dev] [PATCH v7 2/2] power: refactor pstate and acpi code David Hunt
2021-07-08 20:41               ` [dpdk-dev] [PATCH v7 1/2] power: don't use rte prefix in internal code David Marchand
2021-04-23 11:03       ` [dpdk-dev] [21.08 PATCH v4 2/2] power: refactor pstate and acpi code Anatoly Burakov
2021-05-07  2:13         ` Richael Zhuang
2021-05-07  9:49           ` Burakov, Anatoly

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4895a7a2-997d-bb2d-37d8-6bc29140c5f9@intel.com \
    --to=david.hunt@intel.com \
    --cc=Richael.Zhuang@arm.com \
    --cc=anatoly.burakov@intel.com \
    --cc=dev@dpdk.org \
    --cc=nd@arm.com \
    --cc=reshma.pattan@intel.com \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).