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

Configure Feed

Select the types of activity you want to include in your feed.

docs: kernel-doc.rst: document private: scope propagation

This was an undefined behavior, but at least one place used private:
inside a nested struct meant to not be propagated outside it.

Kernel-doc now defines how this is propagated. So, document that.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <bbe0ed698c21f3f930a561b885bc8a47824f7f1d.1773770483.git.mchehab+huawei@kernel.org>

authored by

Mauro Carvalho Chehab and committed by
Jonathan Corbet
827b9458 024e200e

+6
+6
Documentation/doc-guide/kernel-doc.rst
··· 213 213 ``/*`` comment marker. They may optionally include comments between the 214 214 ``:`` and the ending ``*/`` marker. 215 215 216 + When ``private:`` is used on nested structs, it propagates only to inner 217 + structs/unions. 218 + 219 + 216 220 Example:: 217 221 218 222 /** ··· 260 256 union { 261 257 struct { 262 258 int memb1; 259 + /* private: hides memb2 from documentation */ 263 260 int memb2; 264 261 }; 262 + /* Everything here is public again, as private scope finished */ 265 263 struct { 266 264 void *memb3; 267 265 int memb4;