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>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 14 May 2008 20:43:14 -0700
From:	Arjan van de Ven <arjan@...radead.org>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [patch 3/3] Example use of WARN()

On Tue, 13 May 2008 21:36:06 -0700
Andrew Morton <akpm@...ux-foundation.org> wrote:

> On Tue, 6 May 2008 23:21:56 -0700 Arjan van de Ven
> <arjan@...radead.org> wrote:
> 
> > From: Arjan van de Ven <arjan@...ux.intel.com>
> > Subject: Example use of WARN()
> > 
> > now that WARN() exists, we can fold some of the printk's into it
> 
> Wanna take a look at mips allnoconfig, please?
> 

this should fix this


From: Arjan van de Ven <arjan@...ux.intel.com>
Subject: [PATCH] Fix WARN() for the !CONFIG_BUG case

For the CONFIG_BUG=n case we need to provide a stub WARN() macro;
do this in the same style as WARN_ON() is done.

Signed-off-by: Arjan van de Ven <arjan@...ux.intel.com>
---
 include/asm-generic/bug.h |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h
index dcefa5e..1d2b51f 100644
--- a/include/asm-generic/bug.h
+++ b/include/asm-generic/bug.h
@@ -79,6 +79,14 @@ extern void warn_slowpath(const char *file, const int line, const char *fmt, ...
 	unlikely(__ret_warn_on);					\
 })
 #endif
+
+#ifndef WARN
+#define WARN(condition, format...) ({					\
+	int __ret_warn_on = !!(condition);				\
+	unlikely(__ret_warn_on);					\
+})
+#endif
+
 #endif
 
 #define WARN_ON_ONCE(condition)	({				\
-- 
1.5.4.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