drivers/cpufreq/powernow-k7.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
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
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
在 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
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
© 2016 - 2025 Red Hat, Inc.