mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Zihuan Zhang <zhangzihuan@kylinos.cn>
To: Viresh Kumar <viresh.kumar@linaro.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>
Cc: Linux PM <linux-pm@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Subject: Re: [PATCH v1] cpufreq: intel_pstate: Rearrange variable declaration involving __free()
Date: Thu, 4 Sep 2025 12:32:16 +0800	[thread overview]
Message-ID: <05c6d3bb-1fd4-4fb7-b1db-906a6689eb94@kylinos.cn> (raw)
In-Reply-To: <20250904041508.z5546b6a4usk5go2@vireshk-i7>


> On 03-09-25, 16:59, Rafael J. Wysocki wrote:
>> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>>
>> Follow cleanup.h recommendations and define and assign a variable
>> in one statement when __free() is used.
>>
>> No intentional functional impact.
>>
>> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>> ---
>>
>> Zhang, I said the code structure here was intentional, but that was before
>> the cleanup.h recommendation was pointed out to me.
>>
>> ---
>>   drivers/cpufreq/intel_pstate.c |    4 +---
>>   1 file changed, 1 insertion(+), 3 deletions(-)
>>
>> --- a/drivers/cpufreq/intel_pstate.c
>> +++ b/drivers/cpufreq/intel_pstate.c
>> @@ -1502,9 +1502,7 @@ static void __intel_pstate_update_max_fr
>>   
>>   static bool intel_pstate_update_max_freq(struct cpudata *cpudata)
>>   {
>> -	struct cpufreq_policy *policy __free(put_cpufreq_policy);
>> -
>> -	policy = cpufreq_cpu_get(cpudata->cpu);
>> +	struct cpufreq_policy *policy __free(put_cpufreq_policy) = cpufreq_cpu_get(cpudata->cpu);
>>   	if (!policy)
>>   		return false;
>>   

Reviewed-by:   Zihuan Zhang <zhangzihuan@kylinos.cn>

      reply	other threads:[~2025-09-04  4:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-03 14:59 Rafael J. Wysocki
2025-09-03 15:08 ` Krzysztof Kozlowski
2025-09-04  4:15 ` Viresh Kumar
2025-09-04  4:32   ` Zihuan Zhang [this message]

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=05c6d3bb-1fd4-4fb7-b1db-906a6689eb94@kylinos.cn \
    --to=zhangzihuan@kylinos.cn \
    --cc=krzk@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=srinivas.pandruvada@linux.intel.com \
    --cc=viresh.kumar@linaro.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

all inboxes | Powered by JetHome®