Skip to content

nvme: Check size of command structures

Bart Van Assche linux-nvme 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest0 of 2 patches 0 repliesNew

Patches in v1 No applies recorded yet

None of the 2 patches the cover letter announces are in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] nvme: Check size of command structures
Quoted 4 lines · Christoph Hellwig

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.