From: Adrian Bunk <bunk@stusta.de>
To: Adam Kropelin <akropel1@rochester.rr.com>, Paul.Clements@steeleye.com
Cc: linux-kernel@vger.kernel.org
Subject: [2.6 patch] drivers/block/nbd.c: don't defer compile error to runtime
Date: Mon, 20 Feb 2006 23:36:25 +0100 [thread overview]
Message-ID: <20060220223625.GO4661@stusta.de> (raw)
If we can detect a problem at compile time, the compilation should fail.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
This patch was already sent on:
- 3 Sep 2005
--- linux-2.6.13-mm1-full/drivers/block/nbd.c.old 2005-09-02 23:48:27.000000000 +0200
+++ linux-2.6.13-mm1-full/drivers/block/nbd.c 2005-09-03 01:08:04.000000000 +0200
@@ -643,10 +643,7 @@
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,
next reply other threads:[~2006-02-20 22:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-20 22:36 Adrian Bunk [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-09-02 22:10 [2.6 patch] drivers/block/nbd.c: don't defer compile error to runtime Adrian Bunk
2005-09-02 23:20 ` Adam Kropelin
2005-09-02 23:24 ` Adrian Bunk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060220223625.GO4661@stusta.de \
--to=bunk@stusta.de \
--cc=Paul.Clements@steeleye.com \
--cc=akropel1@rochester.rr.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox