979f7488da
The log function names, warn(), merror(), fatal() are inconsistent. Commit2a11665945("kbuild: distinguish between errors and warnings in modpost") intentionally chose merror() to avoid the conflict with the library function error(). See man page of error(3). But, we are already causing the conflict with warn() because it is also a library function. See man page of warn(3). err() would be a problem for the same reason. The common technique to work around name conflicts is to use macros. #define error __error void __error(const char *fmt, ...) { <our own implementation> } #define warn __warn void __warn(const char *fmt, ...) { <our own implementation> } In this way, we can implement our own warn() and error(), still we can include <error.h> and <err.h> with no problem. And, commit93c95e526a("modpost: rework and consolidate logging interface") already did that. Since the log functions are all macros, we can use error() without causing "conflicting types" errors. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Bug: 176428324 Change-Id: Ief32b258e943026ad3f67a8c82c989129f8e654b (cherry picked from commitbc72d723ec) Signed-off-by: Melody Olvera <molvera@codeaurora.org>