From: Julia Lawall Date: Sun, 5 Sep 2010 19:00:20 +0000 (+0200) Subject: [CPUFREQ] arch/x86/kernel/cpu/cpufreq: Fix unsigned return type X-Git-Tag: v2.6.37-rc1~112^2~2 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b2a33c172890b231444803b0bb38c25ac5a0f274;p=pandora-kernel.git [CPUFREQ] arch/x86/kernel/cpu/cpufreq: Fix unsigned return type In each case, the function has an unsigned return type, but returns a negative constant to indicate an error condition. Each function is only called once. For nforce2_detect_chipset, the result is only compared to 0, and for longrun_determine_freqs, the result is stored in a variable of type (signed) int. Thus, for both functions, unsigned can be dropped from the return type. A sematic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @exists@ identifier f; constant C; @@ unsigned f(...) { <+... * return -C; ...+> } // Signed-off-by: Julia Lawall Signed-off-by: Dave Jones --- Reading git-diff-tree failed