All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Clean up ancient doc comments for i915_ioc32.c
@ 2018-02-14 15:29 Chris Wilson
  2018-02-14 15:42 ` Jani Nikula
                   ` (6 more replies)
  0 siblings, 7 replies; 13+ messages in thread
From: Chris Wilson @ 2018-02-14 15:29 UTC (permalink / raw)
  To: intel-gfx

As befitting a file dedicated to the mistakes of the past,

drivers/gpu/drm/i915/i915_ioc32.c:2: warning: Cannot understand  * \file i915_ioc32.c
 on line 2 - I thought it was a doc line
drivers/gpu/drm/i915/i915_ioc32.c:82: warning: Function parameter or member 'filp' not described in 'i915_compat_ioctl'
drivers/gpu/drm/i915/i915_ioc32.c:82: warning: Function parameter or member 'cmd' not described in 'i915_compat_ioctl'
drivers/gpu/drm/i915/i915_ioc32.c:82: warning: Function parameter or member 'arg' not described in 'i915_compat_ioctl'

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_ioc32.c | 38 ++++++++++++++++----------------------
 1 file changed, 16 insertions(+), 22 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_ioc32.c b/drivers/gpu/drm/i915/i915_ioc32.c
index 97f3a5640289..73599be641e7 100644
--- a/drivers/gpu/drm/i915/i915_ioc32.c
+++ b/drivers/gpu/drm/i915/i915_ioc32.c
@@ -1,11 +1,6 @@
-/**
- * \file i915_ioc32.c
- *
+/*
  * 32-bit ioctl compatibility routines for the i915 DRM.
  *
- * \author Alan Hourihane <alanh@fairlite.demon.co.uk>
- *
- *
  * Copyright (C) Paul Mackerras 2005
  * Copyright (C) Alan Hourihane 2005
  * All Rights Reserved.
@@ -28,6 +23,8 @@
  * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
  * IN THE SOFTWARE.
+ *
+ * Author: Alan Hourihane <alanh@fairlite.demon.co.uk>
  */
 #include <linux/compat.h>
 
