linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Biju Das <biju.das.jz@bp.renesas.com>
To: Michael Walle <michael@walle.cc>,
	"tudor.ambarus@microchip.com" <tudor.ambarus@microchip.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
	"miquel.raynal@bootlin.com" <miquel.raynal@bootlin.com>,
	"p.yadav@ti.com" <p.yadav@ti.com>,
	"richard@nod.at" <richard@nod.at>,
	"vigneshr@ti.com" <vigneshr@ti.com>
Subject: RE: [PATCH 5/6] mtd: spi-nor: add generic flash driver
Date: Fri, 28 Oct 2022 18:00:05 +0000	[thread overview]
Message-ID: <OS0PR01MB59224F74DF4E981D536271A886329@OS0PR01MB5922.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <OS0PR01MB5922F173C180E49273BEECB186919@OS0PR01MB5922.jpnprd01.prod.outlook.com>

Hi All,

Any update on [1]?. As per [2], we need to use generic flash driver as our flash chip
supports sfdp. Anything to be improved on [1]?? Please let us know.

[1] https://lore.kernel.org/lkml/20220810220654.1297699-1-michael@walle.cc/T/#m3ce890b65360f9fbe17b813d692f848b5c6d78e7
[2] https://patchwork.kernel.org/project/linux-renesas-soc/patch/20220715105716.2415068-3-biju.das.jz@bp.renesas.com/

Cheers,
Biju

> Subject: RE: [PATCH 5/6] mtd: spi-nor: add generic flash driver
> 
> Hi Michael Walle,
> 
> > Subject: Re: [PATCH 5/6] mtd: spi-nor: add generic flash driver
> >
> > Hi,
> >
> > >> +
> > >> +	/* Fallback to a generic flash described only by its SFDP
> data. */
> > >> +	if (!info) {
> > >> +		ret = spi_nor_check_sfdp_signature(nor);
> > >> +		if (!ret)
> > >> +			info = &spi_nor_generic_flash;
> > >> +	}
> > >
> > > May be this can be combined as
> > >
> > >  	if (!info && (!spi_nor_check_sfdp_signature(nor)))
> > > 		info = &spi_nor_generic_flash;
> >
> > While this is the behavior, I don't like (1) calling functions in
> the
> > condition and (2) rely on the && and || semantics, i.e.
> > to just call the second part if the first is true/false.
> 
> OK fine. I recently got a review comment from mainline for optimizing
> the number of lines. That is the reason for suggestion.
> 
> Cheers,
> biju

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

  reply	other threads:[~2022-10-28 18:00 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-13 13:35 [PATCH 0/6] mtd: spi-nor: generic flash driver Michael Walle
2022-05-13 13:35 ` [PATCH 1/6] mtd: spi-nor: hide jedec_id sysfs attribute if not present Michael Walle
2022-07-26 10:00   ` Takahiro Kuwano
2022-05-13 13:35 ` [PATCH 2/6] mtd: spi-nor: sysfs: hide manufacturer if it is not set Michael Walle
2022-07-26 10:04   ` Takahiro Kuwano
2022-05-13 13:35 ` [PATCH 3/6] mtd: spi-nor: remember full JEDEC flash ID Michael Walle
2022-07-29  1:00   ` Takahiro Kuwano
2022-05-13 13:35 ` [PATCH 4/6] mtd: spi-nor: move function declaration out of sfdp.h Michael Walle
2022-07-26 23:41   ` Takahiro Kuwano
2022-05-13 13:35 ` [PATCH 5/6] mtd: spi-nor: add generic flash driver Michael Walle
2022-05-13 14:47   ` kernel test robot
2022-07-21  9:32     ` Biju Das
2022-07-21  9:48     ` Michael Walle
2022-07-21  9:52       ` Biju Das
2022-10-28 18:00         ` Biju Das [this message]
2022-07-28  3:28   ` Tudor.Ambarus
2022-07-29  1:40   ` Takahiro Kuwano
2022-05-13 13:35 ` [PATCH 6/6] mtd: spi-nor: sysfs: print JEDEC ID for " Michael Walle
2022-07-29  1:25   ` Takahiro Kuwano
2022-07-26  8:06 ` [PATCH 0/6] mtd: spi-nor: " Tudor.Ambarus
2022-07-29  1:52   ` Takahiro Kuwano
2022-07-29  5:34     ` Tudor.Ambarus

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=OS0PR01MB59224F74DF4E981D536271A886329@OS0PR01MB5922.jpnprd01.prod.outlook.com \
    --to=biju.das.jz@bp.renesas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=michael@walle.cc \
    --cc=miquel.raynal@bootlin.com \
    --cc=p.yadav@ti.com \
    --cc=richard@nod.at \
    --cc=tudor.ambarus@microchip.com \
    --cc=vigneshr@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;
as well as URLs for NNTP newsgroup(s).