public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: computersforpeace@gmail.com (Brian Norris)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 08/13] mtd: st_spi_fsm: Update the JEDEC probe to handle extended READIDs
Date: Thu, 5 Feb 2015 18:11:29 -0800	[thread overview]
Message-ID: <20150206021129.GB18140@ld-irv-0074> (raw)
In-Reply-To: <20150121130204.GC22024@x1>

On Wed, Jan 21, 2015 at 01:02:04PM +0000, Lee Jones wrote:
> On Mon, 12 Jan 2015, Brian Norris wrote:
> > On Mon, Dec 15, 2014 at 11:59:15AM +0000, Lee Jones wrote:
> > > The previous code was based on 3-byte JEDEC IDs, with a possible 2-byte
> > > extension.  However, devices are now emerging that return 6 or more bytes of
> > > READID data and the additional bytes are required to differentiate between
> > > variants or generations of similar devices.
> > > 
> > > This patch refactors the device table and JEDEC probe code to handle arbitrary
> > > length READIDs, with the standard JEDEC definition now becoming a special case.
> > > Functionally, there should be no change in behaviour.  A subsequent patch will
> > > update the table with extended READIDs where applicable.
> > 
> > BTW, how's that promise going, where you work on adapting this driver to
> > the spi-nor framework? We've already done some of this same work there.
> 
> I have pushed this point within ST and someone has agreed to do the
> work.  Last I heard it relied on these patches, but I'll ask again.

OK.

> > > +#define RDID(...) __VA_ARGS__  /* Dummy macro to protect array argument. */
> > 
> > What? What needs "protected"?
> 
> You're asking me questions I can't answer I'm afraid and Angus has now
> left the building.  I guess he thinks __VA_ARGS__ will prevent some
> kind of overflow?

If you don't understand your own code, how can I be expected to maintain
it? This one's pretty trivial and harmless, but an accumulation of
answers like this don't exactly put me in a good mood.

FWIW, I expect the comment has nothing to do with the __VA_ARGS__; it's
just commenting that he has placed a macro around the array just in case
somebody needs/wants to rearrange formats later. That way, we don't
necessarily have to rewrite the whole table, but can just change the
macros.

So the __VA_ARGS__ is just there to make the compiler happy (it thinks
an array argument to a macro actually looks like more than one
argument), and the comment is only mildly descriptive of its purpose.

Brian

  reply	other threads:[~2015-02-06  2:11 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-15 11:59 [PATCH v3 00/13] mtd: st_spi_fsm: Align with ST's internal development Lee Jones
2014-12-15 11:59 ` [PATCH v3 01/13] mtd: st_spi_fsm: Extend fsm_clear_fifo to handle unwanted bytes Lee Jones
2014-12-15 11:59 ` [PATCH v3 02/13] mtd: st_spi_fsm: Obtain and use EMI clock Lee Jones
2014-12-15 11:59 ` [PATCH v3 03/13] mtd: st_spi_fsm: dt-bindings: Deprecate generic compatible string Lee Jones
2015-01-13  5:02   ` Brian Norris
2014-12-15 11:59 ` [PATCH v3 04/13] mtd: st_spi_fsm: Fetch boot device locations from DT match tables Lee Jones
2015-01-13  4:55   ` Brian Norris
2015-01-21 12:56     ` Lee Jones
2014-12-15 11:59 ` [PATCH v3 05/13] mtd: st_spi_fsm: Fix [-Wsign-compare] build warning Lee Jones
2014-12-15 11:59 ` [PATCH v3 06/13] mtd: st_spi_fsm: Add support for Micron N25Q512A Lee Jones
2014-12-15 11:59 ` [PATCH v3 07/13] mtd: st_spi_fsm: Add support for N25Q512 and N25Q00A devices Lee Jones
2014-12-15 11:59 ` [PATCH v3 08/13] mtd: st_spi_fsm: Update the JEDEC probe to handle extended READIDs Lee Jones
2015-01-13  5:07   ` Brian Norris
2015-01-21 13:02     ` Lee Jones
2015-02-06  2:11       ` Brian Norris [this message]
2015-02-10  9:04         ` Lee Jones
2015-02-24  4:44           ` Brian Norris
2015-02-24 10:14             ` Lee Jones
2014-12-15 11:59 ` [PATCH v3 09/13] mtd: st_spi_fsm: Update Spansion device entries Lee Jones
2014-12-15 11:59 ` [PATCH v3 10/13] mtd: st_spi_fsm: Improve busy wait handling Lee Jones
2014-12-15 11:59 ` [PATCH v3 11/13] mtd: st_spi_fsm: General tidy-up Lee Jones
2015-01-13  4:04   ` Brian Norris
2014-12-15 11:59 ` [PATCH v3 12/13] ARM: STi: stih416: Use new platform specific compatible string Lee Jones
2014-12-15 11:59 ` [PATCH v3 13/13] ARM: STi: stih416: Supply EMI clock reference to FSM SPI NOR Lee Jones
2015-01-13  5:14 ` [PATCH v3 00/13] mtd: st_spi_fsm: Align with ST's internal development Brian Norris
2015-01-21 12:49   ` Lee Jones
2015-02-06  1:59     ` 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=20150206021129.GB18140@ld-irv-0074 \
    --to=computersforpeace@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.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