* [PATCH] bug: Fix sparse warning related to BUILD_BUG_ON_INVALID
@ 2012-11-19 11:15 Tushar Behera
2012-11-19 11:40 ` Konstantin Khlebnikov
0 siblings, 1 reply; 2+ messages in thread
From: Tushar Behera @ 2012-11-19 11:15 UTC (permalink / raw)
To: linux-kernel; +Cc: khlebnikov, akpm, patches
commit baf05aa9271b ("bug: introduce BUILD_BUG_ON_INVALID() macro")
introduces this macro when only _CHECKER_ is defined. Define
a silent macro in the else condition to fix following sparse
warning.
mm/filemap.c:395:9: error: undefined identifier 'BUILD_BUG_ON_INVALID'
mm/filemap.c:396:9: error: undefined identifier 'BUILD_BUG_ON_INVALID'
mm/filemap.c:397:9: error: undefined identifier 'BUILD_BUG_ON_INVALID'
include/linux/mm.h:419:9: error: undefined identifier 'BUILD_BUG_ON_INVALID'
include/linux/mm.h:419:9: error: not a function <noident>
Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
---
include/linux/bug.h | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/include/linux/bug.h b/include/linux/bug.h
index aaac4bb..b1cf40d 100644
--- a/include/linux/bug.h
+++ b/include/linux/bug.h
@@ -15,6 +15,7 @@ struct pt_regs;
#define BUILD_BUG_ON_NOT_POWER_OF_2(n)
#define BUILD_BUG_ON_ZERO(e) (0)
#define BUILD_BUG_ON_NULL(e) ((void*)0)
+#define BUILD_BUG_ON_INVALID(e) (0)
#define BUILD_BUG_ON(condition)
#define BUILD_BUG() (0)
#else /* __CHECKER__ */
--
1.7.4.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] bug: Fix sparse warning related to BUILD_BUG_ON_INVALID
2012-11-19 11:15 [PATCH] bug: Fix sparse warning related to BUILD_BUG_ON_INVALID Tushar Behera
@ 2012-11-19 11:40 ` Konstantin Khlebnikov
0 siblings, 0 replies; 2+ messages in thread
From: Konstantin Khlebnikov @ 2012-11-19 11:40 UTC (permalink / raw)
To: Tushar Behera; +Cc: linux-kernel, akpm, patches
Tushar Behera wrote:
> commit baf05aa9271b ("bug: introduce BUILD_BUG_ON_INVALID() macro")
> introduces this macro when only _CHECKER_ is defined. Define
> a silent macro in the else condition to fix following sparse
> warning.
>
> mm/filemap.c:395:9: error: undefined identifier 'BUILD_BUG_ON_INVALID'
> mm/filemap.c:396:9: error: undefined identifier 'BUILD_BUG_ON_INVALID'
> mm/filemap.c:397:9: error: undefined identifier 'BUILD_BUG_ON_INVALID'
> include/linux/mm.h:419:9: error: undefined identifier 'BUILD_BUG_ON_INVALID'
> include/linux/mm.h:419:9: error: not a function<noident>
>
> Signed-off-by: Tushar Behera<tushar.behera@linaro.org>
Thanks.
Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
> ---
> include/linux/bug.h | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/include/linux/bug.h b/include/linux/bug.h
> index aaac4bb..b1cf40d 100644
> --- a/include/linux/bug.h
> +++ b/include/linux/bug.h
> @@ -15,6 +15,7 @@ struct pt_regs;
> #define BUILD_BUG_ON_NOT_POWER_OF_2(n)
> #define BUILD_BUG_ON_ZERO(e) (0)
> #define BUILD_BUG_ON_NULL(e) ((void*)0)
> +#define BUILD_BUG_ON_INVALID(e) (0)
> #define BUILD_BUG_ON(condition)
> #define BUILD_BUG() (0)
> #else /* __CHECKER__ */
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-11-19 11:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-19 11:15 [PATCH] bug: Fix sparse warning related to BUILD_BUG_ON_INVALID Tushar Behera
2012-11-19 11:40 ` Konstantin Khlebnikov
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.