mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
vsprintf: Avoid confusion between invalid address and value
We are able to detect invalid values handled by %p[iI] printk specifier. The current error message is "invalid address". It might cause confusion against "(efault)" reported by the generic valid_pointer_address() check. Let's unify the style and use the more appropriate error code description "(einval)". Link: http://lkml.kernel.org/r/[email protected] To: Rasmus Villemoes <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: "Tobin C . Harding" <[email protected]> Cc: Joe Perches <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Michal Hocko <[email protected]> Cc: Steven Rostedt <[email protected]> Cc: Sergey Senozhatsky <[email protected]> Cc: [email protected] Reviewed-by: Sergey Senozhatsky <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Petr Mladek <[email protected]>
This commit is contained in:
parent
3e5903eb9c
commit
635720ac75
2 changed files with 2 additions and 1 deletions
|
|
@ -1511,7 +1511,7 @@ char *ip_addr_string(char *buf, char *end, const void *ptr,
|
|||
case AF_INET6:
|
||||
return ip6_addr_string_sa(buf, end, &sa->v6, spec, fmt);
|
||||
default:
|
||||
return string_nocheck(buf, end, "(invalid address)", spec);
|
||||
return string_nocheck(buf, end, "(einval)", spec);
|
||||
}}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue