mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Wang, Yalin" <Yalin.Wang@sonymobile.com>
To: "'gregkh@linuxfoundation.org'" <gregkh@linuxfoundation.org>
Cc: "'tranmanphong@gmail.com'" <tranmanphong@gmail.com>,
	"'fabio.estevam@freescale.com'" <fabio.estevam@freescale.com>,
	"'prime.zeng@huawei.com'" <prime.zeng@huawei.com>,
	"'devel@driverdev.osuosl.org'" <devel@driverdev.osuosl.org>,
	"'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>,
	"Gao, Neil" <Neil.Gao@sonymobile.com>
Subject: RE: [RFC] ion:change ion_cma_allocate return error value
Date: Thu, 29 Jan 2015 09:41:18 +0800	[thread overview]
Message-ID: <35FD53F367049845BC99AC72306C23D1044A02027E01@CNBJMBX05.corpusers.net> (raw)
In-Reply-To: <20150128184509.GB1178@kroah.com>

> -----Original Message-----
> From: 'gregkh@linuxfoundation.org' [mailto:gregkh@linuxfoundation.org]
> Sent: Thursday, January 29, 2015 2:45 AM
> To: Wang, Yalin
> Cc: 'tranmanphong@gmail.com'; 'fabio.estevam@freescale.com';
> 'prime.zeng@huawei.com'; 'devel@driverdev.osuosl.org'; 'linux-
> kernel@vger.kernel.org'; Gao, Neil
> Subject: Re: [RFC] ion:change ion_cma_allocate return error value
> 
> On Tue, Jan 27, 2015 at 02:04:21PM +0800, Wang, Yalin wrote:
> > This patch change the error return value from -1 to -ENOMEM, so that
> > userspace can get the correct errno, otherwise,
> > -1 will be -EPERM, userspace will print permission deny for allocation
> > failure.
> >
> > Signed-off-by: Yalin Wang <yalin.wang@sonymobile.com>
> > ---
> >  drivers/staging/android/ion/ion_cma_heap.c | 6 ++----
> >  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> Don't you also need to now change userspace code to properly handle these
> errors?
> 
No, because userspace use strerror() to print errno,
It will print correct error string depending on kernel return
Errno.

      reply	other threads:[~2015-01-29  1:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-27  6:04 Wang, Yalin
2015-01-27  7:26 ` Dan Carpenter
2015-01-28 18:45 ` 'gregkh@linuxfoundation.org'
2015-01-29  1:41   ` Wang, Yalin [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=35FD53F367049845BC99AC72306C23D1044A02027E01@CNBJMBX05.corpusers.net \
    --to=yalin.wang@sonymobile.com \
    --cc=Neil.Gao@sonymobile.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=fabio.estevam@freescale.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=prime.zeng@huawei.com \
    --cc=tranmanphong@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®