All of lore.kernel.org
 help / color / mirror / Atom feed
From: Debleena Sen <idebleenasen@gmail.com>
To: Julia Lawall <julia.lawall@lip6.fr>
Cc: outreachy-kernel <outreachy-kernel@googlegroups.com>
Subject: Re: [Outreachy kernel] Warning about ENOSYS
Date: Wed, 6 Mar 2019 15:18:19 +0530	[thread overview]
Message-ID: <CACw+u4F_j+tYZ9OTH5PUWZbCNn_Q32w5Jv5dCz9=aNCqrHOAFA@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.20.1903051912330.3701@hadrien>

[-- 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 --]

      reply	other threads:[~2019-03-06  9:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CACw+u4F_j+tYZ9OTH5PUWZbCNn_Q32w5Jv5dCz9=aNCqrHOAFA@mail.gmail.com' \
    --to=idebleenasen@gmail.com \
    --cc=julia.lawall@lip6.fr \
    --cc=outreachy-kernel@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.