MIPS: Treat CP1 control registers as unsigned ints.
authorRalf Baechle <ralf@linux-mips.org>
Wed, 15 Jul 2015 09:48:15 +0000 (11:48 +0200)
committerRalf Baechle <ralf@linux-mips.org>
Thu, 3 Sep 2015 10:07:41 +0000 (12:07 +0200)
These are bitfields and treating them as signed values doesn't make
any sense.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Reported-by: Chris Packham <judge.packham@gmail.com>
arch/mips/include/asm/mipsregs.h

index 07bf4e7109acf22dc5cad16a9f06f62fda3088e5..b688c924a025814b5de8847f444b8d99157052e0 100644 (file)
@@ -1473,7 +1473,7 @@ do {                                                                      \
  */
 #define _read_32bit_cp1_register(source, gas_hardfloat)                        \
 ({                                                                     \
-       int __res;                                                      \
+       unsigned int __res;                                             \
                                                                        \
        __asm__ __volatile__(                                           \
        "       .set    push                                    \n"     \