putdigit: microoptimisations
authorAlan Cox <alan@linux.intel.com>
Sat, 6 Dec 2014 14:59:40 +0000 (14:59 +0000)
committerAlan Cox <alan@linux.intel.com>
Sat, 6 Dec 2014 14:59:40 +0000 (14:59 +0000)
The compiler can't assume much about the variables after the call to put
the character so do the operations the other way around

Kernel/devio.c

index bbcc5bc..cda40a6 100644 (file)
@@ -447,8 +447,8 @@ static void putdigit0(unsigned char c)
 static void putdigit(unsigned char c, unsigned char *flag)
 {
        if (c || *flag) {
-               putdigit0(c);
                *flag |= c;
+               putdigit0(c);
        }
 }