From: Arnd Bergmann <arnd@arndb.de>
To: Matthew Wilcox <matthew@wil.cx>
Cc: liqin.chen@sunplusct.com,
Andrew Morton <akpm@linux-foundation.org>,
linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org,
torvalds@linux-foundation.org
Subject: Re: [PATCH] asm-generic: add EMAXERRNO
Date: Mon, 15 Jun 2009 16:02:42 +0200 [thread overview]
Message-ID: <200906151602.42873.arnd@arndb.de> (raw)
In-Reply-To: <20090615133151.GI19977@parisc-linux.org>
On Monday 15 June 2009, Matthew Wilcox wrote:
> On Mon, Jun 15, 2009 at 03:30:09PM +0200, Arnd Bergmann wrote:
> > Some architectures want to flag error returns from a syscall based on
> > the return value. The range from zero to -511 is for errors that
> > we can return to user space, so add a #define for this to
> > include/asm-generic/errno.h.
>
> I thought we could return anything up to -4095.
Sort of, yes. Internally to the kernel, we use anything up to 4095,
that's e.g. IS_ERR_VALUE checks for.
Error numbers from 512 to 4095 are internal and should never be seen
by the user.
In reality, it probably does not matter at all because we know what
error numbers we use. Now that you pointed me to include/linux/err.h,
that already defines MAX_ERRNO.
Liqin, I think I'd prefer to just drop my patch again, and you can
use MAX_ERRNO, which is defined in err.h.
Arnd <><
next prev parent reply other threads:[~2009-06-15 14:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-09 6:26 [PATCH 07/27] score: create head files elf.h emergency-restart.h errno.h liqin.chen
2009-06-09 17:20 ` Arnd Bergmann
2009-06-13 6:39 ` liqin.chen
2009-06-13 22:23 ` Arnd Bergmann
2009-06-15 12:11 ` liqin.chen
2009-06-15 13:30 ` [PATCH] asm-generic: add EMAXERRNO Arnd Bergmann
2009-06-15 13:31 ` Matthew Wilcox
2009-06-15 14:02 ` Arnd Bergmann [this message]
2009-06-16 3:04 ` liqin.chen
2009-06-16 14:13 ` Arnd Bergmann
2009-06-15 13:33 ` liqin.chen
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=200906151602.42873.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=akpm@linux-foundation.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liqin.chen@sunplusct.com \
--cc=matthew@wil.cx \
--cc=torvalds@linux-foundation.org \
/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