All of lore.kernel.org
 help / color / mirror / Atom feed
From: bvanassche@acm.org (Bart Van Assche)
Subject: [PATCH 0/2] nvme: Check size of command structures
Date: Thu, 25 Apr 2019 08:38:55 -0700	[thread overview]
Message-ID: <1556206735.161891.146.camel@acm.org> (raw)
In-Reply-To: <20190425144408.GA17039@lst.de>

On Thu, 2019-04-25@16:44 +0200, Christoph Hellwig wrote:
> I'm not sure we are going a little too crazy with all these
> BUILD_BUG_ONs.  It would be a lot easier if we could just throw
> the assert into the struct defintion somehow, but that would need
> compiler magic..

How about something like the following just after each structure definition?

static inline void nvmf_common_command_size_check(void)
{
        BUILD_BUG_ON(sizeof(struct nvmf_common_command) != 64);
}

Bart.

  parent reply	other threads:[~2019-04-25 15:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-11 15:18 [PATCH 0/2] nvme: Check size of command structures Minwoo Im
2019-04-11 15:18 ` [PATCH 1/2] nvme: fabrics: Make sure command struct size fixed Minwoo Im
2019-04-11 22:50   ` Chaitanya Kulkarni
2019-04-24 16:36   ` Sagi Grimberg
2019-04-11 15:18 ` [PATCH 2/2] nvme: pci: " Minwoo Im
2019-04-11 22:54   ` Chaitanya Kulkarni
2019-04-24 16:36   ` Sagi Grimberg
2019-04-11 15:27 ` [PATCH 0/2] nvme: Check size of command structures Keith Busch
2019-04-11 15:34   ` Minwoo Im
2019-04-25 14:44 ` Christoph Hellwig
2019-04-25 14:51   ` Minwoo Im
2019-04-25 15:38   ` Bart Van Assche [this message]
2019-04-25 23:32     ` Minwoo Im
2019-04-30 15:31 ` Christoph Hellwig

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=1556206735.161891.146.camel@acm.org \
    --to=bvanassche@acm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.