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

crypto: bcm - Fix a whole host of kernel-doc misdemeanours

Fixes the following W=1 kernel build warning(s):

drivers/crypto/bcm/util.c:136: warning: Function parameter or member 'from_nents' not described in 'spu_msg_sg_add'
drivers/crypto/bcm/util.c:136: warning: Function parameter or member 'length' not described in 'spu_msg_sg_add'
drivers/crypto/bcm/spu.c:464: warning: Excess function parameter 'Return' description in 'spum_gcm_ccm_pad_len'
drivers/crypto/bcm/spu.c:524: warning: Function parameter or member 'iv_len' not described in 'spum_aead_ivlen'
drivers/crypto/bcm/spu.c:524: warning: expecting prototype for spu_aead_ivlen(). Prototype was for spum_aead_ivlen() instead
drivers/crypto/bcm/spu.c:556: warning: Function parameter or member 'alg_digest_size' not described in 'spum_digest_size'
drivers/crypto/bcm/spu.c:556: warning: Function parameter or member 'alg' not described in 'spum_digest_size'
drivers/crypto/bcm/spu.c:556: warning: Function parameter or member 'htype' not described in 'spum_digest_size'
drivers/crypto/bcm/spu.c:583: warning: bad line:
drivers/crypto/bcm/spu.c:927: warning: Function parameter or member 'is_inbound' not described in 'spum_cipher_req_finish'
drivers/crypto/bcm/spu.c:927: warning: Excess function parameter 'isInbound' description in 'spum_cipher_req_finish'
drivers/crypto/bcm/spu2.c:557: warning: Function parameter or member 'fmd' not described in 'spu2_fmd_init'
drivers/crypto/bcm/spu2.c:557: warning: Function parameter or member 'spu2_type' not described in 'spu2_fmd_init'
drivers/crypto/bcm/spu2.c:557: warning: Excess function parameter 'spu2_cipher_type' description in 'spu2_fmd_init'
drivers/crypto/bcm/spu2.c:615: warning: Function parameter or member 'auth_first' not described in 'spu2_fmd_ctrl0_write'
drivers/crypto/bcm/spu2.c:615: warning: Excess function parameter 'authFirst' description in 'spu2_fmd_ctrl0_write'
drivers/crypto/bcm/spu2.c:666: warning: Function parameter or member 'is_inbound' not described in 'spu2_fmd_ctrl1_write'
drivers/crypto/bcm/spu2.c:803: warning: expecting prototype for spu_payload_length(). Prototype was for spu2_payload_length() instead
drivers/crypto/bcm/spu2.c:825: warning: Function parameter or member 'is_hash' not described in 'spu2_response_hdr_len'
drivers/crypto/bcm/spu2.c:825: warning: expecting prototype for spu_response_hdr_len(). Prototype was for spu2_response_hdr_len() instead
drivers/crypto/bcm/spu2.c:843: warning: expecting prototype for spu_hash_pad_len(). Prototype was for spu2_hash_pad_len() instead
drivers/crypto/bcm/spu2.c:855: warning: Function parameter or member 'cipher_mode' not described in 'spu2_gcm_ccm_pad_len'
drivers/crypto/bcm/spu2.c:855: warning: Function parameter or member 'data_size' not described in 'spu2_gcm_ccm_pad_len'
drivers/crypto/bcm/spu2.c:855: warning: expecting prototype for spu2_gcm_ccm_padlen(). Prototype was for spu2_gcm_ccm_pad_len() instead
drivers/crypto/bcm/spu2.c:872: warning: expecting prototype for spu_assoc_resp_len(). Prototype was for spu2_assoc_resp_len() instead
drivers/crypto/bcm/spu2.c:919: warning: Function parameter or member 'alg_digest_size' not described in 'spu2_digest_size'
drivers/crypto/bcm/spu2.c:919: warning: Function parameter or member 'alg' not described in 'spu2_digest_size'
drivers/crypto/bcm/spu2.c:919: warning: Function parameter or member 'htype' not described in 'spu2_digest_size'
drivers/crypto/bcm/spu2.c:945: warning: expecting prototype for spu_create_request(). Prototype was for spu2_create_request() instead
drivers/crypto/bcm/spu2.c:1122: warning: expecting prototype for spu_cipher_req_init(). Prototype was for spu2_cipher_req_init() instead
drivers/crypto/bcm/spu2.c:1182: warning: Function parameter or member 'is_inbound' not described in 'spu2_cipher_req_finish'
drivers/crypto/bcm/spu2.c:1182: warning: expecting prototype for spu_cipher_req_finish(). Prototype was for spu2_cipher_req_finish() instead
drivers/crypto/bcm/spu2.c:1243: warning: expecting prototype for spu_request_pad(). Prototype was for spu2_request_pad() instead
drivers/crypto/bcm/spu2.c:1321: warning: expecting prototype for spu_status_process(). Prototype was for spu2_status_process() instead
drivers/crypto/bcm/cipher.c:1048: warning: Function parameter or member 'req' not described in 'spu_aead_rx_sg_create'
drivers/crypto/bcm/cipher.c:2966: warning: Function parameter or member 'cipher' not described in 'rfc4543_gcm_esp_setkey'
drivers/crypto/bcm/cipher.c:2966: warning: Function parameter or member 'key' not described in 'rfc4543_gcm_esp_setkey'
drivers/crypto/bcm/cipher.c:2966: warning: Function parameter or member 'keylen' not described in 'rfc4543_gcm_esp_setkey'

Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Rob Rice <rob.rice@broadcom.com>
Cc: linux-crypto@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Lee Jones and committed by
Herbert Xu
85a557cb 45394566

