diff options
| author | Eric Biggers <ebiggers@kernel.org> | 2026-06-25 10:59:11 -0700 |
|---|---|---|
| committer | Keith Busch <kbusch@kernel.org> | 2026-07-06 11:28:31 -0700 |
| commit | ba6e9472b453ccea313c7dad5bf2ad98d6ad13f5 (patch) | |
| tree | 4cd0416f85c78ecbdc26814fa913573d9bfd6cc5 /tools/perf/scripts/python/bin | |
| parent | 3456b525528967456a8837b5dc166507d877a476 (diff) | |
nvme-auth: Avoid C=1 warning in nvme_auth_derive_tls_psk()
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.
Reported-by: John Garry <john.g.garry@oracle.com>
Closes: https://lore.kernel.org/linux-nvme/965a37dd-f698-46b6-9623-1099a13f7e60@oracle.com
Fixes: d126cbaa7d9a ("nvme-auth: common: use crypto library in nvme_auth_derive_tls_psk()")
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Reviewed-by: Hannes Reinecke <hare@kernel.org>
Reviewed-by: John Garry <john.g.garry@oracle.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions
