From: Jingoo Han <jg1.han@samsung.com>
To: "'Marek Vasut'" <marex@denx.de>, "'Graham Moore'" <grmoore@altera.com>
Cc: ggrahammoore@gmail.com, "'David Woodhouse'" <dwmw2@infradead.org>,
"'Brian Norris'" <computersforpeace@gmail.com>,
"'Artem Bityutskiy'" <artem.bityutskiy@linux.intel.com>,
"'Sourav Poddar'" <sourav.poddar@ti.com>,
"'Sascha Hauer'" <s.hauer@pengutronix.de>,
"'Geert Uytterhoeven'" <geert+renesas@linux-m68k.org>,
"'Insop Song'" <insop.song@gainspeed.com>,
linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
"'Alan Tull'" <atull@altera.com>,
"'Dinh Nguyen'" <dinguyen@altera.com>,
"'Yves Vandervennet'" <rocket.yvanderv@gmail.com>,
"'Jingoo Han'" <jg1.han@samsung.com>
Subject: Re: [PATCH] Add support for flag status register on Micron chips.
Date: Wed, 09 Apr 2014 19:21:52 +0900 [thread overview]
Message-ID: <000901cf53dd$86a71b50$93f551f0$%han@samsung.com> (raw)
In-Reply-To: <000801cf53dc$ba81e820$2f85b860$%han@samsung.com>
On Wednesday, April 09, 2014 7:16 PM, Jingoo Han wrote:
> On Wednesday, April 09, 2014 7:07 PM, Marek Vasut wrote:
> > On Tuesday, April 08, 2014 at 06:12:50 PM, grmoore@altera.com wrote:
> > > From: Graham Moore <grmoore@altera.com>
> > >
> > > Some new Micron flash chips require reading the flag
> > > status register to determine when operations have completed.
> > >
> > > Furthermore, chips with multi-die stacks of the 65nm 256Mb QSPI also
> > > require reading the status register before reading the flag status
> > > register.
> > >
> > > This patch adds support for the flag status register in the n25q512a1 and
> > > n25q00 Micron QSPI flash chips.
> >
> > [...]
> >
> > > +static int read_fsr(struct m25p *flash)
> > > +{
> > > + ssize_t retval;
> > > + u8 code = OPCODE_RDFSR;
> > > + u8 val;
> > > +
> > > + retval = spi_write_then_read(flash->spi, &code, 1, &val, 1);
> > > +
> > > + if (retval < 0) {
> > > + dev_err(&flash->spi->dev, "error %d reading FSR\n",
> > > + (int) retval);
> >
> > Is the type-cast really needed here? Why ?
>
> The type-cast looks clumsy.
> The type of 'retval' is retval; thus, '%zd' can be used,
Sorry, there is a typo!
s/retval/ssize_t
The type of 'retval' is "ssize_t"; thus, '%zd' can be used,
instead of '%d', as below.
+ dev_err(&flash->spi->dev, "error %zd reading FSR\n",
+ retval);
Best regards,
Jingoo Han
next prev parent reply other threads:[~2014-04-09 10:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-08 16:12 grmoore
2014-04-08 16:12 ` grmoore
2014-04-08 16:52 ` Insop Song
2014-04-09 10:06 ` Marek Vasut
2014-04-09 10:16 ` Jingoo Han
2014-04-09 10:21 ` Jingoo Han [this message]
2014-04-09 10:03 ` Marek Vasut
2014-04-09 11:09 ` Gerhard Sittig
2014-04-09 18:14 ` Graham Moore
2014-04-09 18:31 ` Marek Vasut
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='000901cf53dd$86a71b50$93f551f0$%han@samsung.com' \
--to=jg1.han@samsung.com \
--cc=artem.bityutskiy@linux.intel.com \
--cc=atull@altera.com \
--cc=computersforpeace@gmail.com \
--cc=dinguyen@altera.com \
--cc=dwmw2@infradead.org \
--cc=geert+renesas@linux-m68k.org \
--cc=ggrahammoore@gmail.com \
--cc=grmoore@altera.com \
--cc=insop.song@gainspeed.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=marex@denx.de \
--cc=rocket.yvanderv@gmail.com \
--cc=s.hauer@pengutronix.de \
--cc=sourav.poddar@ti.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®