All of lore.kernel.org
 help / color / mirror / Atom feed
* Warning about ENOSYS
@ 2019-03-05 17:50 Debleena Sen
  2019-03-05 18:15 ` [Outreachy kernel] " Julia Lawall
  0 siblings, 1 reply; 3+ messages in thread
From: Debleena Sen @ 2019-03-05 17:50 UTC (permalink / raw)
  To: outreachy-kernel

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

I came across the following warning in
git/kernels/staging/drivers/staging/vboxvideo/vbox_prime.c

WARNING: ENOSYS means 'invalid syscall nr' and nothing else
For the following line:
                 return ERR_PTR(-ENOSYS);

How should I go about fixing this issue?

Thanks,
Debleena

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

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

* Re: [Outreachy kernel] Warning about ENOSYS
  2019-03-05 17:50 Warning about ENOSYS Debleena Sen
@ 2019-03-05 18:15 ` Julia Lawall
  2019-03-06  9:48   ` Debleena Sen
  0 siblings, 1 reply; 3+ messages in thread
From: Julia Lawall @ 2019-03-05 18:15 UTC (permalink / raw)
  To: Debleena Sen; +Cc: outreachy-kernel

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



On Tue, 5 Mar 2019, Debleena Sen wrote:

> I came across the following warning in
> git/kernels/staging/drivers/staging/vboxvideo/vbox_prime.c
> WARNING: ENOSYS means 'invalid syscall nr' and nothing elseᅵ
> For the following line:
> ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵ ᅵreturn ERR_PTR(-ENOSYS);
>
> How should I go about fixing this issue?

One would need to know more about the context.  This return is indicating
that some error occurred.  This is probably under some condition, that
checks whether there is a problem.  The indication of a problem probably
involves some variables that hold the results of some function calls, that
may be producing inappropriate results.  All of that has to be taken into
account.

A typical example is:

x = kzalloc(sizeof(struct foo), GFP_KERNEL);
if (!x) {
  ...
  return -ENOMEM;
}

Here to see that -ENOMEM is the appropriate return value, you actally have
to look back and see that what failed is the call to kzalloc (a kernel
memory allocator).

julia

>
> Thanks,
> Debleena
>
> --
> 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 visithttps://groups.google.com/d/msgid/outreachy-kernel/CACw%2Bu4H%3D4T8_daSPgAs
> tpNFNUJ46zXw2DikwCeu4tzm-MQCSRw%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>
>

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

* Re: [Outreachy kernel] Warning about ENOSYS
  2019-03-05 18:15 ` [Outreachy kernel] " Julia Lawall
@ 2019-03-06  9:48   ` Debleena Sen
  0 siblings, 0 replies; 3+ messages in thread
From: Debleena Sen @ 2019-03-06  9:48 UTC (permalink / raw)
  To: Julia Lawall; +Cc: outreachy-kernel

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

On Tue, 5 Mar 2019, 23:46 Julia Lawall, <julia.lawall@lip6.fr> wrote:

>
>
> On Tue, 5 Mar 2019, Debleena Sen wrote:
>
> > I came across the following warning in
> > git/kernels/staging/drivers/staging/vboxvideo/vbox_prime.c
> > WARNING: ENOSYS means 'invalid syscall nr' and nothing else
> > For the following line:
> >                  return ERR_PTR(-ENOSYS);
> >
> > How should I go about fixing this issue?
>
> One would need to know more about the context.  This return is indicating
> that some error occurred.  This is probably under some condition, that
> checks whether there is a problem.  The indication of a problem probably
> involves some variables that hold the results of some function calls, that
> may be producing inappropriate results.  All of that has to be taken into
> account.
>
> A typical example is:
>
> x = kzalloc(sizeof(struct foo), GFP_KERNEL);
> if (!x) {
>   ...
>   return -ENOMEM;
> }
>
> Here to see that -ENOMEM is the appropriate return value, you actally have
> to look back and see that what failed is the call to kzalloc (a kernel
> memory allocator).
>
> julia
>
> >
> > Thanks,
> > Debleena
> >
> > --
> > 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 visithttps://
> groups.google.com/d/msgid/outreachy-kernel/CACw%2Bu4H%3D4T8_daSPgAs
> > tpNFNUJ46zXw2DikwCeu4tzm-MQCSRw%40mail.gmail.com.
> > For more options, visit https://groups.google.com/d/optout.
> >
> >


Thanks for the explanation. I'll try to find the problem with the code and
fix it

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

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

end of thread, other threads:[~2019-03-06  9:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-05 17:50 Warning about ENOSYS Debleena Sen
2019-03-05 18:15 ` [Outreachy kernel] " Julia Lawall
2019-03-06  9:48   ` 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.