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