summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2010-07-29 17:21:17 +1000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2010-11-30 15:32:08 +1100
commit578914cffc283b907777796420148d582072cbae (patch)
tree60d2d204b217524db1c3589d97306ce9323407a1 /arch/powerpc/kernel
parent36673307aee535f951f4eede81049c6962bc4ba9 (diff)
powerpc/nvram: Ensure that the partition header/block size is right
Use BUILD_BUG_ON to ensure the structure representing a partition header have the right size. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r--arch/powerpc/kernel/nvram_64.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/nvram_64.c b/arch/powerpc/kernel/nvram_64.c
index a5a5587121a..f7538820c03 100644
--- a/arch/powerpc/kernel/nvram_64.c
+++ b/arch/powerpc/kernel/nvram_64.c
@@ -565,6 +565,8 @@ static int __init nvram_init(void)
int error;
int rc;
+ BUILD_BUG_ON(NVRAM_BLOCK_LEN != 16);
+
if (ppc_md.nvram_size == NULL || ppc_md.nvram_size() <= 0)
return -ENODEV;