lkml.org 
[lkml]   [2015]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/3] tools/liblockdep: correct macro for WARN
Date
As Peter Zijlstra pointed out, the varargs for WARN() are optional, so we
need to correctly handle the case where they don't exist.

This would cause a compilation error.

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
tools/lib/lockdep/uinclude/linux/kernel.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/lib/lockdep/uinclude/linux/kernel.h b/tools/lib/lockdep/uinclude/linux/kernel.h
index cd2cc59..276c7a8 100644
--- a/tools/lib/lockdep/uinclude/linux/kernel.h
+++ b/tools/lib/lockdep/uinclude/linux/kernel.h
@@ -23,7 +23,7 @@
#define WARN_ON(x) (x)
#define WARN_ON_ONCE(x) (x)
#define likely(x) (x)
-#define WARN(x, y, z) (x)
+#define WARN(x, y...) (x)
#define uninitialized_var(x) x
#define __init
#define noinline
--
2.1.4


\
 
 \ /
  Last update: 2015-08-25 07:41    [W:0.048 / U:1.792 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site