[PATCH v3] drm/xe: Document nested struct members according to guidelines

Jani Nikula jani.nikula at linux.intel.com
Tue Jan 23 17:46:28 UTC 2024


On Tue, 23 Jan 2024, Thomas Hellström <thomas.hellstrom at linux.intel.com> wrote:
> Document nested struct members with full names as described in
> Documentation/doc-guide/kernel-doc.rst.

...

> diff --git a/drivers/gpu/drm/xe/xe_device_types.h b/drivers/gpu/drm/xe/xe_device_types.h
> index 7eda86bd4c2a..eb2b806a1d23 100644
> --- a/drivers/gpu/drm/xe/xe_device_types.h
> +++ b/drivers/gpu/drm/xe/xe_device_types.h
> @@ -143,10 +143,10 @@ struct xe_tile {
>  	 * * 8MB-16MB: global GTT
>  	 */
>  	struct {
> -		/** @size: size of tile's MMIO space */
> +		/** @mmio.size: size of tile's MMIO space */
>  		size_t size;
>  
> -		/** @regs: pointer to tile's MMIO space (starting with registers) */
> +		/** @mmio.regs: pointer to tile's MMIO space (starting with registers) */
>  		void __iomem *regs;
>  	} mmio;
>  

I really wish you could just do:

	/** Documentation of foo member */
        int foo;

to document the following member, instead of having to repeat every
single member name everywhere. kernel-doc has all the info to do this,
but I never want to touch that perl script again...


BR,
Jani.


-- 
Jani Nikula, Intel


More information about the Intel-xe mailing list