2022-09-09 07:59:44

by Mauro Carvalho Chehab

[permalink] [raw]
Subject: [PATCH v3 17/37] drm/i915: i915_gem_wait.c: fix a kernel-doc markup

The return codes for i915_gem_wait_ioctl() have identation issues,
and will be displayed on a very confusing way. Use lists to improve
its output.

Reviewed-by: Rodrigo Vivi <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
---

To avoid mailbombing on a large number of people, only mailing lists were C/C on the cover.
See [PATCH v3 00/37] at: https://lore.kernel.org/all/[email protected]/

drivers/gpu/drm/i915/gem/i915_gem_wait.c | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_wait.c b/drivers/gpu/drm/i915/gem/i915_gem_wait.c
index 4a33ad2d122b..1fd5cff552ed 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_wait.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_wait.c
@@ -210,23 +210,25 @@ static unsigned long to_wait_timeout(s64 timeout_ns)
* @data: ioctl data blob
* @file: drm file pointer
*
- * Returns 0 if successful, else an error is returned with the remaining time in
- * the timeout parameter.
- * -ETIME: object is still busy after timeout
- * -ERESTARTSYS: signal interrupted the wait
- * -ENONENT: object doesn't exist
- * Also possible, but rare:
- * -EAGAIN: incomplete, restart syscall
- * -ENOMEM: damn
- * -ENODEV: Internal IRQ fail
- * -E?: The add request failed
- *
* The wait ioctl with a timeout of 0 reimplements the busy ioctl. With any
* non-zero timeout parameter the wait ioctl will wait for the given number of
* nanoseconds on an object becoming unbusy. Since the wait itself does so
* without holding struct_mutex the object may become re-busied before this
* function completes. A similar but shorter * race condition exists in the busy
* ioctl
+ *
+ * Returns:
+ * 0 if successful, else an error is returned with the remaining time in
+ * the timeout parameter.
+ * * -ETIME: object is still busy after timeout
+ * * -ERESTARTSYS: signal interrupted the wait
+ * * -ENONENT: object doesn't exist
+ *
+ * Also possible, but rare:
+ * * -EAGAIN: incomplete, restart syscall
+ * * -ENOMEM: damn
+ * * -ENODEV: Internal IRQ fail
+ * * -E?: The add request failed
*/
int
i915_gem_wait_ioctl(struct drm_device *dev, void *data, struct drm_file *file)
--
2.37.3


2022-09-12 01:56:08

by Andi Shyti

[permalink] [raw]
Subject: Re: [PATCH v3 17/37] drm/i915: i915_gem_wait.c: fix a kernel-doc markup

Hi Mauro,

On Fri, Sep 09, 2022 at 09:34:24AM +0200, Mauro Carvalho Chehab wrote:
> The return codes for i915_gem_wait_ioctl() have identation issues,
> and will be displayed on a very confusing way. Use lists to improve
> its output.
>
> Reviewed-by: Rodrigo Vivi <[email protected]>
> Signed-off-by: Mauro Carvalho Chehab <[email protected]>

Reviewed-by: Andi Shyti <[email protected]>

Andi

> ---
>
> To avoid mailbombing on a large number of people, only mailing lists were C/C on the cover.
> See [PATCH v3 00/37] at: https://lore.kernel.org/all/[email protected]/
>
> drivers/gpu/drm/i915/gem/i915_gem_wait.c | 24 +++++++++++++-----------
> 1 file changed, 13 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_wait.c b/drivers/gpu/drm/i915/gem/i915_gem_wait.c
> index 4a33ad2d122b..1fd5cff552ed 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_wait.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_wait.c
> @@ -210,23 +210,25 @@ static unsigned long to_wait_timeout(s64 timeout_ns)
> * @data: ioctl data blob
> * @file: drm file pointer
> *
> - * Returns 0 if successful, else an error is returned with the remaining time in
> - * the timeout parameter.
> - * -ETIME: object is still busy after timeout
> - * -ERESTARTSYS: signal interrupted the wait
> - * -ENONENT: object doesn't exist
> - * Also possible, but rare:
> - * -EAGAIN: incomplete, restart syscall
> - * -ENOMEM: damn
> - * -ENODEV: Internal IRQ fail
> - * -E?: The add request failed
> - *
> * The wait ioctl with a timeout of 0 reimplements the busy ioctl. With any
> * non-zero timeout parameter the wait ioctl will wait for the given number of
> * nanoseconds on an object becoming unbusy. Since the wait itself does so
> * without holding struct_mutex the object may become re-busied before this
> * function completes. A similar but shorter * race condition exists in the busy
> * ioctl
> + *
> + * Returns:
> + * 0 if successful, else an error is returned with the remaining time in
> + * the timeout parameter.
> + * * -ETIME: object is still busy after timeout
> + * * -ERESTARTSYS: signal interrupted the wait
> + * * -ENONENT: object doesn't exist
> + *
> + * Also possible, but rare:
> + * * -EAGAIN: incomplete, restart syscall
> + * * -ENOMEM: damn
> + * * -ENODEV: Internal IRQ fail
> + * * -E?: The add request failed
> */
> int
> i915_gem_wait_ioctl(struct drm_device *dev, void *data, struct drm_file *file)
> --
> 2.37.3