+38 -32
+4 -3
drivers/crypto/bcm/cipher.c
··· 1019 1019 * a SPU response message for an AEAD request. Includes buffers to catch SPU 1020 1020 * message headers and the response data. 1021 1021 * @mssg: mailbox message containing the receive sg 1022 + * @req: Crypto API request 1022 1023 * @rctx: crypto request context 1023 1024 * @rx_frag_num: number of scatterlist elements required to hold the 1024 1025 * SPU response message ··· 2953 2952 2954 2953 /** 2955 2954 * rfc4543_gcm_esp_setkey() - setkey operation for RFC4543 variant of GCM/GMAC. 2956 - * cipher: AEAD structure 2957 - * key: Key followed by 4 bytes of salt 2958 - * keylen: Length of key plus salt, in bytes 2955 + * @cipher: AEAD structure 2956 + * @key: Key followed by 4 bytes of salt 2957 + * @keylen: Length of key plus salt, in bytes 2959 2958 * 2960 2959 * Extracts salt from key and stores it to be prepended to IV on each request. 2961 2960 * Digest is always 16 bytes
+8 -8
drivers/crypto/bcm/spu.c
··· 457 457 * @cipher_mode: Algo type 458 458 * @data_size: Length of plaintext (bytes) 459 459 * 460 - * @Return: Length of padding, in bytes 460 + * Return: Length of padding, in bytes 461 461 */ 462 462 u32 spum_gcm_ccm_pad_len(enum spu_cipher_mode cipher_mode, 463 463 unsigned int data_size) ··· 510 510 } 511 511 512 512 /** 513 - * spu_aead_ivlen() - Calculate the length of the AEAD IV to be included 513 + * spum_aead_ivlen() - Calculate the length of the AEAD IV to be included 514 514 * in a SPU request after the AAD and before the payload. 515 515 * @cipher_mode: cipher mode 516 - * @iv_ctr_len: initialization vector length in bytes 516 + * @iv_len: initialization vector length in bytes 517 517 * 518 518 * In Linux ~4.2 and later, the assoc_data sg includes the IV. So no need 519 519 * to include the IV as a separate field in the SPU request msg. ··· 543 543 /** 544 544 * spum_digest_size() - Determine the size of a hash digest to expect the SPU to 545 545 * return. 546 - * alg_digest_size: Number of bytes in the final digest for the given algo 547 - * alg: The hash algorithm 548 - * htype: Type of hash operation (init, update, full, etc) 546 + * @alg_digest_size: Number of bytes in the final digest for the given algo 547 + * @alg: The hash algorithm 548 + * @htype: Type of hash operation (init, update, full, etc) 549 549 * 550 550 * When doing incremental hashing for an algorithm with a truncated hash 551 551 * (e.g., SHA224), the SPU returns the full digest so that it can be fed back as ··· 580 580 * @aead_parms: Parameters related to AEAD operation 581 581 * @data_size: Length of data to be encrypted or authenticated. If AEAD, does 582 582 * not include length of AAD. 583 - 583 + * 584 584 * Return: the length of the SPU header in bytes. 0 if an error occurs. 585 585 */ 586 586 u32 spum_create_request(u8 *spu_hdr, ··· 911 911 * setkey() time in spu_cipher_req_init(). 912 912 * @spu_hdr: Start of the request message header (MH field) 913 913 * @spu_req_hdr_len: Length in bytes of the SPU request header 914 - * @isInbound: 0 encrypt, 1 decrypt 914 + * @is_inbound: 0 encrypt, 1 decrypt 915 915 * @cipher_parms: Parameters describing cipher operation to be performed 916 916 * @data_size: Length of the data in the BD field 917 917 *
+24 -19
drivers/crypto/bcm/spu2.c
··· 543 543 /** 544 544 * spu2_fmd_init() - At setkey time, initialize the fixed meta data for 545 545 * subsequent skcipher requests for this context. 546 - * @spu2_cipher_type: Cipher algorithm 546 + * @fmd: Start of FMD field to be written 547 + * @spu2_type: Cipher algorithm 547 548 * @spu2_mode: Cipher mode 548 549 * @cipher_key_len: Length of cipher key, in bytes 549 550 * @cipher_iv_len: Length of cipher initialization vector, in bytes ··· 599 598 * SPU request packet. 600 599 * @fmd: Start of FMD field to be written 601 600 * @is_inbound: true if decrypting. false if encrypting. 602 - * @authFirst: true if alg authenticates before encrypting 601 + * @auth_first: true if alg authenticates before encrypting 603 602 * @protocol: protocol selector 604 603 * @cipher_type: cipher algorithm 605 604 * @cipher_mode: cipher mode ··· 641 640 * spu2_fmd_ctrl1_write() - Write ctrl1 field in fixed metadata (FMD) field of 642 641 * SPU request packet. 643 642 * @fmd: Start of FMD field to be written 643 + * @is_inbound: true if decrypting. false if encrypting. 644 644 * @assoc_size: Length of additional associated data, in bytes 645 645 * @auth_key_len: Length of authentication key, in bytes 646 646 * @cipher_key_len: Length of cipher key, in bytes ··· 795 793 } 796 794 797 795 /** 798 - * spu_payload_length() - Given a SPU2 message header, extract the payload 796 + * spu2_payload_length() - Given a SPU2 message header, extract the payload 799 797 * length. 800 798 * @spu_hdr: Start of SPU message header (FMD) 801 799 * ··· 814 812 } 815 813 816 814 /** 817 - * spu_response_hdr_len() - Determine the expected length of a SPU response 815 + * spu2_response_hdr_len() - Determine the expected length of a SPU response 818 816 * header. 819 817 * @auth_key_len: Length of authentication key, in bytes 820 818 * @enc_key_len: Length of encryption key, in bytes 819 + * @is_hash: Unused 821 820 * 822 821 * For SPU2, includes just FMD. OMD is never requested. 823 822 * ··· 830 827 } 831 828 832 829 /** 833 - * spu_hash_pad_len() - Calculate the length of hash padding required to extend 830 + * spu2_hash_pad_len() - Calculate the length of hash padding required to extend 834 831 * data to a full block size. 835 832 * @hash_alg: hash algorithm 836 833 * @hash_mode: hash mode ··· 848 845 } 849 846 850 847 /** 851 - * spu2_gcm_ccm_padlen() - Determine the length of GCM/CCM padding for either 848 + * spu2_gcm_ccm_pad_len() - Determine the length of GCM/CCM padding for either 852 849 * the AAD field or the data. 850 + * @cipher_mode: Unused 851 + * @data_size: Unused 853 852 * 854 853 * Return: 0. Unlike SPU-M, SPU2 hardware does any GCM/CCM padding required. 855 854 */ ··· 862 857 } 863 858 864 859 /** 865 - * spu_assoc_resp_len() - Determine the size of the AAD2 buffer needed to catch 860 + * spu2_assoc_resp_len() - Determine the size of the AAD2 buffer needed to catch 866 861 * associated data in a SPU2 output packet. 867 862 * @cipher_mode: cipher mode 868 863 * @assoc_len: length of additional associated data, in bytes ··· 883 878 return resp_len; 884 879 } 885 880 886 - /* 887 - * spu_aead_ivlen() - Calculate the length of the AEAD IV to be included 881 + /** 882 + * spu2_aead_ivlen() - Calculate the length of the AEAD IV to be included 888 883 * in a SPU request after the AAD and before the payload. 889 884 * @cipher_mode: cipher mode 890 - * @iv_ctr_len: initialization vector length in bytes 885 + * @iv_len: initialization vector length in bytes 891 886 * 892 887 * For SPU2, AEAD IV is included in OMD and does not need to be repeated 893 888 * prior to the payload. ··· 914 909 /** 915 910 * spu2_digest_size() - Determine the size of a hash digest to expect the SPU to 916 911 * return. 917 - * alg_digest_size: Number of bytes in the final digest for the given algo 918 - * alg: The hash algorithm 919 - * htype: Type of hash operation (init, update, full, etc) 912 + * @alg_digest_size: Number of bytes in the final digest for the given algo 913 + * @alg: The hash algorithm 914 + * @htype: Type of hash operation (init, update, full, etc) 920 915 * 921 916 */ 922 917 u32 spu2_digest_size(u32 alg_digest_size, enum hash_alg alg, ··· 926 921 } 927 922 928 923 /** 929 - * spu_create_request() - Build a SPU2 request message header, includint FMD and 924 + * spu2_create_request() - Build a SPU2 request message header, includint FMD and 930 925 * OMD. 931 926 * @spu_hdr: Start of buffer where SPU request header is to be written 932 927 * @req_opts: SPU request message options ··· 1110 1105 } 1111 1106 1112 1107 /** 1113 - * spu_cipher_req_init() - Build an skcipher SPU2 request message header, 1108 + * spu2_cipher_req_init() - Build an skcipher SPU2 request message header, 1114 1109 * including FMD and OMD. 1115 1110 * @spu_hdr: Location of start of SPU request (FMD field) 1116 1111 * @cipher_parms: Parameters describing cipher request ··· 1167 1162 } 1168 1163 1169 1164 /** 1170 - * spu_cipher_req_finish() - Finish building a SPU request message header for a 1165 + * spu2_cipher_req_finish() - Finish building a SPU request message header for a 1171 1166 * block cipher request. 1172 1167 * @spu_hdr: Start of the request message header (MH field) 1173 1168 * @spu_req_hdr_len: Length in bytes of the SPU request header 1174 - * @isInbound: 0 encrypt, 1 decrypt 1169 + * @is_inbound: 0 encrypt, 1 decrypt 1175 1170 * @cipher_parms: Parameters describing cipher operation to be performed 1176 1171 * @data_size: Length of the data in the BD field 1177 1172 * ··· 1227 1222 } 1228 1223 1229 1224 /** 1230 - * spu_request_pad() - Create pad bytes at the end of the data. 1225 + * spu2_request_pad() - Create pad bytes at the end of the data. 1231 1226 * @pad_start: Start of buffer where pad bytes are to be written 1232 1227 * @gcm_padding: Length of GCM padding, in bytes 1233 1228 * @hash_pad_len: Number of bytes of padding extend data to full block ··· 1316 1311 } 1317 1312 1318 1313 /** 1319 - * spu_status_process() - Process the status from a SPU response message. 1314 + * spu2_status_process() - Process the status from a SPU response message. 1320 1315 * @statp: start of STATUS word 1321 1316 * 1322 1317 * Return: 0 - if status is good and response should be processed
+2 -2
drivers/crypto/bcm/util.c
··· 119 119 * @from_skip: number of bytes to skip in from_sg. Non-zero when previous 120 120 * request included part of the buffer in entry in from_sg. 121 121 * Assumes from_skip < from_sg->length. 122 - * @from_nents number of entries in from_sg 123 - * @length number of bytes to copy. may reach this limit before exhausting 122 + * @from_nents: number of entries in from_sg 123 + * @length: number of bytes to copy. may reach this limit before exhausting 124 124 * from_sg. 125 125 * 126 126 * Copies the entries themselves, not the data in the entries. Assumes to_sg has