mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 08:14:15 +08:00
0759d80728
There are several common patterns. 0: kdb_printf("...",...); which is the normal one. 1: kdb_printf("%s: "...,__func__,...) We could improve '1' to this : #define kdb_func_printf(format, args...) \ kdb_printf("%s: " format, __func__, ## args) 2: if(KDB_DEBUG(AR)) kdb_printf("%s "...,__func__,...); We could improve '2' to this : #define kdb_dbg_printf(mask, format, args...) \ do { \ if (KDB_DEBUG(mask)) \ kdb_func_printf(format, ## args); \ } while (0) In addition, we changed the format code of size_t to %zu. Signed-off-by: Stephen Zhang <stephenzhangzsd@gmail.com> Link: https://lore.kernel.org/r/1612440429-6391-1-git-send-email-stephenzhangzsd@gmail.com Reviewed-by: Douglas Anderson <dianders@chromium.org> [daniel.thompson@linaro.org: Minor typo and line length fixes in the patch description] Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org> |
||
---|---|---|
.. | ||
.gitignore | ||
kdb_bp.c | ||
kdb_bt.c | ||
kdb_cmds | ||
kdb_debugger.c | ||
kdb_io.c | ||
kdb_keyboard.c | ||
kdb_main.c | ||
kdb_private.h | ||
kdb_support.c | ||
Makefile |