All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Staging: vboxvideo: Do not return -ENOSYS
@ 2019-03-07 20:40 Debleena Sen
  2019-03-07 20:54 ` [Outreachy kernel] " Julia Lawall
  0 siblings, 1 reply; 3+ messages in thread
From: Debleena Sen @ 2019-03-07 20:40 UTC (permalink / raw)
  To: gregkh, outreachy-kernel; +Cc: Debleena Sen

New instances of ENOSYS are errors. Refer /usr/include/asm-generic/errno.h
to find correct error code to use in place of ENOSYS.
In vbox_prime.c, replace all occurrences of -ENOSYS with -ENODEV to fix
checkpatch.pl warning:
WARNING: ENOSYS means 'invalid syscall nr' and nothing else

Signed-off-by: Debleena Sen <idebleenasen@gmail.com>
---
 drivers/staging/vboxvideo/vbox_prime.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/vboxvideo/vbox_prime.c b/drivers/staging/vboxvideo/vbox_prime.c
index d61985b..702b1aa 100644
--- a/drivers/staging/vboxvideo/vbox_prime.c
+++ b/drivers/staging/vboxvideo/vbox_prime.c
@@ -16,7 +16,7 @@
 int vbox_gem_prime_pin(struct drm_gem_object *obj)
 {
 	WARN_ONCE(1, "not implemented");
-	return -ENOSYS;
+	return -ENODEV;
 }
 
 void vbox_gem_prime_unpin(struct drm_gem_object *obj)
@@ -27,7 +27,7 @@ void vbox_gem_prime_unpin(struct drm_gem_object *obj)
 struct sg_table *vbox_gem_prime_get_sg_table(struct drm_gem_object *obj)
 {
 	WARN_ONCE(1, "not implemented");
-	return ERR_PTR(-ENOSYS);
+	return ERR_PTR(-ENODEV);
 }
 
 struct drm_gem_object *vbox_gem_prime_import_sg_table(
@@ -35,13 +35,13 @@ struct drm_gem_object *vbox_gem_prime_import_sg_table(
 	struct sg_table *table)
 {
 	WARN_ONCE(1, "not implemented");
-	return ERR_PTR(-ENOSYS);
+	return ERR_PTR(-ENODEV);
 }
 
 void *vbox_gem_prime_vmap(struct drm_gem_object *obj)
 {
 	WARN_ONCE(1, "not implemented");
-	return ERR_PTR(-ENOSYS);
+	return ERR_PTR(-ENODEV);
 }
 
 void vbox_gem_prime_vunmap(struct drm_gem_object *obj, void *vaddr)
@@ -52,5 +52,5 @@ void vbox_gem_prime_vunmap(struct drm_gem_object *obj, void *vaddr)
 int vbox_gem_prime_mmap(struct drm_gem_object *obj, struct vm_area_struct *area)
 {
 	WARN_ONCE(1, "not implemented");
-	return -ENOSYS;
+	return -ENODEV;
 }
-- 
2.7.4



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

* Re: [Outreachy kernel] [PATCH] Staging: vboxvideo: Do not return -ENOSYS
  2019-03-07 20:40 [PATCH] Staging: vboxvideo: Do not return -ENOSYS Debleena Sen
@ 2019-03-07 20:54 ` Julia Lawall
  2019-03-08  7:09   ` Debleena Sen
  0 siblings, 1 reply; 3+ messages in thread
From: Julia Lawall @ 2019-03-07 20:54 UTC (permalink / raw)
  To: Debleena Sen; +Cc: gregkh, outreachy-kernel



On Thu, 7 Mar 2019, Debleena Sen wrote:

> New instances of ENOSYS are errors. Refer /usr/include/asm-generic/errno.h
> to find correct error code to use in place of ENOSYS.

The second sentence is strange.  It would be better to just put the
following message, and then add something at the end explaining how you
chose -ENODEV.

julia

> In vbox_prime.c, replace all occurrences of -ENOSYS with -ENODEV to fix
> checkpatch.pl warning:
> WARNING: ENOSYS means 'invalid syscall nr' and nothing else
>
> Signed-off-by: Debleena Sen <idebleenasen@gmail.com>
> ---
>  drivers/staging/vboxvideo/vbox_prime.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/staging/vboxvideo/vbox_prime.c b/drivers/staging/vboxvideo/vbox_prime.c
> index d61985b..702b1aa 100644
> --- a/drivers/staging/vboxvideo/vbox_prime.c
> +++ b/drivers/staging/vboxvideo/vbox_prime.c
> @@ -16,7 +16,7 @@
>  int vbox_gem_prime_pin(struct drm_gem_object *obj)
>  {
>  	WARN_ONCE(1, "not implemented");
> -	return -ENOSYS;
> +	return -ENODEV;
>  }
>
>  void vbox_gem_prime_unpin(struct drm_gem_object *obj)
> @@ -27,7 +27,7 @@ void vbox_gem_prime_unpin(struct drm_gem_object *obj)
>  struct sg_table *vbox_gem_prime_get_sg_table(struct drm_gem_object *obj)
>  {
>  	WARN_ONCE(1, "not implemented");
> -	return ERR_PTR(-ENOSYS);
> +	return ERR_PTR(-ENODEV);
>  }
>
>  struct drm_gem_object *vbox_gem_prime_import_sg_table(
> @@ -35,13 +35,13 @@ struct drm_gem_object *vbox_gem_prime_import_sg_table(
>  	struct sg_table *table)
>  {
>  	WARN_ONCE(1, "not implemented");
> -	return ERR_PTR(-ENOSYS);
> +	return ERR_PTR(-ENODEV);
>  }
>
>  void *vbox_gem_prime_vmap(struct drm_gem_object *obj)
>  {
>  	WARN_ONCE(1, "not implemented");
> -	return ERR_PTR(-ENOSYS);
> +	return ERR_PTR(-ENODEV);
>  }
>
>  void vbox_gem_prime_vunmap(struct drm_gem_object *obj, void *vaddr)
> @@ -52,5 +52,5 @@ void vbox_gem_prime_vunmap(struct drm_gem_object *obj, void *vaddr)
>  int vbox_gem_prime_mmap(struct drm_gem_object *obj, struct vm_area_struct *area)
>  {
>  	WARN_ONCE(1, "not implemented");
> -	return -ENOSYS;
> +	return -ENODEV;
>  }
> --
> 2.7.4
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1551991259-109878-1-git-send-email-idebleenasen%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>


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

* Re: [Outreachy kernel] [PATCH] Staging: vboxvideo: Do not return -ENOSYS
  2019-03-07 20:54 ` [Outreachy kernel] " Julia Lawall
