Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / include / linux / nvme-keyring.h
blob19d2b256180fd7f9d0e9d9d2759df2c9d3d19f7e
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3 * Copyright (c) 2023 Hannes Reinecke, SUSE Labs
4 */
6 #ifndef _NVME_KEYRING_H
7 #define _NVME_KEYRING_H
9 #if IS_ENABLED(CONFIG_NVME_KEYRING)
11 key_serial_t nvme_tls_psk_default(struct key *keyring,
12 const char *hostnqn, const char *subnqn);
14 key_serial_t nvme_keyring_id(void);
15 struct key *nvme_tls_key_lookup(key_serial_t key_id);
16 #else
18 static inline key_serial_t nvme_tls_psk_default(struct key *keyring,
19 const char *hostnqn, const char *subnqn)
21 return 0;
23 static inline key_serial_t nvme_keyring_id(void)
25 return 0;
27 static inline struct key *nvme_tls_key_lookup(key_serial_t key_id)
29 return ERR_PTR(-ENOTSUPP);
31 #endif /* !CONFIG_NVME_KEYRING */
32 #endif /* _NVME_KEYRING_H */