bug-when-config_bug-simplify-warn_on_once-and-family.patch removed from -mm tree
Subject: [merged] bug-when-config_bug-simplify-warn_on_once-and-family.patch removed from -mm tree
To: [email protected],[email protected],[email protected]
From: [email protected]
Date: Tue, 08 Apr 2014 14:34:25 -0700
The patch titled
Subject: bug: when !CONFIG_BUG, simplify WARN_ON_ONCE and family
has been removed from the -mm tree. Its filename was
bug-when-config_bug-simplify-warn_on_once-and-family.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Josh Triplett <[email protected]>
Subject: bug: when !CONFIG_BUG, simplify WARN_ON_ONCE and family
When !CONFIG_BUG, WARN_ON and family become simple passthroughs of their condition argument; however, WARN_ON_ONCE and family still have conditions and a boolean to detect one-time invocation, even though the warning they'd emit doesn't exist. Make the existing definitions conditional on CONFIG_BUG, and add definitions for !CONFIG_BUG that map to the passthrough versions of WARN and WARN_ON.
This saves 4.4k on a minimized configuration (smaller than allnoconfig), and 20.6k with defconfig plus CONFIG_BUG=n.
---
include/asm-generic/bug.h | 57 ++++++++++++++++++------------------ 1 file changed, 30 insertions(+), 27 deletions(-)
include/asm-generic/bug.h renamed from include/asm-generic/bug.h~bug-when-config_bug-simplify-warn_on_once-and-family +30 -27
@@ -106,33 +106,6 @@ extern void warn_slowpath_null(const chaunlikely (__ret_warn_on); \ }) -#else /* !CONFIG_BUG */ -#ifndef HAVE_ARCH_BUG -#define BUG () do {} while(0) -#endif - -#ifndef HAVE_ARCH_BUG_ON -#define BUG_ON (condition) do { if (condition) ; } while(0) -#endif - -#ifndef HAVE_ARCH_WARN_ON -#define WARN_ON (condition) ({ \ - int __ret_warn_on = !!(condition); \ - unlikely(__ret_warn_on); \ -}) -#endif - -#ifndef WARN -#define WARN(condition, format...) ({ \ - int __ret_warn_on = !!(condition); \ - unlikely(__ret_warn_on); \ -}) -#endif - -#define WARN_TAINT(condition, taint, format...) WARN_ON(condition) - -#endif -#define WARN_ON_ONCE (condition) ({ \ static bool __section(.data.unlikely) __warned; \ int __ret_warn_once = !!(condition); \
@@ -163,6 +136,36 @@ extern void warn_slowpath_null(const chaunlikely (__ret_warn_once); \ }) +#else /* !CONFIG_BUG */ +#ifndef HAVE_ARCH_BUG +#define BUG () do {} while(0) +#endif + +#ifndef HAVE_ARCH_BUG_ON +#define BUG_ON (condition) do { if (condition) ; } while(0) +#endif + +#ifndef HAVE_ARCH_WARN_ON +#define WARN_ON (condition) ({ \ + int __ret_warn_on = !!(condition); \ + unlikely(__ret_warn_on); \ +}) +#endif + +#ifndef WARN +#define WARN(condition, format...) ({ \ + int __ret_warn_on = !!(condition); \ + unlikely(__ret_warn_on); \ +}) +#endif + +#define WARN_ON_ONCE (condition) WARN_ON(condition) +#define WARN_ONCE(condition, format...) WARN(condition, format) +#define WARN_TAINT(condition, taint, format...) WARN(condition, format) +#define WARN_TAINT_ONCE(condition, taint, format...) WARN(condition, format) + +#endif +/* * WARN_ON_SMP() is for cases that the warning is either * meaningless for !SMP or may even cause failures.
_
Patches currently in -mm which might be from [email protected] are
origin.patch