diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-07-29 03:21:17 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-11-29 23:32:08 -0500 |
commit | 578914cffc283b907777796420148d582072cbae (patch) | |
tree | 60d2d204b217524db1c3589d97306ce9323407a1 /arch/powerpc | |
parent | 36673307aee535f951f4eede81049c6962bc4ba9 (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')
-rw-r--r-- | arch/powerpc/kernel/nvram_64.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/nvram_64.c b/arch/powerpc/kernel/nvram_64.c index a5a5587121a7..f7538820c03d 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) | |||
565 | int error; | 565 | int error; |
566 | int rc; | 566 | int rc; |
567 | 567 | ||
568 | BUILD_BUG_ON(NVRAM_BLOCK_LEN != 16); | ||
569 | |||
568 | if (ppc_md.nvram_size == NULL || ppc_md.nvram_size() <= 0) | 570 | if (ppc_md.nvram_size == NULL || ppc_md.nvram_size() <= 0) |
569 | return -ENODEV; | 571 | return -ENODEV; |
570 | 572 | ||