crypto: api - Move module sig ifdef into accessor function
Currently we're hiding mod->sig_ok under an ifdef in open code. This patch adds a module_sig_ok accessor function and removes that ifdef. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Acked-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -655,4 +655,16 @@ static inline void module_bug_finalize(const Elf_Ehdr *hdr,
|
||||
static inline void module_bug_cleanup(struct module *mod) {}
|
||||
#endif /* CONFIG_GENERIC_BUG */
|
||||
|
||||
#ifdef CONFIG_MODULE_SIG
|
||||
static inline bool module_sig_ok(struct module *module)
|
||||
{
|
||||
return module->sig_ok;
|
||||
}
|
||||
#else /* !CONFIG_MODULE_SIG */
|
||||
static inline bool module_sig_ok(struct module *module)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
#endif /* CONFIG_MODULE_SIG */
|
||||
|
||||
#endif /* _LINUX_MODULE_H */
|
||||
|
Reference in New Issue
Block a user