Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932364AbbERSpl (ORCPT ); Mon, 18 May 2015 14:45:41 -0400 Received: from mail-wi0-f179.google.com ([209.85.212.179]:36195 "EHLO mail-wi0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932302AbbERSpj (ORCPT ); Mon, 18 May 2015 14:45:39 -0400 MIME-Version: 1.0 X-Originating-IP: [213.57.247.249] In-Reply-To: <1431974526-21788-1-git-send-email-leon@leon.nu> References: <1431974526-21788-1-git-send-email-leon@leon.nu> From: Leon Romanovsky Date: Mon, 18 May 2015 21:45:15 +0300 Message-ID: Subject: Re: [PATCH] mm: nommu: convert kenter/kleave/kdebug macros to use pr_devel() To: dhowells , Andrew Morton , aarcange Cc: Linux-MM , "linux-kernel@vger.kernel.org" , Leon Romanovsky Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2132 Lines: 63 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 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 > --- > 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 > #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@leon.nu -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/