All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@lip6.fr>
To: Georgiana Chelu <georgiana.chelu93@gmail.com>
Cc: outreachy-kernel <outreachy-kernel@googlegroups.com>,
	 Greg KH <gregkh@linuxfoundation.org>
Subject: Re: [Outreachy kernel] [PATCH] media:atomisp:pci: Use error codes instead of bool variables
Date: Tue, 7 Mar 2017 23:05:27 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.20.1703072304000.2292@hadrien> (raw)
In-Reply-To: <CALta04yUrNJ2ShXUoZmHuLen=j+rWLY7wKX2uFNXuKmCuSAiMQ@mail.gmail.com>



On Wed, 8 Mar 2017, Georgiana Chelu wrote:

> >
> > > -     return true;
> > > +     return INPUT_SYSTEM_ERR_NO_ERROR;
> > > +
> > > +exit:
> > > +     return INPUT_SYSTEM_ERR_CREATE_CHANNEL_FAIL;
> >
> > Oh...  I was hoping for standard kernel values like -ENOMEM, -EINVAL, etc.
>
> I will further investigate this. At this moment, it seemed reasonable to me
> to use those error codes. They were defined in the module, but never used,
> which made me think that they still have a purpose. So, I chose the
> error code that seemed to be related to the name of the function.

It's a reasonable strategy, but someday the code will have to use the
kernel ones, so maybe one may as well get started on that.  The code will
be hybrid for a while, but tere is no point to try to do the whole thing
at once and make mistakes.

julia

>
> >
> > Also, watch your subject lines.  Normally there is a space after each :.
> > In any case, you should pick what has been commonly used for this driver.
> >
>
> I will take care of this in the future. Thanks!
>
> > julia
>
> --
> 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/CALta04yUrNJ2ShXUoZmHuLen%3Dj%2BrWLY7wKX2uFNXuKmCuSAiMQ%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>


      reply	other threads:[~2017-03-07 22:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-07 21:30 [PATCH] media:atomisp:pci: Use error codes instead of bool variables Georgiana Rodica Chelu
2017-03-07 21:32 ` Georgiana Chelu
2017-03-07 21:39 ` [Outreachy kernel] " Julia Lawall
2017-03-07 22:02   ` Georgiana Chelu
2017-03-07 22:05     ` Julia Lawall [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=alpine.DEB.2.20.1703072304000.2292@hadrien \
    --to=julia.lawall@lip6.fr \
    --cc=georgiana.chelu93@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --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.