* kernel-doc comment with anonymous variable in anonymous union?
@ 2025-12-15 9:12 Bagas Sanjaya
2025-12-15 9:40 ` Herbert Xu
0 siblings, 1 reply; 3+ messages in thread
From: Bagas Sanjaya @ 2025-12-15 9:12 UTC (permalink / raw)
To: Linux Kernel Mailing List, Linux Crypto, Linux Documentation
Cc: Randy Dunlap, Herbert Xu, David S. Miller, Jonathan Corbet
[-- Attachment #1: Type: text/plain, Size: 979 bytes --]
Hi,
kernel-doc reports warning on include/crypto/skcipher.h:
WARNING: ./include/crypto/skcipher.h:166 struct member 'SKCIPHER_ALG_COMMON' not described in 'skcipher_alg'
skciper_alg struct is defined as:
struct skcipher_alg {
int (*setkey)(struct crypto_skcipher *tfm, const u8 *key,
unsigned int keylen);
int (*encrypt)(struct skcipher_request *req);
int (*decrypt)(struct skcipher_request *req);
int (*export)(struct skcipher_request *req, void *out);
int (*import)(struct skcipher_request *req, const void *in);
int (*init)(struct crypto_skcipher *tfm);
void (*exit)(struct crypto_skcipher *tfm);
unsigned int walksize;
union {
struct SKCIPHER_ALG_COMMON;
struct skcipher_alg_common co;
};
};
Note the first member in the union, which is an anonymous (i.e. unnamed) variable.
What can I do on it? Should the offending member be deleted?
Thanks.
--
An old man doll... just what I always wanted! - Clara
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: kernel-doc comment with anonymous variable in anonymous union?
2025-12-15 9:12 kernel-doc comment with anonymous variable in anonymous union? Bagas Sanjaya
@ 2025-12-15 9:40 ` Herbert Xu
2025-12-15 11:11 ` Bagas Sanjaya
0 siblings, 1 reply; 3+ messages in thread
From: Herbert Xu @ 2025-12-15 9:40 UTC (permalink / raw)
To: Bagas Sanjaya
Cc: Linux Kernel Mailing List, Linux Crypto, Linux Documentation,
Randy Dunlap, David S. Miller, Jonathan Corbet
On Mon, Dec 15, 2025 at 04:12:44PM +0700, Bagas Sanjaya wrote:
> Hi,
>
> kernel-doc reports warning on include/crypto/skcipher.h:
>
> WARNING: ./include/crypto/skcipher.h:166 struct member 'SKCIPHER_ALG_COMMON' not described in 'skcipher_alg'
>
> skciper_alg struct is defined as:
>
> struct skcipher_alg {
> int (*setkey)(struct crypto_skcipher *tfm, const u8 *key,
> unsigned int keylen);
> int (*encrypt)(struct skcipher_request *req);
> int (*decrypt)(struct skcipher_request *req);
> int (*export)(struct skcipher_request *req, void *out);
> int (*import)(struct skcipher_request *req, const void *in);
> int (*init)(struct crypto_skcipher *tfm);
> void (*exit)(struct crypto_skcipher *tfm);
>
> unsigned int walksize;
>
> union {
> struct SKCIPHER_ALG_COMMON;
> struct skcipher_alg_common co;
> };
> };
>
> Note the first member in the union, which is an anonymous (i.e. unnamed) variable.
>
> What can I do on it? Should the offending member be deleted?
You could either add a comment about SKCIPHER_ALG_COMMON, or
fix up all the code that uses it by adding "co."
Thanks,
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: kernel-doc comment with anonymous variable in anonymous union?
2025-12-15 9:40 ` Herbert Xu
@ 2025-12-15 11:11 ` Bagas Sanjaya
0 siblings, 0 replies; 3+ messages in thread
From: Bagas Sanjaya @ 2025-12-15 11:11 UTC (permalink / raw)
To: Herbert Xu
Cc: Linux Kernel Mailing List, Linux Crypto, Linux Documentation,
Randy Dunlap, David S. Miller, Jonathan Corbet
[-- Attachment #1: Type: text/plain, Size: 1411 bytes --]
On Mon, Dec 15, 2025 at 05:40:43PM +0800, Herbert Xu wrote:
> On Mon, Dec 15, 2025 at 04:12:44PM +0700, Bagas Sanjaya wrote:
> > Hi,
> >
> > kernel-doc reports warning on include/crypto/skcipher.h:
> >
> > WARNING: ./include/crypto/skcipher.h:166 struct member 'SKCIPHER_ALG_COMMON' not described in 'skcipher_alg'
> >
> > skciper_alg struct is defined as:
> >
> > struct skcipher_alg {
> > int (*setkey)(struct crypto_skcipher *tfm, const u8 *key,
> > unsigned int keylen);
> > int (*encrypt)(struct skcipher_request *req);
> > int (*decrypt)(struct skcipher_request *req);
> > int (*export)(struct skcipher_request *req, void *out);
> > int (*import)(struct skcipher_request *req, const void *in);
> > int (*init)(struct crypto_skcipher *tfm);
> > void (*exit)(struct crypto_skcipher *tfm);
> >
> > unsigned int walksize;
> >
> > union {
> > struct SKCIPHER_ALG_COMMON;
> > struct skcipher_alg_common co;
> > };
> > };
> >
> > Note the first member in the union, which is an anonymous (i.e. unnamed) variable.
> >
> > What can I do on it? Should the offending member be deleted?
>
> You could either add a comment about SKCIPHER_ALG_COMMON, or
> fix up all the code that uses it by adding "co."
But that SKCIPHER_ALG_COMMON doesn't have any variable name, though.
Jon?
--
An old man doll... just what I always wanted! - Clara
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-12-15 11:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-15 9:12 kernel-doc comment with anonymous variable in anonymous union? Bagas Sanjaya
2025-12-15 9:40 ` Herbert Xu
2025-12-15 11:11 ` Bagas Sanjaya
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).