From: Neelesh Gupta <neelegup@linux.vnet.ibm.com>
To: Cedric Le Goater <clg@fr.ibm.com>, Cyril Bur <cyrilbur@gmail.com>,
linuxppc-dev@ozlabs.org
Cc: Joel Stanley <joel@jms.id.au>, Jeremy Kerr <jk@ozlabs.org>
Subject: Re: [PATCH V2] drivers/mtd: add powernv flash MTD abstraction driver
Date: Fri, 29 May 2015 14:21:17 +0530 [thread overview]
Message-ID: <55682885.9090109@linux.vnet.ibm.com> (raw)
In-Reply-To: <556814FE.9000305@fr.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 1053 bytes --]
On 05/29/2015 12:57 PM, Cedric Le Goater wrote:
> Hello,
>
> On 05/28/2015 07:25 PM, Neelesh Gupta wrote:
>>
>> On 05/28/2015 06:36 PM, Cyril Bur wrote:
>> +
>> + rc = opal_async_wait_response(token, &msg);
>> + opal_async_release_token(token);
>> + if (rc) {
>> + dev_err(dev, "opal async wait failed (rc %d)\n", rc);
>> + return -EIO;
>> + }
>> +
>> + rc = be64_to_cpu(msg.params[1]);
>> + if (rc == OPAL_SUCCESS) {
>> + rc = 0;
>> + if (retlen)
>> + *retlen = len;
>> + } else {
>> + rc = -EIO;
>> + }
>> +
>>
>> return rc;
> You could use opal_error_code() to convert opal codes in errnos.
>
> Also, powernv_flash_async_op() only contains low level OPAL cookery. I think
> the code would be better placed under 'arch/powerpc/platforms/powernv/' ?
The logic would unnecessary be split between the platform and driver, it
would make
sense if the method is going to change across the platforms, but that's
not the case.
Moreover, we will still have to export the symbol to make this work as a
module ...
Neelesh.
>
> Cheers,
>
> C.
>
>
[-- Attachment #2: Type: text/html, Size: 1707 bytes --]
prev parent reply other threads:[~2015-05-29 8:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-28 13:06 [PATCH V2] drivers/mtd: add powernv flash MTD abstraction driver Cyril Bur
2015-05-28 17:25 ` Neelesh Gupta
2015-05-29 7:27 ` Cedric Le Goater
2015-05-29 8:51 ` Neelesh Gupta [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=55682885.9090109@linux.vnet.ibm.com \
--to=neelegup@linux.vnet.ibm.com \
--cc=clg@fr.ibm.com \
--cc=cyrilbur@gmail.com \
--cc=jk@ozlabs.org \
--cc=joel@jms.id.au \
--cc=linuxppc-dev@ozlabs.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;
as well as URLs for NNTP newsgroup(s).