[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220926111916.65a9859e@coco.lan>
Date: Mon, 26 Sep 2022 11:19:16 +0200
From: Mauro Carvalho Chehab <mchehab@...nel.org>
To: Gwan-gyeong Mun <gwan-gyeong.mun@...el.com>
Cc: David Airlie <airlied@...ux.ie>, intel-gfx@...ts.freedesktop.org,
linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org,
Daniel Vetter <daniel@...ll.ch>,
Rodrigo Vivi <rodrigo.vivi@...el.com>
Subject: Re: [Intel-gfx] [PATCH v3 01/37] drm/i915: fix kernel-doc trivial
warnings on i915/*.[ch] files
Em Fri, 16 Sep 2022 17:03:27 +0300
Gwan-gyeong Mun <gwan-gyeong.mun@...el.com> escreveu:
> > /**
> > - * Called when user space has done writes to this buffer
> > + * i915_gem_sw_finish_ioctl - Called when user space has done writes to
> > + * this buffer
> As per this link[1], the brief description does not have a limitation to
> match the indentation when explained over multiple lines, unlike
> function parameters.
>
> [1]
> https://docs.kernel.org/doc-guide/kernel-doc.html#function-documentation
>
> Therefore if you look at the function brief description over several
> lines in i915 and drm,
>
> One of the drm apis, drm_gem_lock_reservations(), is used without
> indentation in the form below,
> /**
> * drm_gem_lock_reservations - Sets up the ww context and acquires
> * the lock on an array of GEM objects.
>
> In i915_perf.c, indentation is set as follows.
>
> /**
> * gen8_append_oa_reports - Copies all buffered OA reports into
> * userspace read() buffer.
>
> ...
>
> /**
> * gen7_append_oa_reports - Copies all buffered OA reports into
> * userspace read() buffer.
>
> If there is no problem when using the same form as
> gen8_append_oa_reports when generating kernel-doc, it seems to be
> indented to match the existing i915 style. However, if there is a
> problem, I think you need to remove the indented part of the i915 code
> like the drm apis.
>
> except i915_gem_sw_finish_ioctl i915_gem_gtt_pwrite_fast parts, the
> rest of the parts look good to me.
There's no rule about either indent or not. IMO, it makes easier for
humans to read when indent is used.
Yet, I'd say that, right now, 50% of multi-line comments within the
kernel has indent. So, it is more like a matter of personal developer's
preference at the moment.
>
> Reviewed-by: Gwan-gyeong Mun <gwan-gyeong.mun@...el.com>
Thanks,
Mauro
Powered by blists - more mailing lists