OSDN Git Service

crypto: doc - Add parameter documentation
authorHook, Gary <Gary.Hook@amd.com>
Tue, 25 Jun 2019 23:43:43 +0000 (23:43 +0000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 3 Jul 2019 14:13:12 +0000 (22:13 +0800)
Fill in missing parameter descriptions for the compression algorithm,
then pick them up to document for the compression_alg structure.

Signed-off-by: Gary R Hook <gary.hook@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Documentation/crypto/api-skcipher.rst
include/linux/crypto.h

index 4eec4a9..20ba08d 100644 (file)
@@ -5,7 +5,7 @@ Block Cipher Algorithm Definitions
    :doc: Block Cipher Algorithm Definitions
 
 .. kernel-doc:: include/linux/crypto.h
-   :functions: crypto_alg ablkcipher_alg blkcipher_alg cipher_alg
+   :functions: crypto_alg ablkcipher_alg blkcipher_alg cipher_alg compress_alg
 
 Symmetric Key Cipher API
 ------------------------
index 311237b..4b4e2ff 100644 (file)
@@ -327,6 +327,17 @@ struct cipher_alg {
        void (*cia_decrypt)(struct crypto_tfm *tfm, u8 *dst, const u8 *src);
 };
 
+/**
+ * struct compress_alg - compression/decompression algorithm
+ * @coa_compress: Compress a buffer of specified length, storing the resulting
+ *               data in the specified buffer. Return the length of the
+ *               compressed data in dlen.
+ * @coa_decompress: Decompress the source buffer, storing the uncompressed
+ *                 data in the specified buffer. The length of the data is
+ *                 returned in dlen.
+ *
+ * All fields are mandatory.
+ */
 struct compress_alg {
        int (*coa_compress)(struct crypto_tfm *tfm, const u8 *src,
                            unsigned int slen, u8 *dst, unsigned int *dlen);