* [PATCH] bogus BUILD_BUG_ON() in bpa_iommu
@ 2005-09-30 2:36 Al Viro
0 siblings, 0 replies; only message in thread
From: Al Viro @ 2005-09-30 2:36 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linux-kernel, linuxppc64-dev
BUILD_BUG_ON(1) is asking for trouble (and getting it) when used
in that manner - dead code elimination happens after we parse it and
invalid type is invalid type, dead code or not.
It might be version-dependent, but at least 4.0.1 refuses to
accept that.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
----
diff -urN RC14-rc2-git6-base/arch/ppc64/kernel/bpa_iommu.c current/arch/ppc64/kernel/bpa_iommu.c
--- RC14-rc2-git6-base/arch/ppc64/kernel/bpa_iommu.c 2005-09-26 00:02:29.000000000 -0400
+++ current/arch/ppc64/kernel/bpa_iommu.c 2005-09-15 14:22:33.000000000 -0400
@@ -99,7 +99,11 @@
break;
default: /* not a known compile time constant */
- BUILD_BUG_ON(1);
+ {
+ /* BUILD_BUG_ON() is not usable here */
+ extern void __get_iost_entry_bad_page_size(void);
+ __get_iost_entry_bad_page_size();
+ }
break;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-09-30 2:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-30 2:36 [PATCH] bogus BUILD_BUG_ON() in bpa_iommu Al Viro
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox