lib/vsprintf: refactor duplicate code to xnumber()
Subsystems (2)
Andy Shevchenko
reviewerPATCH 1/1 lib/vsprintf: refactor duplicate code to xnumber()
xnumber() is a special helper to print a fixed size type in a hex format with '0x' prefix with padding and reduced size. In the module we have already several copies of such code. Consolidate them under xnumber() helper.
There are couple of differences though.
It seems nobody cared about the output in case of CONFIG_KALLSYMS=n when printing symbol address because the asked width is not enough to care either prefix or last byte. Fixed here.
The %pNF specifier used to be allowed with a specific field width, though there is neither any user of it nor mention in the documentation.
--- lib/vsprintf.c | 43 +++++++++++++++---------------------------- 1 file changed, 15 insertions(+), 28 deletions(-)
lib/vsprintf.c +15 -28
@@ -514,6 +514,16 @@ char *number(char *buf, char *end, unsigned long long num,return buf; } +static noinline_for_stack +char *xnumber(char *buf, char *end, unsigned long long value, unsigned int type, +struct printf_spec spec) +{ + spec.field_width =2 +2 * type; + spec.flags |=SPECIAL |SMALL |ZEROPAD ; + spec.base =16 ; +return number (buf, end, value, spec); +} +static void move_right (char *buf,char *end,unsigned len,unsigned spaces) {size_t size;
@@ -649,11 +659,7 @@ char *symbol_string(char *buf, char *end, void *ptr,return string (buf, end, sym, spec);#else - spec.field_width =2 *sizeof (void *); - spec.flags |=SPECIAL |SMALL |ZEROPAD ; - spec.base =16 ; - -return number (buf, end, value, spec); +return xnumber (buf, end, value,sizeof (void *), spec);#endif }
@@ -1318,36 +1324,20 @@ staticchar *netdev_feature_string (char *buf,char *end,const u8 *addr,struct printf_spec spec) { - spec.flags |=SPECIAL |SMALL |ZEROPAD ; -if (spec.field_width ==-1 ) - spec.field_width =2 +2 *sizeof (netdev_features_t); - spec.base =16 ; - -return number (buf, end, *(const netdev_features_t *)addr, spec); +return xnumber (buf, end, *(const netdev_features_t *)addr,sizeof (netdev_features_t), spec); }static noinline_for_stack char *address_val(char *buf, char *end, const void *addr,struct printf_spec spec,const char *fmt) { -unsigned long long num; - - spec.flags |=SPECIAL |SMALL |ZEROPAD ; - spec.base =16 ; -switch (fmt[1 ]) {case 'd' : - num = *(const dma_addr_t *)addr; - spec.field_width =sizeof (dma_addr_t) *2 +2 ; -break ; +return xnumber (buf, end, *(const dma_addr_t *)addr,sizeof (dma_addr_t), spec);case 'p' :default : - num = *(const phys_addr_t *)addr; - spec.field_width =sizeof (phys_addr_t) *2 +2 ; -break ; +return xnumber (buf, end, *(const phys_addr_t *)addr,sizeof (phys_addr_t), spec); } - -return number (buf, end, num, spec); } static noinline_for_stack
@@ -1366,10 +1356,7 @@ char *clock(char *buf, char *end, struct clk *clk, struct printf_spec spec,#ifdef CONFIG_COMMON_CLK return string (buf, end,__clk_get_name (clk), spec);#else - spec.base =16 ; - spec.field_width =sizeof (unsigned long ) *2 +2 ; - spec.flags |=SPECIAL |SMALL |ZEROPAD ; -return number (buf, end, (unsigned long )clk, spec); +return xnumber (buf, end, (unsigned long )clk,sizeof (unsigned long ), spec);#endif } }
Signature · 1 line
2.6.4
Quoted 26 lines · Andy Shevchenko
xnumber()is a special helper to print a fixed size type in a hex format with '0x' prefix with padding and reduced size. In the module we have already several copies of such code. Consolidate them underxnumber()helper.There are couple of differences though.
It seems nobody cared about the output in case of
CONFIG_KALLSYMS=nwhen printing symbol address because the asked width is not enough to care either prefix or last byte. Fixed here.The %pNF specifier used to be allowed with a specific field width, though there is neither any user of it nor mention in the documentation.
Signed-off-by Andy Shevchenko <[email protected]>---
lib/vsprintf.c | 43 +++++++++++++++----------------------------1 file changed, 15 insertions(+), 28 deletions(-)lib/vsprintf.c +0
-0@@ -514,6 +514,16 @@ char *number(char *buf, char *end, unsigned long long num, return buf; }
lib/vsprintf.c char *number(char *buf, char *end, unsigned long long num, · line 519
Quoted 3 lines
lib/vsprintf.c +3
-0+static noinline_for_stack +char *xnumber(char *buf, char *end, unsigned long long value, unsigned int type, + struct printf_spec spec)
xnumber isn't a great name.
unsigned int type should probably be size_t size
Quoted 20 lines
lib/vsprintf.c +7
-0+{ + spec.field_width =2 +2 * type; + spec.flags |=SPECIAL |SMALL |ZEROPAD ; + spec.base =16 ; +return number (buf, end, value, spec); +} +static void
move_right(char *buf, char *end, unsigned len, unsigned spaces){
size_tsize;lib/vsprintf.c +0
-0@@ -649,11 +659,7 @@ char *symbol_string(char *buf, char *end, void *ptr,
returnstring(buf, end, sym, spec);
#elselib/vsprintf.c +1
-5- spec.field_width =2 *sizeof (void *); - spec.flags |=SPECIAL |SMALL |ZEROPAD ; - spec.base =16 ; - -return number (buf, end, value, spec); +return xnumber (buf, end, value,sizeof (void *), spec);
Quoted 27 lines · Joe Perches
Quoted 26 lines · Andy Shevchenko
xnumber()is a special helper to print a fixed size type in a hex format with '0x' prefix with padding and reduced size. In the module we have already several copies of such code. Consolidate them underxnumber()helper.There are couple of differences though.
It seems nobody cared about the output in case of
CONFIG_KALLSYMS=nwhen printing symbol address because the asked width is not enough to care either prefix or last byte. Fixed here.The %pNF specifier used to be allowed with a specific field width, though there is neither any user of it nor mention in the documentation.
Signed-off-by Andy Shevchenko <[email protected]>--- lib/vsprintf.c | 43 +++++++++++++++---------------------------- 1 file changed, 15 insertions(+), 28 deletions(-)lib/vsprintf.c +0
-0@@ -514,6 +514,16 @@ char *number(char *buf, char *end, unsigned long long num,return buf; }
Quoted 5 lines
lib/vsprintf.c char *number(char *buf, char *end, unsigned long long num, · line 519
Quoted 3 lines
lib/vsprintf.c +3
-0+static noinline_for_stack +char *xnumber(char *buf, char *end, unsigned long long value, unsigned int type, +struct printf_spec spec)xnumber isn't a great name.
I rather agree, however had nothing yet to replace. Any ideas?
Quoted 1 line
unsigned int type should probably be
size_tsize
Used to be :-), though I decided to move it to unsigned int since the resulting field is anyway 8 bits of unsigned int.
If you think it's better to do all conversion inside xnumber (or whatever name it would be), I redo this.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 28 lines · Andy Shevchenko
Quoted 27 lines · Joe Perches
Quoted 26 lines · Andy Shevchenko
xnumber()is a special helper to print a fixed size type in a hex format with '0x' prefix with padding and reduced size. In the module we have already several copies of such code. Consolidate them underxnumber()helper.There are couple of differences though.
It seems nobody cared about the output in case of
CONFIG_KALLSYMS=nwhen printing symbol address because the asked width is not enough to care either prefix or last byte. Fixed here.The %pNF specifier used to be allowed with a specific field width, though there is neither any user of it nor mention in the documentation.
Signed-off-by Andy Shevchenko <[email protected]>---
lib/vsprintf.c | 43 +++++++++++++++----------------------------1 file changed, 15 insertions(+), 28 deletions(-)lib/vsprintf.c +0
-0@@ -514,6 +514,16 @@ char *number(char *buf, char *end, unsigned long long num, return buf; }
Quoted 7 lines
Quoted 5 lines
lib/vsprintf.c char *number(char *buf, char *end, unsigned long long num, · line 519
Quoted 3 lines
lib/vsprintf.c +3
-0+static noinline_for_stack +char *xnumber(char *buf, char *end, unsigned long long value, unsigned int type, + struct printf_spec spec)xnumber isn't a great name.
I rather agree, however had nothing yet to replace. Any ideas?
prefixed_hex_number?
Quoted 6 lines
Quoted 1 line
unsigned int type should probably be
size_tsizeUsed to be :-), though I decided to move it to unsigned int since the resulting field is anyway 8 bits of unsigned int.
If you think it's better to do all conversion inside xnumber (or whatever name it would be), I redo this.
It's going to get cast to that field size anyway
as either size_t or unsigned int
Rasmus Villemoes
reviewerQuoted 10 lines · Joe Perches
Quoted 9 lines · Andy Shevchenko
xnumber()is a special helper to print a fixed size type in a hex format with '0x' prefix with padding and reduced size. In the module we have already several copies of such code. Consolidate them underxnumber()helper.There are couple of differences though.
It seems nobody cared about the output in case of
CONFIG_KALLSYMS=nwhen printing symbol address because the asked width is not enough to care either prefix or last byte. Fixed here.
ok, though I'm curious what 'last byte' refers to here?
Quoted 16 lines
Quoted 16 lines
The %pNF specifier used to be allowed with a specific field width, though there is neither any user of it nor mention in the documentation.
Signed-off-by Andy Shevchenko <[email protected]>--- lib/vsprintf.c | 43 +++++++++++++++---------------------------- 1 file changed, 15 insertions(+), 28 deletions(-)lib/vsprintf.c +0
-0@@ -514,6 +514,16 @@ char *number(char *buf, char *end, unsigned long long num,return buf; }
Quoted 3 lines
lib/vsprintf.c char *number(char *buf, char *end, unsigned long long num, · line 519
Quoted 3 lines
lib/vsprintf.c +3
-0+static noinline_for_stack +char *xnumber(char *buf, char *end, unsigned long long value, unsigned int type, +struct printf_spec spec)
Is there any aspect of the passed-through printf_spec which isn't overridden in xnumber? The users are/will be various %p extensions, which probably means that no-one passes a non-default precision (gcc complains about %.*p), and the remaining possible flags (PLUS, LEFT, SPACE) are useless and/or impossible to pass to %p without gcc complaining. In other words, why pass the spec at all instead of just building it inside xnumber?
Quoted 1 line
xnumber isn't a great name.
Maybe 'hexnumber'. That's a bit further away from 'number', and 'x' might stand for something other than hex.
Quoted 1 line
unsigned int type should probably be
size_tsize
Compromise: 'unsigned int size'. The name should be size since it's supposed to be the size of the actual type being printed. But the type carrying that information need not be 8 bytes wide on 64bits.
Quoted 17 lines
Quoted 17 lines
static
noinline_for_stack
char *address_val(char *buf, char *end, const void *addr,lib/vsprintf.c +1
-8struct printf_spec spec, const char *fmt) { -unsigned long long num; - - spec.flags |=SPECIAL |SMALL |ZEROPAD ; - spec.base =16 ; - switch (fmt[1]) { case 'd': - num = *(const dma_addr_t *)addr; - spec.field_width =sizeof (dma_addr_t) *2 +2 ; -break ; + return xnumber(buf, end, *(const dma_addr_t *)addr, sizeof(dma_addr_t), spec);case 'p' :default :
Quoted 8 lines
lib/vsprintf.c static · line 1341
Quoted 8 lines
lib/vsprintf.c +1
-5- num = *(const phys_addr_t *)addr; - spec.field_width =sizeof (phys_addr_t) *2 +2 ; -break ; +return xnumber (buf, end, *(const phys_addr_t *)addr,sizeof (phys_addr_t), spec); } - -return number (buf, end, num, spec); }
Nit: I think it would be a bit easier to read if the cast+dereference are kept outside the function calls. I'd suggest just introducing 'unsigned int size', assign the appropriate value in the two cases, and fall through to a common 'xnumber(buf, end, num, size);'. It'll even line up nicely ;-)
num = *(const dma_addr_t *)addr;
size = sizeof(dma_addr_t);
Rasmus
Quoted 7 lines · Rasmus Villemoes
Quoted 5 lines · Joe Perches
Quoted 4 lines · Andy Shevchenko
xnumber()is a special helper to print a fixed size type in a hex format with '0x' prefix with padding and reduced size. In the module we have already several copies of such code. Consolidate them underxnumber()helper.
Quoted 7 lines
Quoted 5 lines
Quoted 5 lines
There are couple of differences though.
It seems nobody cared about the output in case of
CONFIG_KALLSYMS=nwhen printing symbol address because the asked width is not enough to care either prefix or last byte. Fixed here.ok, though I'm curious what 'last byte' refers to here?
The last byte ('78') as it appears in the string carrying the number '0x12345678'. Yeah, might be confusing, I'm open for suggestion how to phrase it.
Quoted 17 lines
Quoted 17 lines
Quoted 17 lines
The %pNF specifier used to be allowed with a specific field width, though there is neither any user of it nor mention in the documentation.
Signed-off-by Andy Shevchenko <[email protected]>--- lib/vsprintf.c | 43 +++++++++++++++---------------------------- 1 file changed, 15 insertions(+), 28 deletions(-)lib/vsprintf.c +0
-0@@ -514,6 +514,16 @@ char *number(char *buf, char *end, unsigned long long num,return buf; }
Quoted 11 lines
Quoted 3 lines
lib/vsprintf.c char *number(char *buf, char *end, unsigned long long num, · line 519
Quoted 3 lines
lib/vsprintf.c +3
-0+static noinline_for_stack +char *xnumber(char *buf, char *end, unsigned long long value, unsigned int type, +struct printf_spec spec)Is there any aspect of the passed-through
printf_specwhich isn't overridden in xnumber? The users are/will be various %p extensions, which probably means that no-one passes a non-default precision (gcc complains about %.*p), and the remaining possible flags (PLUS, LEFT, SPACE) are useless and/or impossible to pass to %p without gcc complaining. In other words, why pass the spec at all instead of just building it inside xnumber?
Wow, good catch!
I slightly suspected something like that, but didn't made up my mind to check this.
Quoted 4 lines
Quoted 2 lines
xnumber isn't a great name.
Maybe 'hexnumber'.
We already have similar for %*ph. And as you noticed below…
Quoted 2 lines
That's a bit further away from 'number', and 'x'
might stand for something other than hex.
…isn't only about hex. I don't know how to play on words the all three flags including 16 base.
Quoted 6 lines
Quoted 2 lines
unsigned int type should probably be
size_tsizeCompromise: 'unsigned int size'. The name should be size since it's supposed to be the size of the actual type being printed. But the type carrying that information need not be 8 bytes wide on 64bits.
Exactly, the result anyway as for now only 8 bits as a part of unsigned int.
Quoted 24 lines
Quoted 24 lines
Quoted 24 lines
static
noinline_for_stack
char *address_val(char *buf, char *end, const void *addr,
structprintf_specspec, const char *fmt)
{lib/vsprintf.c +2
-12-unsigned long long num; - - spec.flags |=SPECIAL |SMALL |ZEROPAD ; - spec.base =16 ; -switch (fmt[1 ]) {case 'd' : - num = *(const dma_addr_t *)addr; - spec.field_width =sizeof (dma_addr_t) *2 +2 ; -break ; +return xnumber (buf, end, *(const dma_addr_t *)addr,sizeof (dma_addr_t), spec);case 'p' :default : - num = *(const phys_addr_t *)addr; - spec.field_width =sizeof (phys_addr_t) *2 +2 ; -break ; +return xnumber (buf, end, *(const phys_addr_t *)addr,sizeof (phys_addr_t), spec); } -
Quoted 8 lines
Quoted 2 lines
Quoted 2 lines
- return
number(buf, end, num, spec);
}Nit: I think it would be a bit easier to read if the cast+dereference are kept outside the function calls. I'd suggest just introducing 'unsigned int size', assign the appropriate value in the two cases, and fall through to a common '
xnumber(buf, end, num, size);'. It'll even line up nicely ;-)
Will try that.
Quoted 3 lines
num = *(const
dma_addr_t*)addr;
size =sizeof(dma_addr_t);
Thanks, Rasmus, for review.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Rasmus Villemoes
reviewerQuoted 15 lines · Andy Shevchenko
Quoted 13 lines · Rasmus Villemoes
Quoted 10 lines · Joe Perches
Quoted 9 lines · Andy Shevchenko
xnumber()is a special helper to print a fixed size type in a hex format with '0x' prefix with padding and reduced size. In the module we have already several copies of such code. Consolidate them underxnumber()helper.There are couple of differences though.
It seems nobody cared about the output in case of
CONFIG_KALLSYMS=nwhen printing symbol address because the asked width is not enough to care either prefix or last byte. Fixed here.
Quoted 5 lines
Quoted 1 line
ok, though I'm curious what 'last byte' refers to here?
The last byte ('78') as it appears in the string carrying the number '
0x12345678'. Yeah, might be confusing, I'm open for suggestion how to phrase it.
Maybe just don't mention "last byte" (I thought it was referring to the final '\0' terminator, and the "78" is actually the first byte on little-endian, so there's lots of ways to interpret this wrongly...), and say that the width doesn't take the prefix into account (which is obviously what has been forgotten).
BTW, thinking a bit more about this, using the field width+ZEROPAD is arguably wrong. It would be better to set the precision to 2*sizeof(type), since for numeric conversions the precision precisely means "the minimum number of digits to appear". That also avoids the annoying interactions with a user-supplied field width, and actually allows the user to do
%-20pNF
to get "0x00abcdef" padded with 10 spaces on the right (provided we do pass through the original spec). So I now think xnumber should do
spec.base = 16;
spec.flags |= SMALL | SPECIAL;
spec.precision = 2*size;
Since gcc complains about the 0 flag passed to %p, that will never be set, so any field width padding either left or right will be by spaces.
But I agree that it should be explicitly documented which %p extensions accept and honour a field width and which that don't (some out of necessity, since it's overloaded to pass e.g. a bitmap size or buffer size).
Quoted 11 lines
Quoted 3 lines
Quoted 1 line
xnumber isn't a great name.
Maybe 'hexnumber'.
We already have similar for %*ph. And as you noticed below…
Quoted 2 lines
That's a bit further away from 'number', and 'x'
might stand for something other than hex.…isn't only about hex. I don't know how to play on words the all three flags including 16 base.
It's a helper local to that file, so I'm not too worried about whatever name is chosen. full_width_lower_case_hexnumber is obviously way too verbose. I suppose most people instinctively expect hex numbers to be in lower case, but full_width_hexnumber is still too much. (also, I think you misinterpreted me: I wasn't complaining about 'x' not saying everything, I was complaining about 'x' not saying anything at all. IOW, what I meant was that, taken out of context, a function called 'xnumber' doesn't immediately tell me that it has anything to do with printing a number in hexadecimal, so it would be better to spend two more characters on its name to at least carry one aspect of what it does.).
Rasmus
Andy Shevchenko
reviewerQuoted 85 lines · Andy Shevchenko
Quoted 12 lines · Rasmus Villemoes
Quoted 10 lines · Joe Perches
Quoted 9 lines · Andy Shevchenko
xnumber()is a special helper to print a fixed size type in a hex format with
'0x' prefix with padding and reduced size. In the module we have already
several copies of such code. Consolidate them underxnumber()helper.There are couple of differences though.
Quoted 7 lines
Quoted 5 lines
Quoted 5 lines
It seems nobody cared about the output in case of
CONFIG_KALLSYMS=nwhen
printing symbol address because the asked width is not enough to care either
prefix or last byte. Fixed here.ok, though I'm curious what 'last byte' refers to here?
The last byte ('78') as it appears in the string carrying the number '
0x12345678'. Yeah, might be confusing, I'm open for suggestion how to
phrase it.Quoted 21 lines
Quoted 21 lines
Quoted 21 lines
The %pNF specifier used to be allowed with a specific field width, though there
is neither any user of it nor mention in the documentation.Signed-off-by Andy Shevchenko <[email protected]om>
---
lib/vsprintf.c | 43 +++++++++++++++--------------------------- -1 file changed, 15 insertions(+), 28 deletions(-)lib/vsprintf.c +0
-0@@ -514,6 +514,16 @@ char *number(char *buf, char *end,unsigned long long num, return buf; }Quoted 15 lines
Quoted 4 lines
lib/vsprintf.c char *number(char *buf, char *end, unsigned long long num, · line 519
Quoted 4 lines
lib/vsprintf.c +3
-0+static noinline_for_stack +char *xnumber(char *buf, char *end, unsigned long long value,unsigned int type, + struct printf_spec spec)Is there any aspect of the passed-through
printf_specwhich isn't overridden in xnumber? The users are/will be various %p extensions, which probably means that no-one passes a non-default precision (gcc
complains about %.*p), and the remaining possible flags (PLUS, LEFT,
SPACE) are useless and/or impossible to pass to %p without gcc complaining. In other words, why pass the spec at all instead of just
building it inside xnumber?Wow, good catch!
I slightly suspected something like that, but didn't made up my mind to check this.Quoted 4 lines
Quoted 2 lines
xnumber isn't a great name.
Maybe 'hexnumber'.
We already have similar for %*ph. And as you noticed below…
Quoted 2 lines
That's a bit further away from 'number', and 'x'
might stand for something other than hex.…isn't only about hex. I don't know how to play on words the all three
flags including 16 base.Quoted 3 lines
Quoted 2 lines
unsigned int type should probably be
size_tsize
Quoted 7 lines
Quoted 4 lines
Compromise: 'unsigned int size'. The name should be size since it's supposed to be the size of the actual type being printed. But the type
carrying that information need not be 8 bytes wide on 64bits.Exactly, the result anyway as for now only 8 bits as a part of unsigned int.
Oops, 24 bits of signed int. Incorrectly caught wrong line. So, I will change this to be int size then.
Quoted 47 lines
Quoted 30 lines
Quoted 21 lines
Quoted 21 lines
static
noinline_for_stack
char *address_val(char *buf, char *end, const void *addr, structprintf_specspec, const char *fmt) {
- unsigned long long num;lib/vsprintf.c +0
-4- - spec.flags |= SPECIAL | SMALL | ZEROPAD; - spec.base = 16; -switch (fmt[1]) {
case 'd':
- num = *(constdma_addr_t*)addr;
- spec.field_width =sizeof(dma_addr_t)* 2 + 2; - break;
+ returnxnumber(buf, end, *(const dma_addr_t *)addr, sizeof(dma_addr_t), spec);
case 'p':
default:
- num = *(constphys_addr_t*)addr;Quoted 8 lines
Quoted 8 lines
- spec.field_width =
sizeof(phys_addr_t)* 2 + 2; - break;
+ returnxnumber(buf, end, *(const phys_addr_t *)addr, sizeof(phys_addr_t), spec);
}
-
- returnnumber(buf, end, num, spec);
}Quoted 8 lines
Nit: I think it would be a bit easier to read if the cast+dereference
are kept outside the function calls. I'd suggest just introducing 'unsigned int size', assign the appropriate value in the two cases, and
fall through to a common 'xnumber(buf, end, num, size);'. It'll even
line up nicely ;-)Will try that.
Quoted 3 lines
num = *(const
dma_addr_t*)addr;
size =sizeof(dma_addr_t);Thanks, Rasmus, for review.
Signature · 2 lines
Andy Shevchenko <[email protected]> Intel Finland Oy
Rasmus Villemoes
reviewerQuoted 6 lines · Rasmus Villemoes
Is there any aspect of the passed-through
printf_specwhich isn't overridden in xnumber? The users are/will be various %p extensions, which probably means that no-one passes a non-default precision (gcc complains about %.*p), and the remaining possible flags (PLUS, LEFT, SPACE) are useless and/or impossible to pass to %p
Actually, LEFT can be passed to %p (or get set by passing a negative field width via %*p), which would be actively harmful: When LEFT is set, number() explicitly removes the ZEROPAD flag, so we'd get "0xabcdef " instead of "0x00abcdef".
Quoted 9 lines · Rasmus Villemoes
Quoted 6 lines · Rasmus Villemoes
Is there any aspect of the passed-through
printf_specwhich isn't overridden in xnumber? The users are/will be various %p extensions, which probably means that no-one passes a non-default precision (gcc complains about %.*p), and the remaining possible flags (PLUS, LEFT, SPACE) are useless and/or impossible to pass to %p
Quoted 4 lines
Actually, LEFT can be passed to %p (or get set by passing a negative field width via %*p), which would be actively harmful: When LEFT is set,
number()explicitly removes the ZEROPAD flag, so we'd get "0xabcdef" instead of "0x00abcdef".
My opinion we have to establish strict rules what we print in case of prefixed pointer (when #ifdef is false in some cases, e.g. struct clk) or fixed type values, such as phys_addr_t. I mean to always have a maximum width for the type on the running architecture.
Signature · 2 lines
With Best Regards, Andy Shevchenko