@ 2019-03-08  7:09   ` Debleena Sen
  0 siblings, 0 replies; 3+ messages in thread
From: Debleena Sen @ 2019-03-08  7:09 UTC (permalink / raw)
  To: Julia Lawall; +Cc: Greg KH, outreachy-kernel

[-- Attachment #1: Type: text/plain, Size: 3009 bytes --]

On Fri, 8 Mar 2019, 05:50 Julia Lawall, <julia.lawall@lip6.fr> wrote:

>
>
> On Thu, 7 Mar 2019, Debleena Sen wrote:
>
> > New instances of ENOSYS are errors. Refer
> /usr/include/asm-generic/errno.h
> > to find correct error code to use in place of ENOSYS.
>
> The second sentence is strange.  It would be better to just put the
> following message, and then add something at the end explaining how you
> chose -ENODEV.
>
> julia
>
> > In vbox_prime.c, replace all occurrences of -ENOSYS with -ENODEV to fix
> > checkpatch.pl warning:
> > WARNING: ENOSYS means 'invalid syscall nr' and nothing else
> >
> > Signed-off-by: Debleena Sen <idebleenasen@gmail.com>
> > ---
> >  drivers/staging/vboxvideo/vbox_prime.c | 10 +++++-----
> >  1 file changed, 5 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/staging/vboxvideo/vbox_prime.c
> b/drivers/staging/vboxvideo/vbox_prime.c
> > index d61985b..702b1aa 100644
> > --- a/drivers/staging/vboxvideo/vbox_prime.c
> > +++ b/drivers/staging/vboxvideo/vbox_prime.c
> > @@ -16,7 +16,7 @@
> >  int vbox_gem_prime_pin(struct drm_gem_object *obj)
> >  {
> >       WARN_ONCE(1, "not implemented");
> > -     return -ENOSYS;
> > +     return -ENODEV;
> >  }
> >
> >  void vbox_gem_prime_unpin(struct drm_gem_object *obj)
> > @@ -27,7 +27,7 @@ void vbox_gem_prime_unpin(struct drm_gem_object *obj)
> >  struct sg_table *vbox_gem_prime_get_sg_table(struct drm_gem_object *obj)
> >  {
> >       WARN_ONCE(1, "not implemented");
> > -     return ERR_PTR(-ENOSYS);
> > +     return ERR_PTR(-ENODEV);
> >  }
> >
> >  struct drm_gem_object *vbox_gem_prime_import_sg_table(
> > @@ -35,13 +35,13 @@ struct drm_gem_object
> *vbox_gem_prime_import_sg_table(
> >       struct sg_table *table)
> >  {
> >       WARN_ONCE(1, "not implemented");
> > -     return ERR_PTR(-ENOSYS);
> > +     return ERR_PTR(-ENODEV);
> >  }
> >
> >  void *vbox_gem_prime_vmap(struct drm_gem_object *obj)
> >  {
> >       WARN_ONCE(1, "not implemented");
> > -     return ERR_PTR(-ENOSYS);
> > +     return ERR_PTR(-ENODEV);
> >  }
> >
> >  void vbox_gem_prime_vunmap(struct drm_gem_object *obj, void *vaddr)
> > @@ -52,5 +52,5 @@ void vbox_gem_prime_vunmap(struct drm_gem_object *obj,
> void *vaddr)
> >  int vbox_gem_prime_mmap(struct drm_gem_object *obj, struct
> vm_area_struct *area)
> >  {
> >       WARN_ONCE(1, "not implemented");
> > -     return -ENOSYS;
> > +     return -ENODEV;
> >  }
> > --
> > 2.7.4
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups "outreachy-kernel" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an email to outreachy-kernel+unsubscribe@googlegroups.com.
> > To post to this group, send email to outreachy-kernel@googlegroups.com.
> > To view this discussion on the web visit
> https://groups.google.com/d/msgid/outreachy-kernel/1551991259-109878-1-git-send-email-idebleenasen%40gmail.com
> .
> > For more options, visit https://groups.google.com/d/optout.
> >
>
OK. I'll do that.

>

[-- Attachment #2: Type: text/html, Size: 4650 bytes --]

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

end of thread, other threads:[~2019-03-08  7:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-07 20:40 [PATCH] Staging: vboxvideo: Do not return -ENOSYS Debleena Sen
2019-03-07 20:54 ` [Outreachy kernel] " Julia Lawall
2019-03-08  7:09   ` Debleena Sen

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.