linux/kernel/debug
Stephen Zhang 0759d80728 kdb: kdb_support: Fix debugging information problem
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>
2021-02-04 15:55:04 +00:00
..
kdb kdb: kdb_support: Fix debugging information problem 2021-02-04 15:55:04 +00:00
debug_core.c kgdb: rectify kernel-doc for kgdb_unregister_io_module() 2021-02-04 15:23:25 +00:00
debug_core.h kdb: Fix stack crawling on 'running' CPUs that aren't the master 2019-10-10 16:28:48 +01:00
gdbstub.c kernel: debug: fix typo issue 2021-02-04 15:26:03 +00:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00