From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Stepan Moskovchenko <stepanm@codeaurora.org>
Cc: dwalker@codeaurora.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH RFC] arm: msm: Add QSD8x60 System MMU support.
Date: Fri, 23 Jul 2010 17:42:18 +0100 [thread overview]
Message-ID: <20100723164218.GC750@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1279833694-1214-1-git-send-email-stepanm@codeaurora.org>
On Thu, Jul 22, 2010 at 02:21:34PM -0700, Stepan Moskovchenko wrote:
> Add support for the System MMUs found on the 8x60 and 8x72
> families of Qualcomm MSMs. These SMMUs allow virtualization
> of the address space used by most of the multimedia cores
> on these chips.
There's lots of "return -1;" statements in this patch - it's obscene
that this is used to indicate "some error occurred" in kernel space
rather than a real errno value - even when an existing function
(eg, request_irq) gave you an error code already.
The problem comes when someone - or you - uses your code, assuming that
you do return errno values, just like the rest of the kernel. I've seen
cases where this happened all the way through to userspace. When "-1"
is interpreted as an errno value, it means "Operation not permitted"
which almost is never what you meant - and as kernel functions return
negative errno values, this is exactly how it gets interpreted.
Please note this for the future - and please review patches on this
point internally first.
Thanks.
prev parent reply other threads:[~2010-07-23 16:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-22 21:21 Stepan Moskovchenko
2010-07-23 16:42 ` Russell King - ARM Linux [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=20100723164218.GC750@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=dwalker@codeaurora.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stepanm@codeaurora.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
Powered by JetHome