Re: [PATCH] mm: nommu: convert kenter/kleave/kdebug macros to use pr_devel()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sorry for this multiple resend, my mail client hid from me part of
subject line :(

On Mon, May 18, 2015 at 9:42 PM, Leon Romanovsky <leon@xxxxxxx> wrote:
> kenter/kleave/kdebug are wrapper macros to print functions flow and debug
> information. This set was written before pr_devel() was introduced, so
> it was controlled by "#if 0" construction.
>
> This patch refactors the current macros to use general pr_devel()
> functions which won't be compiled in if "#define DEBUG" is not declared
> prior to that macros.
>
> Signed-off-by: Leon Romanovsky <leon@xxxxxxx>
> ---
>  mm/nommu.c |   18 ++++++------------
>  1 file changed, 6 insertions(+), 12 deletions(-)
>
> diff --git a/mm/nommu.c b/mm/nommu.c
> index e544508..7e5986b6 100644
> --- a/mm/nommu.c
> +++ b/mm/nommu.c
> @@ -42,21 +42,15 @@
>  #include <asm/mmu_context.h>
>  #include "internal.h"
>
> -#if 0
> -#define kenter(FMT, ...) \
> -       printk(KERN_DEBUG "==> %s("FMT")\n", __func__, ##__VA_ARGS__)
> -#define kleave(FMT, ...) \
> -       printk(KERN_DEBUG "<== %s()"FMT"\n", __func__, ##__VA_ARGS__)
> -#define kdebug(FMT, ...) \
> -       printk(KERN_DEBUG "xxx" FMT"yyy\n", ##__VA_ARGS__)
> -#else
> +/*
> + * Relies on "#define DEBUG" construction to print them
> + */
>  #define kenter(FMT, ...) \
> -       no_printk(KERN_DEBUG "==> %s("FMT")\n", __func__, ##__VA_ARGS__)
> +       pr_devel("==> %s("FMT")\n", __func__, ##__VA_ARGS__)
>  #define kleave(FMT, ...) \
> -       no_printk(KERN_DEBUG "<== %s()"FMT"\n", __func__, ##__VA_ARGS__)
> +       pr_devel("<== %s()"FMT"\n", __func__, ##__VA_ARGS__)
>  #define kdebug(FMT, ...) \
> -       no_printk(KERN_DEBUG FMT"\n", ##__VA_ARGS__)
> -#endif
> +       pr_devel("xxx" FMT"yyy\n", ##__VA_ARGS__)
>
>  void *high_memory;
>  EXPORT_SYMBOL(high_memory);
> --
> 1.7.9.5
>



-- 
Leon Romanovsky | Independent Linux Consultant
        www.leon.nu | leon@xxxxxxx

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]