Re: [PATCH] nvme-auth: Avoid C=1 warning in nvme_auth_derive_tls_psk()
Keith Busch <[email protected]>
| Newsgroups | org.infradead.lists.linux-nvme |
|---|---|
| Message-ID | <akv6KmKqp2y5MHPS@kbusch-mbp> |
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.