From: Brian Norris <computersforpeace@gmail.com>
To: Han Xu <xhnjupt@gmail.com>
Cc: Huang Shijie <shijie.huang@intel.com>,
Han Xu <b45815@freescale.com>,
"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
"han.xu@freescale.com" <han.xu@freescale.com>
Subject: Re: [PATCH V3] mtd: fsl-quadspi: Access multiple chips simultaneously
Date: Wed, 27 May 2015 12:34:42 -0700 [thread overview]
Message-ID: <20150527193405.GH27753@ld-irv-0074> (raw)
In-Reply-To: <CA+EcR231boQyR9Jj7SRkmoOgZbv-WLhdzUK+S7ZHDaGqECsF-Q@mail.gmail.com>
Hi Han,
On Wed, May 20, 2015 at 05:28:20PM -0500, Han Xu wrote:
> On Wed, May 20, 2015 at 4:52 PM, Brian Norris
> <computersforpeace@gmail.com> wrote:
> > On Wed, May 13, 2015 at 02:40:57PM -0500, Han Xu wrote:
> >> --- a/drivers/mtd/spi-nor/fsl-quadspi.c
> >> +++ b/drivers/mtd/spi-nor/fsl-quadspi.c
> > ...
> >> @@ -761,13 +763,17 @@ static int fsl_qspi_prep(struct spi_nor *nor, enum spi_nor_ops ops)
> >> struct fsl_qspi *q = nor->priv;
> >> int ret;
> >>
> >> + mutex_lock(&q->lock);
> >> ret = clk_enable(q->clk_en);
> >> - if (ret)
> >> + if (ret) {
> >> + mutex_unlock(&q->lock);
> >> return ret;
> >> + }
> >>
> >> ret = clk_enable(q->clk);
> >> if (ret) {
> >> clk_disable(q->clk_en);
> >> + mutex_unlock(&q->lock);
> >> return ret;
> >> }
> >>
> >
> > I think it'd be better to have a single error path in this function now.
> >
> > Otherwise, I think this is OK. I can push the appended patch instead, if
> > that's OK with you.
>
> Hi Brian, I think that's fine. I will submit another patch to improve it.
OK. Resubmit if you'd like, or just ack my version. I'd like your
Tested-by if possible.
> >
> > Signed-off-by: Han Xu <b45815@freescale.com>
> > [Brian: reworked err path in fsl_qspi_prep()]
> > Signed-off-by: Brian Norris <computersforpeace@gmail.com>
> > ---
> > drivers/mtd/spi-nor/fsl-quadspi.c | 32 +++++++++++++++++++++++---------
> > 1 file changed, 23 insertions(+), 9 deletions(-)
[...]
Brian
next prev parent reply other threads:[~2015-05-27 19:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-13 19:40 [PATCH V3] mtd: fsl-quadspi: Access multiple chips simultaneously Han Xu
2015-05-20 21:52 ` Brian Norris
2015-05-20 22:28 ` Han Xu
2015-05-27 19:34 ` Brian Norris [this message]
2015-06-23 23:10 ` Brian Norris
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=20150527193405.GH27753@ld-irv-0074 \
--to=computersforpeace@gmail.com \
--cc=b45815@freescale.com \
--cc=han.xu@freescale.com \
--cc=linux-mtd@lists.infradead.org \
--cc=shijie.huang@intel.com \
--cc=xhnjupt@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