From: Timur Tabi <timur@codeaurora.org>
To: Stephen Boyd <sboyd@codeaurora.org>
Cc: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Shanker Donthineni <shankerd@codeaurora.org>,
awallis@codeaurora.org, abhimany@codeaurora.org,
will.deacon@arm.com, Vipul Gandhi <vgandhi@codeaurora.org>
Subject: Re: [PATCH 2/4] hvc_dcc: don't ignore errors during initialization
Date: Fri, 3 Jul 2015 10:46:11 -0400 [thread overview]
Message-ID: <42D8621F-E36D-4F4F-9143-3F7773EC834E@codeaurora.org> (raw)
In-Reply-To: <55947DCD.1020605@codeaurora.org>
On Jul 1, 2015, at 7:54 PM, Stephen Boyd wrote:
>>
>> + /* Returns -1 if error */
>> + ret = hvc_instantiate(0, 0, &hvc_dcc_get_put_ops);
>> +
>> + return ret < 0 ? -ENODEV : 0;
>
> Why not just return the value that hvc_instantiate returns? And maybe we
> should change those -1 in hvc_instantiate into -EPERM?
Well, I didn't want to change common HVC code. I would have to change all the other drivers that call hvc_instatiate as well. I agree that returning -1 is bad, but fixing that is something that should be done in another patch.
>>
>> - hvc_alloc(0, 0, &hvc_dcc_get_put_ops, 128);
>> - return 0;
>> + p = hvc_alloc(0, 0, &hvc_dcc_get_put_ops, 128);
>> +
>> + return IS_ERR(p) ? PTR_ERR(p) : 0;
>
> return PTR_ERR_OR_ZERO()?
Yes, thanks. I'll change it.
next prev parent reply other threads:[~2015-07-03 14:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-30 21:23 [PATCH 1/4] hvc_dcc: bind driver to core0 for reads and writes Timur Tabi
2015-06-30 21:23 ` [PATCH 2/4] hvc_dcc: don't ignore errors during initialization Timur Tabi
2015-07-01 23:54 ` Stephen Boyd
2015-07-03 14:46 ` Timur Tabi [this message]
2015-06-30 21:23 ` [PATCH 3/4] [v3] ARM64: TTY: hvc_dcc: Add support for ARM64 dcc Timur Tabi
2015-06-30 21:23 ` [PATCH 4/4] hvc_dcc: disable user-space access to DCC Timur Tabi
2015-07-02 0:00 ` Stephen Boyd
2015-07-03 14:53 ` Timur Tabi
2015-07-01 1:37 ` [PATCH 1/4] hvc_dcc: bind driver to core0 for reads and writes Stephen Boyd
2015-07-01 1:57 ` Timur Tabi
2015-07-01 23:38 ` Stephen Boyd
2015-07-03 14:42 ` Timur Tabi
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=42D8621F-E36D-4F4F-9143-3F7773EC834E@codeaurora.org \
--to=timur@codeaurora.org \
--cc=abhimany@codeaurora.org \
--cc=awallis@codeaurora.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sboyd@codeaurora.org \
--cc=shankerd@codeaurora.org \
--cc=vgandhi@codeaurora.org \
--cc=will.deacon@arm.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®