[PATCH] nvme-auth: Avoid C=1 warning in nvme_auth_derive_tls_psk()

Keith Busch kbusch at kernel.org
Mon Jul 6 11:55:38 PDT 2026


On Thu, Jun 25, 2026 at 10:59:11AM -0700, Eric Biggers wrote:
> The following works fine with gcc and clang, but sparse warns about
> label_len not being an actual constant expression:
> 
>     const size_t label_len = sizeof(label) - 1;
>     ...
>     static_assert(label_len <= 255);
> 
> Avoid this by giving label an explicit length and using sizeof(label)
> instead of label_len.

Thanks, applied to nvme-7.3.



More information about the Linux-nvme mailing list