vsprintf.c: Reduce sizeof struct printf_spec from 24 to 8 bytes

Reducing the size of struct printf_spec is a good thing because multiple
instances are commonly passed on stack.

It's possible for type to be u8 and field_width to be s8, but this is
likely small enough for now.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by Joe Perches and committed by Linus Torvalds ef0658f3 7bc80cd9

+12 -10
+12 -10
lib/vsprintf.c
··· 408 408 }; 409 409 410 410 struct printf_spec { 411 - enum format_type type; 412 - int flags; /* flags to number() */ 413 - int field_width; /* width of output field */ 414 - int base; 415 - int precision; /* # of digits/chars */ 416 - int qualifier; 411 + u16 type; 412 + s16 field_width; /* width of output field */ 413 + u8 flags; /* flags to number() */ 414 + u8 base; 415 + s8 precision; /* # of digits/chars */ 416 + u8 qualifier; 417 417 }; 418 418 419 419 static char *number(char *buf, char *end, unsigned long long num, ··· 1333 1333 break; 1334 1334 1335 1335 case FORMAT_TYPE_NRCHARS: { 1336 - int qualifier = spec.qualifier; 1336 + u8 qualifier = spec.qualifier; 1337 1337 1338 1338 if (qualifier == 'l') { 1339 1339 long *ip = va_arg(args, long *); ··· 1619 1619 1620 1620 case FORMAT_TYPE_NRCHARS: { 1621 1621 /* skip %n 's argument */ 1622 - int qualifier = spec.qualifier; 1622 + u8 qualifier = spec.qualifier; 1623 1623 void *skip_arg; 1624 1624 if (qualifier == 'l') 1625 1625 skip_arg = va_arg(args, long *); ··· 1885 1885 char *next; 1886 1886 char digit; 1887 1887 int num = 0; 1888 - int qualifier, base, field_width; 1888 + u8 qualifier; 1889 + u8 base; 1890 + s16 field_width; 1889 1891 bool is_sign; 1890 1892 1891 1893 while (*fmt && *str) { ··· 1965 1963 { 1966 1964 char *s = (char *)va_arg(args, char *); 1967 1965 if (field_width == -1) 1968 - field_width = INT_MAX; 1966 + field_width = SHORT_MAX; 1969 1967 /* first, skip leading white space in buffer */ 1970 1968 str = skip_spaces(str); 1971 1969