treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / arch / powerpc / include / asm / secvar.h
blob4cc35b58b986273068f671c036e3fd40accce970
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3 * Copyright (C) 2019 IBM Corporation
4 * Author: Nayna Jain
6 * PowerPC secure variable operations.
7 */
8 #ifndef SECVAR_OPS_H
9 #define SECVAR_OPS_H
11 #include <linux/types.h>
12 #include <linux/errno.h>
14 extern const struct secvar_operations *secvar_ops;
16 struct secvar_operations {
17 int (*get)(const char *key, uint64_t key_len, u8 *data,
18 uint64_t *data_size);
19 int (*get_next)(const char *key, uint64_t *key_len,
20 uint64_t keybufsize);
21 int (*set)(const char *key, uint64_t key_len, u8 *data,
22 uint64_t data_size);
25 #ifdef CONFIG_PPC_SECURE_BOOT
27 extern void set_secvar_ops(const struct secvar_operations *ops);
29 #else
31 static inline void set_secvar_ops(const struct secvar_operations *ops) { }
33 #endif
35 #endif