Message ID | 1358932932-14094-2-git-send-email-sachin.kamat@linaro.org |
---|---|
State | Accepted |
Headers | show |
Sachin Kamat wrote: > > 'ret' is undefined when the function returns from the first > 'if' condition. Without this patch we get the following warning: > > drivers/cpufreq/exynos-cpufreq.c: In function ‘exynos_target’: > drivers/cpufreq/exynos-cpufreq.c:182:2: warning: > ‘ret’ may be used uninitialized in this function [-Wuninitialized] > > Suggested-by: Jonghwan Choi <jhbird.choi@samsung.com> I modified above to 'Reported-by' because checkpatch complains like following... WARNING: Non-standard signature: Suggested-by: #10: Suggested-by: Jonghwan Choi <jhbird.choi@samsung.com> > Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> > --- > drivers/cpufreq/exynos-cpufreq.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > Applied, thanks. - Kukjin
On Friday, January 25, 2013 10:26:41 AM Kukjin Kim wrote: > Sachin Kamat wrote: > > > > 'ret' is undefined when the function returns from the first > > 'if' condition. Without this patch we get the following warning: > > > > drivers/cpufreq/exynos-cpufreq.c: In function ‘exynos_target’: > > drivers/cpufreq/exynos-cpufreq.c:182:2: warning: > > ‘ret’ may be used uninitialized in this function [-Wuninitialized] > > > > Suggested-by: Jonghwan Choi <jhbird.choi@samsung.com> > > I modified above to 'Reported-by' because checkpatch complains like following... > > WARNING: Non-standard signature: Suggested-by: > #10: > Suggested-by: Jonghwan Choi <jhbird.choi@samsung.com> This tag has been used already, though, and I think it makes sense (more than Reported-by in this case). I think it may be regarded as standard regardless of what checkpatch has to say about that. :-) Thanks, Rafael
Rafael J. Wysocki wrote: > > On Friday, January 25, 2013 10:26:41 AM Kukjin Kim wrote: > > Sachin Kamat wrote: > > > > > > 'ret' is undefined when the function returns from the first > > > 'if' condition. Without this patch we get the following warning: > > > > > > drivers/cpufreq/exynos-cpufreq.c: In function ‘exynos_target’: > > > drivers/cpufreq/exynos-cpufreq.c:182:2: warning: > > > ‘ret’ may be used uninitialized in this function [-Wuninitialized] > > > > > > Suggested-by: Jonghwan Choi <jhbird.choi@samsung.com> > > > > I modified above to 'Reported-by' because checkpatch complains like > following... > > > > WARNING: Non-standard signature: Suggested-by: > > #10: > > Suggested-by: Jonghwan Choi <jhbird.choi@samsung.com> > > This tag has been used already, though, and I think it makes sense (more > than Yes, agreed. > Reported-by in this case). I think it may be regarded as standard regardless > of what checkpatch has to say about that. :-) > I see. Let me keep the 'Reported-by' here. Thanks for your opinion. - Kukjin
diff --git a/drivers/cpufreq/exynos-cpufreq.c b/drivers/cpufreq/exynos-cpufreq.c index 88401ba..4268e46 100644 --- a/drivers/cpufreq/exynos-cpufreq.c +++ b/drivers/cpufreq/exynos-cpufreq.c @@ -159,7 +159,7 @@ static int exynos_target(struct cpufreq_policy *policy, { struct cpufreq_frequency_table *freq_table = exynos_info->freq_table; unsigned int index; - int ret; + int ret = 0; mutex_lock(&cpufreq_lock);
'ret' is undefined when the function returns from the first 'if' condition. Without this patch we get the following warning: drivers/cpufreq/exynos-cpufreq.c: In function ‘exynos_target’: drivers/cpufreq/exynos-cpufreq.c:182:2: warning: ‘ret’ may be used uninitialized in this function [-Wuninitialized] Suggested-by: Jonghwan Choi <jhbird.choi@samsung.com> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> --- drivers/cpufreq/exynos-cpufreq.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)