Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Wajdeczko <michal.wajdeczko@intel.com>
To: Raag Jadav <raag.jadav@intel.com>,
	Jani Nikula <jani.nikula@linux.intel.com>
Cc: <intel-xe@lists.freedesktop.org>, Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: Re: [PATCH 1/5] drm/xe/debugfs: Update xe_gt_topology_dump signature
Date: Tue, 30 Sep 2025 19:46:29 +0200	[thread overview]
Message-ID: <e7814fa2-8244-48e6-bd06-ef3f71540e56@intel.com> (raw)
In-Reply-To: <aNwSDXlttVzutmxp@black.igk.intel.com>



On 9/30/2025 7:23 PM, Raag Jadav wrote:
> On Tue, Sep 30, 2025 at 02:43:47PM +0300, Jani Nikula wrote:
>> On Tue, 30 Sep 2025, Michal Wajdeczko <michal.wajdeczko@intel.com> wrote:
>>> On 9/30/2025 10:45 AM, Jani Nikula wrote:
>>>> On Tue, 23 Sep 2025, Michal Wajdeczko <michal.wajdeczko@intel.com> wrote:
>>>>> +/**
>>>>> + * xe_gt_topology_dump() - Dump GT topology into a drm printer.
>>>>> + * @gt: the &xe_gt
>>>>> + * @p: the &drm_printer
>>>>> + *
>>>>> + * Return: always 0.
>>>>> + */
>>>>> +int xe_gt_topology_dump(struct xe_gt *gt, struct drm_printer *p)
>>>>
>>>> What benefit do the formatted kernel-doc give us? IMO it's just
>>>> boilerplate with pretty much everything being obvious from the function
>>>> name and parameters. And the functions aren't significant enough to be
>>>> made part of the Sphinx build either.
>>>
>>> I'm just following the (unwritten?) rule that in Xe we should document
>>> all public functions, and while in some cases such kernel-doc does not
>>> bring anything new, also like in [1], IMO it's still better than no
>>> documentation at all, as sometimes, like [2], function name isn't
>>> telling you the whole thing
>>
>> I'm not arguing against documentation. I'm arguing against excessive use
>> of kernel-doc formatting for functions that will never be part of the
>> Sphinx documentation build.
>>
>> /**
>>  * xe_gt_topology_dump() - Dump GT topology into a drm printer.
>>  * @gt: the &xe_gt
>>  * @p: the &drm_printer
>>  *
>>  * Return: always 0.
>>  */
>>
>> vs.
>>
>> /* Dump GT topology into a drm printer. Always returns 0. */
>>
>> For non-EXPORT_SYMBOL() driver internal stuff, in most cases the
>> parameter descriptions are self-evident, and repeating the function name
>> is just, well, repeating. The formatting doesn't buy us anything, it
>> just brings overhead and extra maintenance, because the format will be
>> checked.
>>
>> For EXPORT_SYMBOL() and the more important functions, or generally
>> things you might want to include in the Sphinx build, or anything that
>> might benefit from the formatting for readability, sure, use
>> kernel-doc. Otherwise, I wouldn't bother.
> 
> +1. I've always thought kdoc formatting was a general guidance than a hard
> rule, especially when the driver footprint is already quite huge.
> 

I would not mess here with the driver footprint, as this is not the same as LOC

what I'm afraid is that once we decide to relax the documentation rule,
then suddenly all functions will be treated by their authors as "trivial"
and as such do not require *any* doc at all, even the simplified variant

OTOH if adding few lines with @params is too much too much for the author,
then maybe he will reconsider if function really must be public and/or
requires that many parameters, and/or their names makes sense



  reply	other threads:[~2025-09-30 17:46 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-23 21:16 [PATCH 0/5] drm/xe/debugfs: Avoid use of wrapper functions Michal Wajdeczko
2025-09-23 21:16 ` [PATCH 1/5] drm/xe/debugfs: Update xe_gt_topology_dump signature Michal Wajdeczko
2025-09-29 23:25   ` Rodrigo Vivi
2025-09-30  8:45   ` Jani Nikula
2025-09-30 10:17     ` Michal Wajdeczko
2025-09-30 11:43       ` Jani Nikula
2025-09-30 17:23         ` Raag Jadav
2025-09-30 17:46           ` Michal Wajdeczko [this message]
2025-10-01 15:35             ` Rodrigo Vivi
2025-09-23 21:16 ` [PATCH 2/5] drm/xe/debugfs: Update xe_wa_dump signature Michal Wajdeczko
2025-09-29 23:25   ` Rodrigo Vivi
2025-09-23 21:16 ` [PATCH 3/5] drm/xe/debugfs: Update xe_tuning_dump signature Michal Wajdeczko
2025-09-29 23:26   ` Rodrigo Vivi
2025-09-23 21:16 ` [PATCH 4/5] drm/xe/debugfs: Update xe_mocs_dump signature Michal Wajdeczko
2025-09-29 23:26   ` Rodrigo Vivi
2025-09-23 21:16 ` [PATCH 5/5] drm/xe/debugfs: Update xe_pat_dump signature Michal Wajdeczko
2025-09-29 23:27   ` Rodrigo Vivi
2025-09-23 21:23 ` ✓ CI.KUnit: success for drm/xe/debugfs: Avoid use of wrapper functions Patchwork
2025-09-23 22:22 ` ✓ Xe.CI.BAT: " Patchwork
2025-09-24  2:07 ` ✗ Xe.CI.Full: failure " Patchwork
2025-09-30  8:15   ` Michal Wajdeczko

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=e7814fa2-8244-48e6-bd06-ef3f71540e56@intel.com \
    --to=michal.wajdeczko@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=raag.jadav@intel.com \
    --cc=rodrigo.vivi@intel.com \
    /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