@@ -55,9 +52,9 @@ static int compat_i915_getparam(struct file *file, unsigned int cmd,
 		return -EFAULT;
 
 	request = compat_alloc_user_space(sizeof(*request));
-	if (!access_ok(VERIFY_WRITE, request, sizeof(*request))
-	    || __put_user(req32.param, &request->param)
-	    || __put_user((void __user *)(unsigned long)req32.value,
+	if (!access_ok(VERIFY_WRITE, request, sizeof(*request)) ||
+	    __put_user(req32.param, &request->param) ||
+	    __put_user((void __user *)(unsigned long)req32.value,
 			  &request->value))
 		return -EFAULT;
 
@@ -70,30 +67,27 @@ static drm_ioctl_compat_t *i915_compat_ioctls[] = {
 };
 
 /**
+ * i915_compat_ioctl - handle the mistakes of the past
+ * @filp: the file pointer
+ * @cmd: the ioctl command (and encoded flags)
+ * @arg: the ioctl argument (from userspace)
+ *
  * Called whenever a 32-bit process running under a 64-bit kernel
  * performs an ioctl on /dev/dri/card<n>.
- *
- * \param filp file pointer.
- * \param cmd command.
- * \param arg user argument.
- * \return zero on success or negative number on failure.
  */
 long i915_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
 {
 	unsigned int nr = DRM_IOCTL_NR(cmd);
-	drm_ioctl_compat_t *fn = NULL;
-	int ret;
+	drm_ioctl_compat_t *fn;
 
 	if (nr < DRM_COMMAND_BASE || nr >= DRM_COMMAND_END)
 		return drm_compat_ioctl(filp, cmd, arg);
 
+	fn = NULL;
 	if (nr < DRM_COMMAND_BASE + ARRAY_SIZE(i915_compat_ioctls))
 		fn = i915_compat_ioctls[nr - DRM_COMMAND_BASE];
+	if (fn)
+		return fn(filp, cmd, arg);
 
-	if (fn != NULL)
-		ret = (*fn) (filp, cmd, arg);
-	else
-		ret = drm_ioctl(filp, cmd, arg);
-
-	return ret;
+	return drm_ioctl(filp, cmd, arg);
 }
-- 
2.16.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH] drm/i915: Clean up ancient doc comments for i915_ioc32.c
  2018-02-14 15:29 [PATCH] drm/i915: Clean up ancient doc comments for i915_ioc32.c Chris Wilson
@ 2018-02-14 15:42 ` Jani Nikula
  2018-02-14 15:47   ` Chris Wilson
  2018-02-14 15:45 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 13+ messages in thread
From: Jani Nikula @ 2018-02-14 15:42 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx

On Wed, 14 Feb 2018, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> As befitting a file dedicated to the mistakes of the past,
>
> drivers/gpu/drm/i915/i915_ioc32.c:2: warning: Cannot understand  * \file i915_ioc32.c
>  on line 2 - I thought it was a doc line
> drivers/gpu/drm/i915/i915_ioc32.c:82: warning: Function parameter or member 'filp' not described in 'i915_compat_ioctl'
> drivers/gpu/drm/i915/i915_ioc32.c:82: warning: Function parameter or member 'cmd' not described in 'i915_compat_ioctl'
> drivers/gpu/drm/i915/i915_ioc32.c:82: warning: Function parameter or member 'arg' not described in 'i915_compat_ioctl'
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>  drivers/gpu/drm/i915/i915_ioc32.c | 38 ++++++++++++++++----------------------
>  1 file changed, 16 insertions(+), 22 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_ioc32.c b/drivers/gpu/drm/i915/i915_ioc32.c
> index 97f3a5640289..73599be641e7 100644
> --- a/drivers/gpu/drm/i915/i915_ioc32.c
> +++ b/drivers/gpu/drm/i915/i915_ioc32.c
> @@ -1,11 +1,6 @@
> -/**
> - * \file i915_ioc32.c
> - *
> +/*
>   * 32-bit ioctl compatibility routines for the i915 DRM.
>   *
> - * \author Alan Hourihane <alanh@fairlite.demon.co.uk>
> - *
> - *
>   * Copyright (C) Paul Mackerras 2005
>   * Copyright (C) Alan Hourihane 2005
>   * All Rights Reserved.
> @@ -28,6 +23,8 @@
>   * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
>   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
>   * IN THE SOFTWARE.
> + *
> + * Author: Alan Hourihane <alanh@fairlite.demon.co.uk>
>   */
>  #include <linux/compat.h>
>  
> @@ -55,9 +52,9 @@ static int compat_i915_getparam(struct file *file, unsigned int cmd,
>  		return -EFAULT;
>  
>  	request = compat_alloc_user_space(sizeof(*request));
> -	if (!access_ok(VERIFY_WRITE, request, sizeof(*request))
> -	    || __put_user(req32.param, &request->param)
> -	    || __put_user((void __user *)(unsigned long)req32.value,
> +	if (!access_ok(VERIFY_WRITE, request, sizeof(*request)) ||
> +	    __put_user(req32.param, &request->param) ||
> +	    __put_user((void __user *)(unsigned long)req32.value,
>  			  &request->value))
>  		return -EFAULT;
>  
> @@ -70,30 +67,27 @@ static drm_ioctl_compat_t *i915_compat_ioctls[] = {
>  };
>  
>  /**
> + * i915_compat_ioctl - handle the mistakes of the past
> + * @filp: the file pointer
> + * @cmd: the ioctl command (and encoded flags)
> + * @arg: the ioctl argument (from userspace)
> + *
>   * Called whenever a 32-bit process running under a 64-bit kernel
>   * performs an ioctl on /dev/dri/card<n>.
> - *
> - * \param filp file pointer.
> - * \param cmd command.
> - * \param arg user argument.
> - * \return zero on success or negative number on failure.
>   */
>  long i915_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
>  {
>  	unsigned int nr = DRM_IOCTL_NR(cmd);
> -	drm_ioctl_compat_t *fn = NULL;
> -	int ret;
> +	drm_ioctl_compat_t *fn;
>  
>  	if (nr < DRM_COMMAND_BASE || nr >= DRM_COMMAND_END)
>  		return drm_compat_ioctl(filp, cmd, arg);
>  
> +	fn = NULL;
>  	if (nr < DRM_COMMAND_BASE + ARRAY_SIZE(i915_compat_ioctls))
>  		fn = i915_compat_ioctls[nr - DRM_COMMAND_BASE];
> +	if (fn)
> +		return fn(filp, cmd, arg);

Not really fond of code juggling in a patch that's supposed to be about
doc comment updates.

But if you do this, you might just as well move the if (fn) check within
the preceding if block, and get rid of the fn = NULL initialization
altogheter.

BR,
Jani.


>  
> -	if (fn != NULL)
> -		ret = (*fn) (filp, cmd, arg);
> -	else
> -		ret = drm_ioctl(filp, cmd, arg);
> -
> -	return ret;
> +	return drm_ioctl(filp, cmd, arg);
>  }

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 13+ messages in thread

* ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Clean up ancient doc comments for i915_ioc32.c
  2018-02-14 15:29 [PATCH] drm/i915: Clean up ancient doc comments for i915_ioc32.c Chris Wilson
  2018-02-14 15:42 ` Jani Nikula
@ 2018-02-14 15:45 ` Patchwork
  2018-02-14 16:01 ` ✓ Fi.CI.BAT: success " Patchwork
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 13+ messages in thread
From: Patchwork @ 2018-02-14 15:45 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Clean up ancient doc comments for i915_ioc32.c
URL   : https://patchwork.freedesktop.org/series/38261/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
7363afa51c03 drm/i915: Clean up ancient doc comments for i915_ioc32.c
-:52: CHECK: Alignment should match open parenthesis
#52: FILE: drivers/gpu/drm/i915/i915_ioc32.c:58:
+	    __put_user((void __user *)(unsigned long)req32.value,
 			  &request->value))

total: 0 errors, 0 warnings, 1 checks, 72 lines checked

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] drm/i915: Clean up ancient doc comments for i915_ioc32.c
  2018-02-14 15:42 ` Jani Nikula
@ 2018-02-14 15:47   ` Chris Wilson
  2018-02-14 16:09     ` Jani Nikula
  0 siblings, 1 reply; 13+ messages in thread
From: Chris Wilson @ 2018-02-14 15:47 UTC (permalink / raw)
  To: Jani Nikula, intel-gfx

Quoting Jani Nikula (2018-02-14 15:42:37)
> On Wed, 14 Feb 2018, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> > As befitting a file dedicated to the mistakes of the past,
> >
> > drivers/gpu/drm/i915/i915_ioc32.c:2: warning: Cannot understand  * \file i915_ioc32.c
> >  on line 2 - I thought it was a doc line
> > drivers/gpu/drm/i915/i915_ioc32.c:82: warning: Function parameter or member 'filp' not described in 'i915_compat_ioctl'
> > drivers/gpu/drm/i915/i915_ioc32.c:82: warning: Function parameter or member 'cmd' not described in 'i915_compat_ioctl'
> > drivers/gpu/drm/i915/i915_ioc32.c:82: warning: Function parameter or member 'arg' not described in 'i915_compat_ioctl'
> >
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > ---
> >  drivers/gpu/drm/i915/i915_ioc32.c | 38 ++++++++++++++++----------------------
> >  1 file changed, 16 insertions(+), 22 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_ioc32.c b/drivers/gpu/drm/i915/i915_ioc32.c
> > index 97f3a5640289..73599be641e7 100644
> > --- a/drivers/gpu/drm/i915/i915_ioc32.c
> > +++ b/drivers/gpu/drm/i915/i915_ioc32.c
> > @@ -1,11 +1,6 @@
> > -/**
> > - * \file i915_ioc32.c
> > - *
> > +/*
> >   * 32-bit ioctl compatibility routines for the i915 DRM.
> >   *
> > - * \author Alan Hourihane <alanh@fairlite.demon.co.uk>
> > - *
> > - *
> >   * Copyright (C) Paul Mackerras 2005
> >   * Copyright (C) Alan Hourihane 2005
> >   * All Rights Reserved.
> > @@ -28,6 +23,8 @@
> >   * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
> >   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
> >   * IN THE SOFTWARE.
> > + *
> > + * Author: Alan Hourihane <alanh@fairlite.demon.co.uk>
> >   */
> >  #include <linux/compat.h>
> >  
> > @@ -55,9 +52,9 @@ static int compat_i915_getparam(struct file *file, unsigned int cmd,
> >               return -EFAULT;
> >  
> >       request = compat_alloc_user_space(sizeof(*request));
> > -     if (!access_ok(VERIFY_WRITE, request, sizeof(*request))
> > -         || __put_user(req32.param, &request->param)
> > -         || __put_user((void __user *)(unsigned long)req32.value,
> > +     if (!access_ok(VERIFY_WRITE, request, sizeof(*request)) ||
> > +         __put_user(req32.param, &request->param) ||
> > +         __put_user((void __user *)(unsigned long)req32.value,
> >                         &request->value))
> >               return -EFAULT;
> >  
> > @@ -70,30 +67,27 @@ static drm_ioctl_compat_t *i915_compat_ioctls[] = {
> >  };
> >  
> >  /**
> > + * i915_compat_ioctl - handle the mistakes of the past
> > + * @filp: the file pointer
> > + * @cmd: the ioctl command (and encoded flags)
> > + * @arg: the ioctl argument (from userspace)
> > + *
> >   * Called whenever a 32-bit process running under a 64-bit kernel
> >   * performs an ioctl on /dev/dri/card<n>.
> > - *
> > - * \param filp file pointer.
> > - * \param cmd command.
> > - * \param arg user argument.
> > - * \return zero on success or negative number on failure.
> >   */
> >  long i915_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
> >  {
> >       unsigned int nr = DRM_IOCTL_NR(cmd);
> > -     drm_ioctl_compat_t *fn = NULL;
> > -     int ret;
> > +     drm_ioctl_compat_t *fn;
> >  
> >       if (nr < DRM_COMMAND_BASE || nr >= DRM_COMMAND_END)
> >               return drm_compat_ioctl(filp, cmd, arg);
> >  
> > +     fn = NULL;
> >       if (nr < DRM_COMMAND_BASE + ARRAY_SIZE(i915_compat_ioctls))
> >               fn = i915_compat_ioctls[nr - DRM_COMMAND_BASE];
> > +     if (fn)
> > +             return fn(filp, cmd, arg);
> 
> Not really fond of code juggling in a patch that's supposed to be about
> doc comment updates.
> 
> But if you do this, you might just as well move the if (fn) check within
> the preceding if block, and get rid of the fn = NULL initialization
> altogheter.

In the end I want it to become something like

        fn = NULL;
        if (nr < ARRAY_SIZE(i915_compat_ioctls))
                fn = i915_compat_ioctls[nr];
        if (!fn) {
                const struct drm_ioctl_desc *ioctl;

                ioctl = &i915_ioctls[nr];
                if (ioctl->flags & DRM_DRIVER_IOCTL)
                        fn = ioctl->ioctl;
                else
                        fn = drm_ioctl;
        }

        return fn(filp, cmd, arg);
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 13+ messages in thread

* ✓ Fi.CI.BAT: success for drm/i915: Clean up ancient doc comments for i915_ioc32.c
  2018-02-14 15:29 [PATCH] drm/i915: Clean up ancient doc comments for i915_ioc32.c Chris Wilson
  2018-02-14 15:42 ` Jani Nikula
  2018-02-14 15:45 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
@ 2018-02-14 16:01 ` Patchwork
  2018-02-14 16:05 ` [PATCH v2] " Chris Wilson
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 13+ messages in thread
From: Patchwork @ 2018-02-14 16:01 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Clean up ancient doc comments for i915_ioc32.c
URL   : https://patchwork.freedesktop.org/series/38261/
State : success

== Summary ==

Series 38261v1 drm/i915: Clean up ancient doc comments for i915_ioc32.c
https://patchwork.freedesktop.org/api/1.0/series/38261/revisions/1/mbox/

Test kms_frontbuffer_tracking:
        Subgroup basic:
                pass       -> FAIL       (fi-cnl-y3) fdo#103167
Test kms_pipe_crc_basic:
        Subgroup suspend-read-crc-pipe-a:
                pass       -> INCOMPLETE (fi-bdw-5557u) fdo#104944
Test prime_vgem:
        Subgroup basic-fence-flip:
                pass       -> FAIL       (fi-ilk-650) fdo#104008

fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#104944 https://bugs.freedesktop.org/show_bug.cgi?id=104944
fdo#104008 https://bugs.freedesktop.org/show_bug.cgi?id=104008

fi-bdw-5557u     total:244  pass:226  dwarn:0   dfail:0   fail:0   skip:17 
fi-bdw-gvtdvm    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:426s
fi-blb-e6850     total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  time:376s
fi-bsw-n3050     total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  time:486s
fi-bwr-2160      total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 time:288s
fi-bxt-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:482s
fi-bxt-j4205     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:481s
fi-byt-j1900     total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  time:469s
fi-byt-n2820     total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  time:461s
fi-cfl-s2        total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:565s
fi-cnl-y3        total:288  pass:261  dwarn:0   dfail:0   fail:1   skip:26  time:572s
fi-elk-e7500     total:288  pass:229  dwarn:0   dfail:0   fail:0   skip:59  time:416s
fi-gdg-551       total:288  pass:179  dwarn:0   dfail:0   fail:1   skip:108 time:283s
fi-glk-1         total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:511s
fi-hsw-4770      total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:389s
fi-ilk-650       total:288  pass:227  dwarn:0   dfail:0   fail:1   skip:60  time:408s
fi-ivb-3520m     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:459s
fi-ivb-3770      total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  time:412s
fi-kbl-7500u     total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  time:457s
fi-kbl-7560u     total:288  pass:269  dwarn:0   dfail:0   fail:0   skip:19  time:495s
fi-kbl-r         total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:502s
fi-pnv-d510      total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  time:588s
fi-skl-6260u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:428s
fi-skl-6600u     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:508s
fi-skl-6700hq    total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:524s
fi-skl-6700k2    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:490s
fi-skl-6770hq    total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:485s
fi-skl-guc       total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:415s
fi-skl-gvtdvm    total:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  time:437s
fi-snb-2520m     total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:524s
fi-snb-2600      total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:402s
Blacklisted hosts:
fi-glk-dsi       total:288  pass:188  dwarn:1   dfail:4   fail:0   skip:95  time:766s
fi-kbl-7567u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:451s

5ad7866768dcc5d993f1bba687a80fced1070635 drm-tip: 2018y-02m-14d-15h-14m-50s UTC integration manifest
7363afa51c03 drm/i915: Clean up ancient doc comments for i915_ioc32.c

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8021/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH v2] drm/i915: Clean up ancient doc comments for i915_ioc32.c
  2018-02-14 15:29 [PATCH] drm/i915: Clean up ancient doc comments for i915_ioc32.c Chris Wilson
                   ` (2 preceding siblings ...)
  2018-02-14 16:01 ` ✓ Fi.CI.BAT: success " Patchwork
@ 2018-02-14 16:05 ` Chris Wilson
  2018-02-14 16:07 ` [PATCH v3] " Chris Wilson
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 13+ messages in thread
From: Chris Wilson @ 2018-02-14 16:05 UTC (permalink / raw)
  To: intel-gfx

As befitting a file dedicated to the mistakes of the past,

drivers/gpu/drm/i915/i915_ioc32.c:2: warning: Cannot understand  * \file i915_ioc32.c
 on line 2 - I thought it was a doc line
drivers/gpu/drm/i915/i915_ioc32.c:82: warning: Function parameter or member 'filp' not described in 'i915_compat_ioctl'
drivers/gpu/drm/i915/i915_ioc32.c:82: warning: Function parameter or member 'cmd' not described in 'i915_compat_ioctl'
drivers/gpu/drm/i915/i915_ioc32.c:82: warning: Function parameter or member 'arg' not described in 'i915_compat_ioctl'

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
Restrict the patch to whitespace and comments.
---
 drivers/gpu/drm/i915/i915_ioc32.c | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_ioc32.c b/drivers/gpu/drm/i915/i915_ioc32.c
index 97f3a5640289..b2a724165ec1 100644
--- a/drivers/gpu/drm/i915/i915_ioc32.c
+++ b/drivers/gpu/drm/i915/i915_ioc32.c
@@ -1,11 +1,6 @@
-/**
- * \file i915_ioc32.c
- *
+/*
  * 32-bit ioctl compatibility routines for the i915 DRM.
  *
- * \author Alan Hourihane <alanh@fairlite.demon.co.uk>
- *
- *
  * Copyright (C) Paul Mackerras 2005
  * Copyright (C) Alan Hourihane 2005
  * All Rights Reserved.
@@ -28,6 +23,8 @@
  * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
  * IN THE SOFTWARE.
+ *
+ * Author: Alan Hourihane <alanh@fairlite.demon.co.uk>
  */
 #include <linux/compat.h>
 
@@ -55,10 +52,10 @@ static int compat_i915_getparam(struct file *file, unsigned int cmd,
 		return -EFAULT;
 
 	request = compat_alloc_user_space(sizeof(*request));
-	if (!access_ok(VERIFY_WRITE, request, sizeof(*request))
-	    || __put_user(req32.param, &request->param)
-	    || __put_user((void __user *)(unsigned long)req32.value,
-			  &request->value))
+	if (!access_ok(VERIFY_WRITE, request, sizeof(*request)) ||
+	    __put_user(req32.param, &request->param) ||
+	    __put_user((void __user *)(unsigned long)req32.value,
+		       &request->value))
 		return -EFAULT;
 
 	return drm_ioctl(file, DRM_IOCTL_I915_GETPARAM,
-- 
2.16.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v3] drm/i915: Clean up ancient doc comments for i915_ioc32.c
  2018-02-14 15:29 [PATCH] drm/i915: Clean up ancient doc comments for i915_ioc32.c Chris Wilson
                   ` (3 preceding siblings ...)
  2018-02-14 16:05 ` [PATCH v2] " Chris Wilson
@ 2018-02-14 16:07 ` Chris Wilson
  2018-02-15  7:43   ` Chris Wilson
  2018-02-14 17:36 ` ✓ Fi.CI.BAT: success for drm/i915: Clean up ancient doc comments for i915_ioc32.c (rev3) Patchwork
  2018-02-15  0:27 ` ✓ Fi.CI.IGT: " Patchwork
  6 siblings, 1 reply; 13+ messages in thread
From: Chris Wilson @ 2018-02-14 16:07 UTC (permalink / raw)
  To: intel-gfx

As befitting a file dedicated to the mistakes of the past,

drivers/gpu/drm/i915/i915_ioc32.c:2: warning: Cannot understand  * \file i915_ioc32.c
 on line 2 - I thought it was a doc line
drivers/gpu/drm/i915/i915_ioc32.c:82: warning: Function parameter or member 'filp' not described in 'i915_compat_ioctl'
drivers/gpu/drm/i915/i915_ioc32.c:82: warning: Function parameter or member 'cmd' not described in 'i915_compat_ioctl'
drivers/gpu/drm/i915/i915_ioc32.c:82: warning: Function parameter or member 'arg' not described in 'i915_compat_ioctl'

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
Don't drop the fixes this time!
---
 drivers/gpu/drm/i915/i915_ioc32.c | 27 ++++++++++++---------------
 1 file changed, 12 insertions(+), 15 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_ioc32.c b/drivers/gpu/drm/i915/i915_ioc32.c
index 97f3a5640289..0e5c580d117c 100644
--- a/drivers/gpu/drm/i915/i915_ioc32.c
+++ b/drivers/gpu/drm/i915/i915_ioc32.c
@@ -1,11 +1,6 @@
-/**
- * \file i915_ioc32.c
- *
+/*
  * 32-bit ioctl compatibility routines for the i915 DRM.
  *
- * \author Alan Hourihane <alanh@fairlite.demon.co.uk>
- *
- *
  * Copyright (C) Paul Mackerras 2005
  * Copyright (C) Alan Hourihane 2005
  * All Rights Reserved.
@@ -28,6 +23,8 @@
  * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
  * IN THE SOFTWARE.
+ *
+ * Author: Alan Hourihane <alanh@fairlite.demon.co.uk>
  */
 #include <linux/compat.h>
 
@@ -55,10 +52,10 @@ static int compat_i915_getparam(struct file *file, unsigned int cmd,
 		return -EFAULT;
 
 	request = compat_alloc_user_space(sizeof(*request));
-	if (!access_ok(VERIFY_WRITE, request, sizeof(*request))
-	    || __put_user(req32.param, &request->param)
-	    || __put_user((void __user *)(unsigned long)req32.value,
-			  &request->value))
+	if (!access_ok(VERIFY_WRITE, request, sizeof(*request)) ||
+	    __put_user(req32.param, &request->param) ||
+	    __put_user((void __user *)(unsigned long)req32.value,
+		       &request->value))
 		return -EFAULT;
 
 	return drm_ioctl(file, DRM_IOCTL_I915_GETPARAM,
@@ -70,13 +67,13 @@ static drm_ioctl_compat_t *i915_compat_ioctls[] = {
 };
 
 /**
+ * i915_compat_ioctl - handle the mistakes of the past
+ * @filp: the file pointer
+ * @cmd: the ioctl command (and encoded flags)
+ * @arg: the ioctl argument (from userspace)
+ *
  * Called whenever a 32-bit process running under a 64-bit kernel
  * performs an ioctl on /dev/dri/card<n>.
- *
- * \param filp file pointer.
- * \param cmd command.
- * \param arg user argument.
- * \return zero on success or negative number on failure.
  */
 long i915_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
 {
-- 
2.16.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH] drm/i915: Clean up ancient doc comments for i915_ioc32.c
  2018-02-14 15:47   ` Chris Wilson
@ 2018-02-14 16:09     ` Jani Nikula
  0 siblings, 0 replies; 13+ messages in thread
From: Jani Nikula @ 2018-02-14 16:09 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx

On Wed, 14 Feb 2018, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> Quoting Jani Nikula (2018-02-14 15:42:37)
>> On Wed, 14 Feb 2018, Chris Wilson <chris@chris-wilson.co.uk> wrote:
>> > As befitting a file dedicated to the mistakes of the past,
>> >
>> > drivers/gpu/drm/i915/i915_ioc32.c:2: warning: Cannot understand  * \file i915_ioc32.c
>> >  on line 2 - I thought it was a doc line
>> > drivers/gpu/drm/i915/i915_ioc32.c:82: warning: Function parameter or member 'filp' not described in 'i915_compat_ioctl'
>> > drivers/gpu/drm/i915/i915_ioc32.c:82: warning: Function parameter or member 'cmd' not described in 'i915_compat_ioctl'
>> > drivers/gpu/drm/i915/i915_ioc32.c:82: warning: Function parameter or member 'arg' not described in 'i915_compat_ioctl'
>> >
>> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
>> > ---
>> >  drivers/gpu/drm/i915/i915_ioc32.c | 38 ++++++++++++++++----------------------
>> >  1 file changed, 16 insertions(+), 22 deletions(-)
>> >
>> > diff --git a/drivers/gpu/drm/i915/i915_ioc32.c b/drivers/gpu/drm/i915/i915_ioc32.c
>> > index 97f3a5640289..73599be641e7 100644
>> > --- a/drivers/gpu/drm/i915/i915_ioc32.c
>> > +++ b/drivers/gpu/drm/i915/i915_ioc32.c
>> > @@ -1,11 +1,6 @@
>> > -/**
>> > - * \file i915_ioc32.c
>> > - *
>> > +/*
>> >   * 32-bit ioctl compatibility routines for the i915 DRM.
>> >   *
>> > - * \author Alan Hourihane <alanh@fairlite.demon.co.uk>
>> > - *
>> > - *
>> >   * Copyright (C) Paul Mackerras 2005
>> >   * Copyright (C) Alan Hourihane 2005
>> >   * All Rights Reserved.
>> > @@ -28,6 +23,8 @@
>> >   * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
>> >   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
>> >   * IN THE SOFTWARE.
>> > + *
>> > + * Author: Alan Hourihane <alanh@fairlite.demon.co.uk>
>> >   */
>> >  #include <linux/compat.h>
>> >  
>> > @@ -55,9 +52,9 @@ static int compat_i915_getparam(struct file *file, unsigned int cmd,
>> >               return -EFAULT;
>> >  
>> >       request = compat_alloc_user_space(sizeof(*request));
>> > -     if (!access_ok(VERIFY_WRITE, request, sizeof(*request))
>> > -         || __put_user(req32.param, &request->param)
>> > -         || __put_user((void __user *)(unsigned long)req32.value,
>> > +     if (!access_ok(VERIFY_WRITE, request, sizeof(*request)) ||
>> > +         __put_user(req32.param, &request->param) ||
>> > +         __put_user((void __user *)(unsigned long)req32.value,
>> >                         &request->value))
>> >               return -EFAULT;
>> >  
>> > @@ -70,30 +67,27 @@ static drm_ioctl_compat_t *i915_compat_ioctls[] = {
>> >  };
>> >  
>> >  /**
>> > + * i915_compat_ioctl - handle the mistakes of the past
>> > + * @filp: the file pointer
>> > + * @cmd: the ioctl command (and encoded flags)
>> > + * @arg: the ioctl argument (from userspace)
>> > + *
>> >   * Called whenever a 32-bit process running under a 64-bit kernel
>> >   * performs an ioctl on /dev/dri/card<n>.
>> > - *
>> > - * \param filp file pointer.
>> > - * \param cmd command.
>> > - * \param arg user argument.
>> > - * \return zero on success or negative number on failure.
>> >   */
>> >  long i915_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
>> >  {
>> >       unsigned int nr = DRM_IOCTL_NR(cmd);
>> > -     drm_ioctl_compat_t *fn = NULL;
>> > -     int ret;
>> > +     drm_ioctl_compat_t *fn;
>> >  
>> >       if (nr < DRM_COMMAND_BASE || nr >= DRM_COMMAND_END)
>> >               return drm_compat_ioctl(filp, cmd, arg);
>> >  
>> > +     fn = NULL;
>> >       if (nr < DRM_COMMAND_BASE + ARRAY_SIZE(i915_compat_ioctls))
>> >               fn = i915_compat_ioctls[nr - DRM_COMMAND_BASE];
>> > +     if (fn)
>> > +             return fn(filp, cmd, arg);
>> 
>> Not really fond of code juggling in a patch that's supposed to be about
>> doc comment updates.
>> 
>> But if you do this, you might just as well move the if (fn) check within
>> the preceding if block, and get rid of the fn = NULL initialization
>> altogheter.
>
> In the end I want it to become something like

So how about not juggling it in the patch at hand, and doing it properly
in a separate patch instead...? I kind of dislike what drive-by cleanups
do to git blame.

BR,
Jani.

>
>         fn = NULL;
>         if (nr < ARRAY_SIZE(i915_compat_ioctls))
>                 fn = i915_compat_ioctls[nr];
>         if (!fn) {
>                 const struct drm_ioctl_desc *ioctl;
>
>                 ioctl = &i915_ioctls[nr];
>                 if (ioctl->flags & DRM_DRIVER_IOCTL)
>                         fn = ioctl->ioctl;
>                 else
>                         fn = drm_ioctl;
>         }
>
>         return fn(filp, cmd, arg);

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 13+ messages in thread

* ✓ Fi.CI.BAT: success for drm/i915: Clean up ancient doc comments for i915_ioc32.c (rev3)
  2018-02-14 15:29 [PATCH] drm/i915: Clean up ancient doc comments for i915_ioc32.c Chris Wilson
                   ` (4 preceding siblings ...)
  2018-02-14 16:07 ` [PATCH v3] " Chris Wilson
@ 2018-02-14 17:36 ` Patchwork
  2018-02-15  0:27 ` ✓ Fi.CI.IGT: " Patchwork
  6 siblings, 0 replies; 13+ messages in thread
From: Patchwork @ 2018-02-14 17:36 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Clean up ancient doc comments for i915_ioc32.c (rev3)
URL   : https://patchwork.freedesktop.org/series/38261/
State : success

== Summary ==

Series 38261v3 drm/i915: Clean up ancient doc comments for i915_ioc32.c
https://patchwork.freedesktop.org/api/1.0/series/38261/revisions/3/mbox/

fi-bdw-5557u     total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  time:419s
fi-bdw-gvtdvm    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:426s
fi-blb-e6850     total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  time:381s
fi-bsw-n3050     total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  time:485s
fi-bwr-2160      total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 time:286s
fi-bxt-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:482s
fi-bxt-j4205     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:483s
fi-byt-j1900     total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  time:471s
fi-byt-n2820     total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  time:459s
fi-cfl-s2        total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:568s
fi-cnl-y3        total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:579s
fi-elk-e7500     total:288  pass:229  dwarn:0   dfail:0   fail:0   skip:59  time:418s
fi-gdg-551       total:288  pass:179  dwarn:0   dfail:0   fail:1   skip:108 time:285s
fi-glk-1         total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:510s
fi-hsw-4770      total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:396s
fi-ilk-650       total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  time:413s
fi-ivb-3520m     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:459s
fi-ivb-3770      total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  time:415s
fi-kbl-7500u     total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  time:463s
fi-kbl-7560u     total:288  pass:269  dwarn:0   dfail:0   fail:0   skip:19  time:494s
fi-kbl-r         total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:499s
fi-pnv-d510      total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  time:587s
fi-skl-6260u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:430s
fi-skl-6600u     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:508s
fi-skl-6700hq    total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:522s
fi-skl-6700k2    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:486s
fi-skl-6770hq    total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:481s
fi-skl-guc       total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:418s
fi-skl-gvtdvm    total:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  time:433s
fi-snb-2520m     total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:525s
fi-snb-2600      total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:400s
Blacklisted hosts:
fi-glk-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:472s
fi-kbl-7567u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:453s

5ad7866768dcc5d993f1bba687a80fced1070635 drm-tip: 2018y-02m-14d-15h-14m-50s UTC integration manifest
19d00caab926 drm/i915: Clean up ancient doc comments for i915_ioc32.c

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8025/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 13+ messages in thread

* ✓ Fi.CI.IGT: success for drm/i915: Clean up ancient doc comments for i915_ioc32.c (rev3)
  2018-02-14 15:29 [PATCH] drm/i915: Clean up ancient doc comments for i915_ioc32.c Chris Wilson
                   ` (5 preceding siblings ...)
  2018-02-14 17:36 ` ✓ Fi.CI.BAT: success for drm/i915: Clean up ancient doc comments for i915_ioc32.c (rev3) Patchwork
@ 2018-02-15  0:27 ` Patchwork
  6 siblings, 0 replies; 13+ messages in thread
From: Patchwork @ 2018-02-15  0:27 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Clean up ancient doc comments for i915_ioc32.c (rev3)
URL   : https://patchwork.freedesktop.org/series/38261/
State : success

== Summary ==

Test kms_vblank:
        Subgroup crtc-id:
                skip       -> PASS       (shard-snb)
        Subgroup pipe-a-ts-continuation-modeset:
                skip       -> PASS       (shard-snb)
Test gem_softpin:
        Subgroup noreloc-s3:
                pass       -> SKIP       (shard-snb) fdo#103375
                incomplete -> PASS       (shard-hsw) fdo#103540
Test kms_flip:
        Subgroup 2x-flip-vs-expired-vblank-interruptible:
                pass       -> FAIL       (shard-hsw) fdo#102887
        Subgroup modeset-vs-vblank-race:
                pass       -> FAIL       (shard-hsw) fdo#103060
        Subgroup 2x-flip-vs-absolute-wf_vblank-interruptible:
                pass       -> FAIL       (shard-hsw) fdo#100368

fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
fdo#102887 https://bugs.freedesktop.org/show_bug.cgi?id=102887
fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368

shard-apl        total:3346 pass:1737 dwarn:1   dfail:0   fail:21  skip:1586 time:14026s
shard-hsw        total:3427 pass:1755 dwarn:1   dfail:0   fail:14  skip:1656 time:14591s
shard-snb        total:3427 pass:1348 dwarn:1   dfail:0   fail:10  skip:2068 time:7623s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8025/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v3] drm/i915: Clean up ancient doc comments for i915_ioc32.c
  2018-02-14 16:07 ` [PATCH v3] " Chris Wilson
@ 2018-02-15  7:43   ` Chris Wilson
  2018-02-15 14:00     ` Jani Nikula
  0 siblings, 1 reply; 13+ messages in thread
From: Chris Wilson @ 2018-02-15  7:43 UTC (permalink / raw)
  To: intel-gfx

Quoting Chris Wilson (2018-02-14 16:07:20)
> As befitting a file dedicated to the mistakes of the past,
> 
> drivers/gpu/drm/i915/i915_ioc32.c:2: warning: Cannot understand  * \file i915_ioc32.c
>  on line 2 - I thought it was a doc line
> drivers/gpu/drm/i915/i915_ioc32.c:82: warning: Function parameter or member 'filp' not described in 'i915_compat_ioctl'
> drivers/gpu/drm/i915/i915_ioc32.c:82: warning: Function parameter or member 'cmd' not described in 'i915_compat_ioctl'
> drivers/gpu/drm/i915/i915_ioc32.c:82: warning: Function parameter or member 'arg' not described in 'i915_compat_ioctl'
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
> Don't drop the fixes this time!

Are we happy with this no-nonsense version?

> ---
>  drivers/gpu/drm/i915/i915_ioc32.c | 27 ++++++++++++---------------
>  1 file changed, 12 insertions(+), 15 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_ioc32.c b/drivers/gpu/drm/i915/i915_ioc32.c
> index 97f3a5640289..0e5c580d117c 100644
> --- a/drivers/gpu/drm/i915/i915_ioc32.c
> +++ b/drivers/gpu/drm/i915/i915_ioc32.c
> @@ -1,11 +1,6 @@
> -/**
> - * \file i915_ioc32.c
> - *
> +/*
>   * 32-bit ioctl compatibility routines for the i915 DRM.
>   *
> - * \author Alan Hourihane <alanh@fairlite.demon.co.uk>
> - *
> - *
>   * Copyright (C) Paul Mackerras 2005
>   * Copyright (C) Alan Hourihane 2005
>   * All Rights Reserved.
> @@ -28,6 +23,8 @@
>   * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
>   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
>   * IN THE SOFTWARE.
> + *
> + * Author: Alan Hourihane <alanh@fairlite.demon.co.uk>
>   */
>  #include <linux/compat.h>
>  
> @@ -55,10 +52,10 @@ static int compat_i915_getparam(struct file *file, unsigned int cmd,
>                 return -EFAULT;
>  
>         request = compat_alloc_user_space(sizeof(*request));
> -       if (!access_ok(VERIFY_WRITE, request, sizeof(*request))
> -           || __put_user(req32.param, &request->param)
> -           || __put_user((void __user *)(unsigned long)req32.value,
> -                         &request->value))
> +       if (!access_ok(VERIFY_WRITE, request, sizeof(*request)) ||
> +           __put_user(req32.param, &request->param) ||
> +           __put_user((void __user *)(unsigned long)req32.value,
> +                      &request->value))
>                 return -EFAULT;
>  
>         return drm_ioctl(file, DRM_IOCTL_I915_GETPARAM,
> @@ -70,13 +67,13 @@ static drm_ioctl_compat_t *i915_compat_ioctls[] = {
>  };
>  
>  /**
> + * i915_compat_ioctl - handle the mistakes of the past
> + * @filp: the file pointer
> + * @cmd: the ioctl command (and encoded flags)
> + * @arg: the ioctl argument (from userspace)
> + *
>   * Called whenever a 32-bit process running under a 64-bit kernel
>   * performs an ioctl on /dev/dri/card<n>.
> - *
> - * \param filp file pointer.
> - * \param cmd command.
> - * \param arg user argument.
> - * \return zero on success or negative number on failure.
>   */
>  long i915_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
>  {
> -- 
> 2.16.1
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v3] drm/i915: Clean up ancient doc comments for i915_ioc32.c
  2018-02-15  7:43   ` Chris Wilson
@ 2018-02-15 14:00     ` Jani Nikula
  2018-02-15 17:05       ` Chris Wilson
  0 siblings, 1 reply; 13+ messages in thread
From: Jani Nikula @ 2018-02-15 14:00 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx

On Thu, 15 Feb 2018, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> Quoting Chris Wilson (2018-02-14 16:07:20)
>> As befitting a file dedicated to the mistakes of the past,
>> 
>> drivers/gpu/drm/i915/i915_ioc32.c:2: warning: Cannot understand  * \file i915_ioc32.c
>>  on line 2 - I thought it was a doc line
>> drivers/gpu/drm/i915/i915_ioc32.c:82: warning: Function parameter or member 'filp' not described in 'i915_compat_ioctl'
>> drivers/gpu/drm/i915/i915_ioc32.c:82: warning: Function parameter or member 'cmd' not described in 'i915_compat_ioctl'
>> drivers/gpu/drm/i915/i915_ioc32.c:82: warning: Function parameter or member 'arg' not described in 'i915_compat_ioctl'
>> 
>> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
>> ---
>> Don't drop the fixes this time!
>
> Are we happy with this no-nonsense version?

Reviewed-by: Jani Nikula <jani.nikula@intel.com>

>
>> ---
>>  drivers/gpu/drm/i915/i915_ioc32.c | 27 ++++++++++++---------------
>>  1 file changed, 12 insertions(+), 15 deletions(-)
>> 
>> diff --git a/drivers/gpu/drm/i915/i915_ioc32.c b/drivers/gpu/drm/i915/i915_ioc32.c
>> index 97f3a5640289..0e5c580d117c 100644
>> --- a/drivers/gpu/drm/i915/i915_ioc32.c
>> +++ b/drivers/gpu/drm/i915/i915_ioc32.c
>> @@ -1,11 +1,6 @@
>> -/**
>> - * \file i915_ioc32.c
>> - *
>> +/*
>>   * 32-bit ioctl compatibility routines for the i915 DRM.
>>   *
>> - * \author Alan Hourihane <alanh@fairlite.demon.co.uk>
>> - *
>> - *
>>   * Copyright (C) Paul Mackerras 2005
>>   * Copyright (C) Alan Hourihane 2005
>>   * All Rights Reserved.
>> @@ -28,6 +23,8 @@
>>   * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
>>   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
>>   * IN THE SOFTWARE.
>> + *
>> + * Author: Alan Hourihane <alanh@fairlite.demon.co.uk>
>>   */
>>  #include <linux/compat.h>
>>  
>> @@ -55,10 +52,10 @@ static int compat_i915_getparam(struct file *file, unsigned int cmd,
>>                 return -EFAULT;
>>  
>>         request = compat_alloc_user_space(sizeof(*request));
>> -       if (!access_ok(VERIFY_WRITE, request, sizeof(*request))
>> -           || __put_user(req32.param, &request->param)
>> -           || __put_user((void __user *)(unsigned long)req32.value,
>> -                         &request->value))
>> +       if (!access_ok(VERIFY_WRITE, request, sizeof(*request)) ||
>> +           __put_user(req32.param, &request->param) ||
>> +           __put_user((void __user *)(unsigned long)req32.value,
>> +                      &request->value))
>>                 return -EFAULT;
>>  
>>         return drm_ioctl(file, DRM_IOCTL_I915_GETPARAM,
>> @@ -70,13 +67,13 @@ static drm_ioctl_compat_t *i915_compat_ioctls[] = {
>>  };
>>  
>>  /**
>> + * i915_compat_ioctl - handle the mistakes of the past
>> + * @filp: the file pointer
>> + * @cmd: the ioctl command (and encoded flags)
>> + * @arg: the ioctl argument (from userspace)
>> + *
>>   * Called whenever a 32-bit process running under a 64-bit kernel
>>   * performs an ioctl on /dev/dri/card<n>.
>> - *
>> - * \param filp file pointer.
>> - * \param cmd command.
>> - * \param arg user argument.
>> - * \return zero on success or negative number on failure.
>>   */
>>  long i915_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
>>  {
>> -- 
>> 2.16.1
>> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v3] drm/i915: Clean up ancient doc comments for i915_ioc32.c
  2018-02-15 14:00     ` Jani Nikula
@ 2018-02-15 17:05       ` Chris Wilson
  0 siblings, 0 replies; 13+ messages in thread
From: Chris Wilson @ 2018-02-15 17:05 UTC (permalink / raw)
  To: Jani Nikula, intel-gfx

Quoting Jani Nikula (2018-02-15 14:00:34)
> On Thu, 15 Feb 2018, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> > Quoting Chris Wilson (2018-02-14 16:07:20)
> >> As befitting a file dedicated to the mistakes of the past,
> >> 
> >> drivers/gpu/drm/i915/i915_ioc32.c:2: warning: Cannot understand  * \file i915_ioc32.c
> >>  on line 2 - I thought it was a doc line
> >> drivers/gpu/drm/i915/i915_ioc32.c:82: warning: Function parameter or member 'filp' not described in 'i915_compat_ioctl'
> >> drivers/gpu/drm/i915/i915_ioc32.c:82: warning: Function parameter or member 'cmd' not described in 'i915_compat_ioctl'
> >> drivers/gpu/drm/i915/i915_ioc32.c:82: warning: Function parameter or member 'arg' not described in 'i915_compat_ioctl'
> >> 
> >> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> >> ---
> >> Don't drop the fixes this time!
> >
> > Are we happy with this no-nonsense version?
> 
> Reviewed-by: Jani Nikula <jani.nikula@intel.com>

Ta, so the only residual one is the quirky @channel.port to be resolved
:)
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2018-02-15 17:05 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-14 15:29 [PATCH] drm/i915: Clean up ancient doc comments for i915_ioc32.c Chris Wilson
2018-02-14 15:42 ` Jani Nikula
2018-02-14 15:47   ` Chris Wilson
2018-02-14 16:09     ` Jani Nikula
2018-02-14 15:45 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2018-02-14 16:01 ` ✓ Fi.CI.BAT: success " Patchwork
2018-02-14 16:05 ` [PATCH v2] " Chris Wilson
2018-02-14 16:07 ` [PATCH v3] " Chris Wilson
2018-02-15  7:43   ` Chris Wilson
2018-02-15 14:00     ` Jani Nikula
2018-02-15 17:05       ` Chris Wilson
2018-02-14 17:36 ` ✓ Fi.CI.BAT: success for drm/i915: Clean up ancient doc comments for i915_ioc32.c (rev3) Patchwork
2018-02-15  0:27 ` ✓ Fi.CI.IGT: " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.