From: Adrian Bunk <bunk@stusta.de>
To: Andrew Morton <akpm@osdl.org>
Cc: Adam Kropelin <akropel1@rochester.rr.com>,
Paul.Clements@steeleye.com, linux-kernel@vger.kernel.org
Subject: [2.6 patch] drivers/block/nbd.c: don't defer compile error to runtime (fwd)
Date: Sat, 25 Feb 2006 17:01:53 +0100 [thread overview]
Message-ID: <20060225160153.GY3674@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:
- 20 Feb 2006
- 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-25 16:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-25 16:01 Adrian Bunk [this message]
2006-02-25 22:05 ` [2.6 patch] drivers/block/nbd.c: don't defer compile error to runtime (fwd) Jan Engelhardt
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=20060225160153.GY3674@stusta.de \
--to=bunk@stusta.de \
--cc=Paul.Clements@steeleye.com \
--cc=akpm@osdl.org \
--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