Skip to contentSkip to conversation

nvme-keyring: mark nvme_dhchap_psk_hash() as static inline

PATCH Applied Chaitanya Kulkarni 3 participants 3 messages Nov 2, 2025 – Nov 3, 2025 NVMe

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nvme-keyring: mark nvme_dhchap_psk_hash() as static inline

Fix build warning when CONFIG_NVME_KEYRING is not enabled:

include/linux/nvme-keyring.h:57:4: warning: no previous prototype for function 'nvme_dhchap_psk_hash' [-Wmissing-prototypes]

The nvme_dhchap_psk_hash() stub function in the #else block is missing the 'static inline' qualifiers that all other stub functions in the same block have. Add them to fix the warning.

---
 include/linux/nvme-keyring.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/nvme-keyring.h +1 -1
index 6115bf5cf346..4bdac22b3cbb 100644
@@ -54,7 +54,7 @@ static inline struct key *nvme_dhchap_psk_lookup(struct key *keyring,
 {
 	return ERR_PTR(-ENOTSUPP);
 }
-u8 nvme_dhchap_psk_hash(struct key *key)
+static inline u8 nvme_dhchap_psk_hash(struct key *key)
 {
 	return 0;
 }
Signature · 1 line
2.40.0
maintainer Applied
#2 lore raw
In reply to Chaitanya Kulkarni
Quoted 8 lines · Chaitanya Kulkarni

Fix build warning when CONFIG_NVME_KEYRING is not enabled:

include/linux/nvme-keyring.h:57:4: warning: no previous prototype for function 'nvme_dhchap_psk_hash' [-Wmissing-prototypes]

The nvme_dhchap_psk_hash() stub function in the #else block is missing the 'static inline' qualifiers that all other stub functions in the same block have. Add them to fix the warning.

Thanks, applied to nvme-6.19.