diff options
author | Adrian Bunk <bunk@stusta.de> | 2006-03-25 11:07:04 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-25 16:22:52 (GMT) |
commit | 5b7b18ccdeb17dcc4a2ddbf4ce87094c7365f4b9 (patch) | |
tree | cf60c476ba42f3e8aad609d0248b61074f5d65be /drivers/block | |
parent | 1aef821a6b3aeca8c19d06aee012ed9db617d1e3 (diff) | |
download | linux-fsl-qoriq-5b7b18ccdeb17dcc4a2ddbf4ce87094c7365f4b9.tar.xz |
[PATCH] drivers/block/nbd.c: don't defer compile error to runtime
If we can detect a problem at compile time, the compilation should fail.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/nbd.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index a9bde30..8bca490 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c @@ -639,10 +639,7 @@ static int __init nbd_init(void) int err = -ENOMEM; int i; - if (sizeof(struct nbd_request) != 28) { - printk(KERN_CRIT "nbd: sizeof nbd_request needs to be 28 in order to work!\n" ); - return -EIO; - } + BUILD_BUG_ON(sizeof(struct nbd_request) != 28); if (nbds_max > MAX_NBD) { printk(KERN_CRIT "nbd: cannot allocate more than %u nbds; %u requested.\n", MAX_NBD, |