microblaze: Use unsigned type for proper comparison in cpuinfo*.c
authorMichal Simek <michal.simek@xilinx.com>
Thu, 18 Dec 2014 15:02:00 +0000 (16:02 +0100)
committerMichal Simek <michal.simek@xilinx.com>
Mon, 5 Jan 2015 11:36:46 +0000 (12:36 +0100)
Compare the same types together.

Compilation warnings:
arch/microblaze/kernel/cpu/cpuinfo-pvr-full.c: In function
'set_cpuinfo_pvr_full':
arch/microblaze/kernel/cpu/cpuinfo-pvr-full.c:47:20: warning: comparison
between signed and unsigned integer expressions [-Wsign-compare]
arch/microblaze/kernel/cpu/cpuinfo-pvr-full.c:52:19: warning: comparison
between signed and unsigned integer expressions [-Wsign-compare]
arch/microblaze/kernel/cpu/cpuinfo-pvr-full.c:57:18: warning: comparison
between signed and unsigned integer expressions [-Wsign-compare]
arch/microblaze/kernel/cpu/cpuinfo-pvr-full.c:94:20: warning: comparison
between signed and unsigned integer expressions [-Wsign-compare]
arch/microblaze/kernel/cpu/cpuinfo-static.c: In function
'set_cpuinfo_static':
arch/microblaze/kernel/cpu/cpuinfo-static.c:40:20: warning: comparison
between signed and unsigned integer expressions [-Wsign-compare]

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
arch/microblaze/kernel/cpu/cpuinfo-pvr-full.c
arch/microblaze/kernel/cpu/cpuinfo-static.c

index 93c26cf..a32daec 100644 (file)
@@ -33,7 +33,7 @@
 void set_cpuinfo_pvr_full(struct cpuinfo *ci, struct device_node *cpu)
 {
        struct pvr_s pvr;
-       int temp; /* for saving temp value */
+       u32 temp; /* for saving temp value */
        get_pvr(&pvr);
 
        CI(ver_code, VERSION);
index 4854285..85dbda4 100644 (file)
@@ -22,7 +22,7 @@ static const char cpu_ver_string[] = CONFIG_XILINX_MICROBLAZE0_HW_VER;
 
 void __init set_cpuinfo_static(struct cpuinfo *ci, struct device_node *cpu)
 {
-       int i = 0;
+       u32 i = 0;
 
        ci->use_instr =
                (fcpu(cpu, "xlnx,use-barrel") ? PVR0_USE_BARREL_MASK : 0) |