linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] asm-generic: add __WARN() to bug.h
       [not found] <20121114163042.64f0c0495663331b9c2d60d6@canb.auug.org.au>
@ 2012-11-15  0:59 ` Randy Dunlap
  2012-11-15  1:28   ` David Rientjes
  2012-11-15  0:59 ` [PATCH 2/2] mm: balloon_compaction.c needs asm-generic/bug.h Randy Dunlap
  1 sibling, 1 reply; 5+ messages in thread
From: Randy Dunlap @ 2012-11-15  0:59 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Stephen Rothwell, linux-next, linux-kernel, Andrew Morton,
	linux-arch, Rafael Aquini, linux-mm

From: Randy Dunlap <rdunlap@infradead.org>

Add __WARN() macro for the case of CONFIG_BUG is not enabled.
This fixes a build error in mm/balloon_compaction.c.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: linux-arch@vger.kernel.org
Cc: Rafael Aquini <aquini@redhat.com>
Cc: linux-mm@kvack.org
---
 include/asm-generic/bug.h |    4 ++++
 1 file changed, 4 insertions(+)

--- linux-next-20121114.orig/include/asm-generic/bug.h
+++ linux-next-20121114/include/asm-generic/bug.h
@@ -129,6 +129,10 @@ extern void warn_slowpath_null(const cha
 })
 #endif
 
+#ifndef __WARN
+#define __WARN()	do {} while (0)
+#endif
+
 #define WARN_TAINT(condition, taint, format...) WARN_ON(condition)
 
 #endif

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 2/2] mm: balloon_compaction.c needs asm-generic/bug.h
       [not found] <20121114163042.64f0c0495663331b9c2d60d6@canb.auug.org.au>
  2012-11-15  0:59 ` [PATCH 1/2] asm-generic: add __WARN() to bug.h Randy Dunlap
@ 2012-11-15  0:59 ` Randy Dunlap
  2012-11-15  1:29   ` David Rientjes
  1 sibling, 1 reply; 5+ messages in thread
From: Randy Dunlap @ 2012-11-15  0:59 UTC (permalink / raw)
  To: Rafael Aquini
  Cc: Stephen Rothwell, linux-mm, linux-next, linux-kernel, Andrew Morton

From: Randy Dunlap <rdunlap@infradead.org>

Fix build when CONFIG_BUG is not enabled by adding header file
<asm-generic/bug.h>:

mm/balloon_compaction.c: In function 'balloon_page_putback':
mm/balloon_compaction.c:243:3: error: implicit declaration of function '__WARN'

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Rafael Aquini <aquini@redhat.com>
---
 mm/balloon_compaction.c |    1 +
 1 file changed, 1 insertion(+)

--- linux-next-20121114.orig/mm/balloon_compaction.c
+++ linux-next-20121114/mm/balloon_compaction.c
@@ -9,6 +9,7 @@
 #include <linux/slab.h>
 #include <linux/export.h>
 #include <linux/balloon_compaction.h>
+#include <asm-generic/bug.h>
 
 /*
  * balloon_devinfo_alloc - allocates a balloon device information descriptor.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] asm-generic: add __WARN() to bug.h
  2012-11-15  0:59 ` [PATCH 1/2] asm-generic: add __WARN() to bug.h Randy Dunlap
@ 2012-11-15  1:28   ` David Rientjes
  0 siblings, 0 replies; 5+ messages in thread
From: David Rientjes @ 2012-11-15  1:28 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: Arnd Bergmann, Stephen Rothwell, linux-next, linux-kernel,
	Andrew Morton, linux-arch, Rafael Aquini, linux-mm

On Wed, 14 Nov 2012, Randy Dunlap wrote:

> --- linux-next-20121114.orig/include/asm-generic/bug.h
> +++ linux-next-20121114/include/asm-generic/bug.h
> @@ -129,6 +129,10 @@ extern void warn_slowpath_null(const cha
>  })
>  #endif
>  
> +#ifndef __WARN
> +#define __WARN()	do {} while (0)
> +#endif
> +
>  #define WARN_TAINT(condition, taint, format...) WARN_ON(condition)
>  
>  #endif

__WARN() isn't supposed to be used by generic code, though.  The 
mm/balloon_compaction.c error should be resolved by 
mm-introduce-a-common-interface-for-balloon-pages-mobility-fix-fix-fix.patch 
added to -mm today.  It converts the __WARN() there into WARN_ON(1) which 
is defined appropriately for CONFIG_BUG=n.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] mm: balloon_compaction.c needs asm-generic/bug.h
  2012-11-15  0:59 ` [PATCH 2/2] mm: balloon_compaction.c needs asm-generic/bug.h Randy Dunlap
@ 2012-11-15  1:29   ` David Rientjes
  2012-11-15  1:29     ` Randy Dunlap
  0 siblings, 1 reply; 5+ messages in thread
From: David Rientjes @ 2012-11-15  1:29 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: Rafael Aquini, Stephen Rothwell, linux-mm, linux-next,
	linux-kernel, Andrew Morton

On Wed, 14 Nov 2012, Randy Dunlap wrote:

> From: Randy Dunlap <rdunlap@infradead.org>
> 
> Fix build when CONFIG_BUG is not enabled by adding header file
> <asm-generic/bug.h>:
> 
> mm/balloon_compaction.c: In function 'balloon_page_putback':
> mm/balloon_compaction.c:243:3: error: implicit declaration of function '__WARN'
> 

This is fixed by 
mm-introduce-a-common-interface-for-balloon-pages-mobility-fix-fix-fix.patch 
in -mm which converts it to WARN_ON(1) which is the generic way to trigger 
a warning.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] mm: balloon_compaction.c needs asm-generic/bug.h
  2012-11-15  1:29   ` David Rientjes
@ 2012-11-15  1:29     ` Randy Dunlap
  0 siblings, 0 replies; 5+ messages in thread
From: Randy Dunlap @ 2012-11-15  1:29 UTC (permalink / raw)
  To: David Rientjes
  Cc: Rafael Aquini, Stephen Rothwell, linux-mm, linux-next,
	linux-kernel, Andrew Morton

On 11/14/2012 05:29 PM, David Rientjes wrote:

> On Wed, 14 Nov 2012, Randy Dunlap wrote:
> 
>> From: Randy Dunlap <rdunlap@infradead.org>
>>
>> Fix build when CONFIG_BUG is not enabled by adding header file
>> <asm-generic/bug.h>:
>>
>> mm/balloon_compaction.c: In function 'balloon_page_putback':
>> mm/balloon_compaction.c:243:3: error: implicit declaration of function '__WARN'
>>
> 
> This is fixed by 
> mm-introduce-a-common-interface-for-balloon-pages-mobility-fix-fix-fix.patch 
> in -mm which converts it to WARN_ON(1) which is the generic way to trigger 
> a warning.
> --


OK, thanks for the info.

-- 
~Randy

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-11-15  1:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20121114163042.64f0c0495663331b9c2d60d6@canb.auug.org.au>
2012-11-15  0:59 ` [PATCH 1/2] asm-generic: add __WARN() to bug.h Randy Dunlap
2012-11-15  1:28   ` David Rientjes
2012-11-15  0:59 ` [PATCH 2/2] mm: balloon_compaction.c needs asm-generic/bug.h Randy Dunlap
2012-11-15  1:29   ` David Rientjes
2012-11-15  1:29     ` Randy Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox