lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Mon, 18 May 2015 21:27:39 +0300
From:	Leon Romanovsky <leon@...n.nu>
To:	dhowells@...hat.com, akpm@...ux-foundation.org, aarcange@...hat.com
Cc:	linux-mm@...ck.org, linux-kernel@...r.kernel.org,
	Leon Romanovsky <leon@...n.nu>
Subject: mm: nommu: convert kenter/kleave/kdebug macros to use pr_devel()

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@...n.nu>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