Linux Documentation
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Bagas Sanjaya <bagasdotme@gmail.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Crypto <linux-crypto@vger.kernel.org>,
	Linux Documentation <linux-doc@vger.kernel.org>,
	Randy Dunlap <rdunlap@infradead.org>,
	"David S. Miller" <davem@davemloft.net>,
	Jonathan Corbet <corbet@lwn.net>
Subject: Re: kernel-doc comment with anonymous variable in anonymous union?
Date: Mon, 15 Dec 2025 17:40:43 +0800	[thread overview]
Message-ID: <aT_XmzUSkbFMLHK4@gondor.apana.org.au> (raw)
In-Reply-To: <aT_RDASKMW4RI_Yf@archie.me>

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

  reply	other threads:[~2025-12-15 10:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-15  9:12 kernel-doc comment with anonymous variable in anonymous union? Bagas Sanjaya
2025-12-15  9:40 ` Herbert Xu [this message]
2025-12-15 11:11   ` Bagas Sanjaya

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aT_XmzUSkbFMLHK4@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=bagasdotme@gmail.com \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rdunlap@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox