public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Adam Kropelin <akropel1@rochester.rr.com>
To: Adrian Bunk <bunk@stusta.de>
Cc: Paul.Clements@steeleye.com, linux-kernel@vger.kernel.org
Subject: Re: [2.6 patch] drivers/block/nbd.c: don't defer compile error to runtime
Date: Fri, 2 Sep 2005 19:20:47 -0400	[thread overview]
Message-ID: <20050902192047.A5879@mail.kroptech.com> (raw)
In-Reply-To: <20050902221059.GY3657@stusta.de>

Adrian Bunk wrote:
> If we can detect a problem at compile time, the compilation should
> fail.

[...] 

>  	if (sizeof(struct nbd_request) != 28) {
> -		printk(KERN_CRIT "nbd: sizeof nbd_request needs to be 28 in order to work!\n" );
> -		return -EIO;
> +		extern void nbd_request_wrong_size(void);
> +		nbd_request_wrong_size();

	BUILD_BUG_ON(sizeof(struct nbd_request) != 28);

...perhaps?

--Adam


  reply	other threads:[~2005-09-02 22:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2005-09-02 23:24   ` Adrian Bunk
  -- strict thread matches above, loose matches on Subject: below --
2006-02-20 22:36 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=20050902192047.A5879@mail.kroptech.com \
    --to=akropel1@rochester.rr.com \
    --cc=Paul.Clements@steeleye.com \
    --cc=bunk@stusta.de \
    --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