* [PATCH] cpufreq: powernow: Remove redundant 'ret' variable in powernow_decode_bios()
@ 2025-09-03 7:29 Qianfeng Rong
2025-09-03 7:37 ` Viresh Kumar
0 siblings, 1 reply; 4+ messages in thread
From: Qianfeng Rong @ 2025-09-03 7:29 UTC (permalink / raw)
To: Rafael J. Wysocki, Viresh Kumar, linux-pm, linux-kernel; +Cc: Qianfeng Rong
Remove the unnecessary 'ret' variable from the powernow_decode_bios()
function. It is only used once to store the return value of get_ranges(p)
before immediately returning it. Simplify the code by directly returning
the result of get_ranges(p) instead.
Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
---
drivers/cpufreq/powernow-k7.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/cpufreq/powernow-k7.c b/drivers/cpufreq/powernow-k7.c
index 31039330a3ba..72430c3c5500 100644
--- a/drivers/cpufreq/powernow-k7.c
+++ b/drivers/cpufreq/powernow-k7.c
@@ -451,7 +451,6 @@ static int powernow_decode_bios(int maxfid, int startvid)
unsigned int i, j;
unsigned char *p;
unsigned int etuple;
- unsigned int ret;
etuple = cpuid_eax(0x80000001);
@@ -500,8 +499,7 @@ static int powernow_decode_bios(int maxfid, int startvid)
(startvid == pst->startvid)) {
print_pst_entry(pst, j);
p = (char *)pst + sizeof(*pst);
- ret = get_ranges(p);
- return ret;
+ return get_ranges(p);
} else {
unsigned int k;
p = (char *)pst + sizeof(*pst);
--
2.34.1
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] cpufreq: powernow: Remove redundant 'ret' variable in powernow_decode_bios()
2025-09-03 7:29 [PATCH] cpufreq: powernow: Remove redundant 'ret' variable in powernow_decode_bios() Qianfeng Rong
@ 2025-09-03 7:37 ` Viresh Kumar
2025-09-03 7:54 ` Qianfeng Rong
0 siblings, 1 reply; 4+ messages in thread
From: Viresh Kumar @ 2025-09-03 7:37 UTC (permalink / raw)
To: Qianfeng Rong; +Cc: Rafael J. Wysocki, linux-pm, linux-kernel
This should have been marked as V4 with details of what changed.
Sending it separately is fine (though wasn't really required), but you
still need to maintain the versions.
On 03-09-25, 15:29, Qianfeng Rong wrote:
> Remove the unnecessary 'ret' variable from the powernow_decode_bios()
> function. It is only used once to store the return value of get_ranges(p)
> before immediately returning it. Simplify the code by directly returning
> the result of get_ranges(p) instead.
>
> Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
> ---
> drivers/cpufreq/powernow-k7.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
--
viresh
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] cpufreq: powernow: Remove redundant 'ret' variable in powernow_decode_bios()
2025-09-03 7:37 ` Viresh Kumar
@ 2025-09-03 7:54 ` Qianfeng Rong
2025-09-03 7:59 ` Viresh Kumar
0 siblings, 1 reply; 4+ messages in thread
From: Qianfeng Rong @ 2025-09-03 7:54 UTC (permalink / raw)
To: Viresh Kumar; +Cc: Rafael J. Wysocki, linux-pm, linux-kernel
在 2025/9/3 15:37, Viresh Kumar 写道:
> This should have been marked as V4 with details of what changed.
> Sending it separately is fine (though wasn't really required), but you
> still need to maintain the versions.
Thank you for your reminder and for letting me learn about this rule.
>
> On 03-09-25, 15:29, Qianfeng Rong wrote:
>> Remove the unnecessary 'ret' variable from the powernow_decode_bios()
>> function. It is only used once to store the return value of get_ranges(p)
>> before immediately returning it. Simplify the code by directly returning
>> the result of get_ranges(p) instead.
>>
>> Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
>> ---
>> drivers/cpufreq/powernow-k7.c | 4 +---
>> 1 file changed, 1 insertion(+), 3 deletions(-)
> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
I see you have already added the Acked tag to this patch-do I still
need to send a V4 version with a detailed description of changes in
each version?
Best regards,
Qianfeng
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] cpufreq: powernow: Remove redundant 'ret' variable in powernow_decode_bios()
2025-09-03 7:54 ` Qianfeng Rong
@ 2025-09-03 7:59 ` Viresh Kumar
0 siblings, 0 replies; 4+ messages in thread
From: Viresh Kumar @ 2025-09-03 7:59 UTC (permalink / raw)
To: Qianfeng Rong; +Cc: Rafael J. Wysocki, linux-pm, linux-kernel
On 03-09-25, 15:54, Qianfeng Rong wrote:
> I see you have already added the Acked tag to this patch-do I still
> need to send a V4 version with a detailed description of changes in
> each version?
No, its okay now. Don't resend.
--
viresh
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-09-03 7:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-03 7:29 [PATCH] cpufreq: powernow: Remove redundant 'ret' variable in powernow_decode_bios() Qianfeng Rong
2025-09-03 7:37 ` Viresh Kumar
2025-09-03 7:54 ` Qianfeng Rong
2025-09-03 7:59 ` Viresh Kumar
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®