Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

crypto: api - Move crypto attr definitions out of crypto.h

The definitions for crypto_attr-related types and enums are not
needed by most Crypto API users. This patch moves them out of
crypto.h and into algapi.h/internal.h depending on the extent of
their use.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

+21 -21
+12
crypto/internal.h
··· 29 29 u32 mask; 30 30 }; 31 31 32 + enum { 33 + CRYPTOA_UNSPEC, 34 + CRYPTOA_ALG, 35 + CRYPTOA_TYPE, 36 + __CRYPTOA_MAX, 37 + }; 38 + 39 + #define CRYPTOA_MAX (__CRYPTOA_MAX - 1) 40 + 41 + /* Maximum number of (rtattr) parameters for each template. */ 42 + #define CRYPTO_MAX_ATTRS 32 43 + 32 44 extern struct list_head crypto_alg_list; 33 45 extern struct rw_semaphore crypto_alg_sem; 34 46 extern struct blocking_notifier_head crypto_chain;
+9
include/crypto/algapi.h
··· 96 96 unsigned int offset; 97 97 }; 98 98 99 + struct crypto_attr_alg { 100 + char name[CRYPTO_MAX_ALG_NAME]; 101 + }; 102 + 103 + struct crypto_attr_type { 104 + u32 type; 105 + u32 mask; 106 + }; 107 + 99 108 void crypto_mod_put(struct crypto_alg *alg); 100 109 101 110 int crypto_register_template(struct crypto_template *tmpl);
-21
include/linux/crypto.h
··· 643 643 struct crypto_tfm base; 644 644 }; 645 645 646 - enum { 647 - CRYPTOA_UNSPEC, 648 - CRYPTOA_ALG, 649 - CRYPTOA_TYPE, 650 - __CRYPTOA_MAX, 651 - }; 652 - 653 - #define CRYPTOA_MAX (__CRYPTOA_MAX - 1) 654 - 655 - /* Maximum number of (rtattr) parameters for each template. */ 656 - #define CRYPTO_MAX_ATTRS 32 657 - 658 - struct crypto_attr_alg { 659 - char name[CRYPTO_MAX_ALG_NAME]; 660 - }; 661 - 662 - struct crypto_attr_type { 663 - u32 type; 664 - u32 mask; 665 - }; 666 - 667 646 /* 668 647 * Transform user interface. 669 648 */