2023-03-14 03:19:55

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build warnings after merge of the crypto tree

Hi all,

After merging the crypto tree, today's linux-next build (htmldocs)
produced these warnings:

include/crypto/hash.h:69: error: Cannot parse struct or union!
include/crypto/hash.h:69: error: Cannot parse struct or union!
include/crypto/hash.h:245: warning: Function parameter or member 'HASH_ALG_COMMON' not described in 'shash_alg'
include/crypto/hash.h:69: error: Cannot parse struct or union!
include/crypto/hash.h:69: error: Cannot parse struct or union!
include/crypto/hash.h:69: error: Cannot parse struct or union!
include/crypto/hash.h:69: error: Cannot parse struct or union!
include/crypto/hash.h:69: error: Cannot parse struct or union!
include/crypto/hash.h:69: error: Cannot parse struct or union!

Introduced by commit

0e4e6d7094df ("crypto: hash - Count error stats differently")

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (488.00 B)
OpenPGP digital signature

2023-03-14 05:02:51

by Herbert Xu

[permalink] [raw]
Subject: [PATCH] crypto: hash - Fix kdoc errors about HASH_ALG_COMMON

On Tue, Mar 14, 2023 at 02:19:47PM +1100, Stephen Rothwell wrote:
> Hi all,
>
> After merging the crypto tree, today's linux-next build (htmldocs)
> produced these warnings:
>
> include/crypto/hash.h:69: error: Cannot parse struct or union!
> include/crypto/hash.h:69: error: Cannot parse struct or union!
> include/crypto/hash.h:245: warning: Function parameter or member 'HASH_ALG_COMMON' not described in 'shash_alg'
> include/crypto/hash.h:69: error: Cannot parse struct or union!
> include/crypto/hash.h:69: error: Cannot parse struct or union!
> include/crypto/hash.h:69: error: Cannot parse struct or union!
> include/crypto/hash.h:69: error: Cannot parse struct or union!
> include/crypto/hash.h:69: error: Cannot parse struct or union!
> include/crypto/hash.h:69: error: Cannot parse struct or union!
>
> Introduced by commit
>
> 0e4e6d7094df ("crypto: hash - Count error stats differently")

Thanks for the report Stephen. I hope this patch makes them go
away:

---8<---
The HASH_ALG_COMMON macro cannot be parsed by kdoc so mark it as
a normal comment instead of kdoc. Also add HASH_ALG_COMMON as a
structure member of shash_alg.

Fixes: 0e4e6d7094df ("crypto: hash - Count error stats differently")
Reported-by: Stephen Rothwell <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>

diff --git a/include/crypto/hash.h b/include/crypto/hash.h
index 2aa61e7679db..1ed674ba8429 100644
--- a/include/crypto/hash.h
+++ b/include/crypto/hash.h
@@ -41,7 +41,7 @@ struct crypto_istat_hash {
#define HASH_ALG_COMMON_STAT
#endif

-/**
+/*
* struct hash_alg_common - define properties of message digest
* @stat: Statistics for hash algorithm.
* @digestsize: Size of the result of the transformation. A buffer of this size
@@ -219,6 +219,7 @@ struct shash_desc {
* @stat: Statistics for hash algorithm.
* @base: internally used
* @halg: see struct hash_alg_common
+ * @HASH_ALG_COMMON: see struct hash_alg_common
*/
struct shash_alg {
int (*init)(struct shash_desc *desc);
--
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt