All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@collabora.com>
To: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Tudor Ambarus <tudor.ambarus@microchip.com>,
	Mark Brown <broonie@kernel.org>, Lee Jones <lee.jones@linaro.org>,
	Michael Walle <michael@walle.cc>, Pratyush Yadav <p.yadav@ti.com>,
	Miquel Raynal <miquel.raynal@bootlin.com>,
	Richard Weinberger <richard@nod.at>,
	Vignesh Raghavendra <vigneshr@ti.com>,
	Jonathan Corbet <corbet@lwn.net>,
	Mauro Lima <mauro.lima@eclypsium.com>,
	Alexander Sverdlin <alexander.sverdlin@nokia.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Hans-Gert Dahmen <hans-gert.dahmen@immu.ne>,
	linux-mtd@lists.infradead.org, linux-spi@vger.kernel.org
Subject: Re: [PATCH v4 2/3] mtd: spi-nor: intel-spi: Convert to SPI MEM
Date: Fri, 17 Dec 2021 11:52:06 +0100	[thread overview]
Message-ID: <20211217115206.33da307c@collabora.com> (raw)
In-Reply-To: <Ybxotgb927kpCizL@lahna>

On Fri, 17 Dec 2021 12:38:46 +0200
Mika Westerberg <mika.westerberg@linux.intel.com> wrote:

> Hi,
> 
> On Thu, Dec 16, 2021 at 05:43:47PM +0100, Boris Brezillon wrote:
> > Why no just
> > 
> > 	if (iop->mem_op.addr.nbytes != op->addr.nbytes ||
> > 	    iop->mem_op.addr.dtr != op->addr.dtr)
> > 		return false;
> > 
> > then?  
> 
> That would be too simple ;-)
> 
> I'll do this change in v5.

I didn't review the driver thoroughly, but it looks clean an tidy. Feel
free to add

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>

One more thing. I think it'd be good to implement the dirmap hooks (in
a follow-up series, not here), so you don't have to iterate over the ops
table every time a read/write request is issued. Should be as simple as
storing the exec_op() pointer in the driver-private dirmap pointer, and
calling this function when ->dirmap_{read,write}() is called.

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

WARNING: multiple messages have this Message-ID (diff)
From: Boris Brezillon <boris.brezillon@collabora.com>
To: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Tudor Ambarus <tudor.ambarus@microchip.com>,
	Mark Brown <broonie@kernel.org>, Lee Jones <lee.jones@linaro.org>,
	Michael Walle <michael@walle.cc>, Pratyush Yadav <p.yadav@ti.com>,
	Miquel Raynal <miquel.raynal@bootlin.com>,
	Richard Weinberger <richard@nod.at>,
	Vignesh Raghavendra <vigneshr@ti.com>,
	Jonathan Corbet <corbet@lwn.net>,
	Mauro Lima <mauro.lima@eclypsium.com>,
	Alexander Sverdlin <alexander.sverdlin@nokia.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Hans-Gert Dahmen <hans-gert.dahmen@immu.ne>,
	linux-mtd@lists.infradead.org, linux-spi@vger.kernel.org
Subject: Re: [PATCH v4 2/3] mtd: spi-nor: intel-spi: Convert to SPI MEM
Date: Fri, 17 Dec 2021 11:52:06 +0100	[thread overview]
Message-ID: <20211217115206.33da307c@collabora.com> (raw)
In-Reply-To: <Ybxotgb927kpCizL@lahna>

On Fri, 17 Dec 2021 12:38:46 +0200
Mika Westerberg <mika.westerberg@linux.intel.com> wrote:

> Hi,
> 
> On Thu, Dec 16, 2021 at 05:43:47PM +0100, Boris Brezillon wrote:
> > Why no just
> > 
> > 	if (iop->mem_op.addr.nbytes != op->addr.nbytes ||
> > 	    iop->mem_op.addr.dtr != op->addr.dtr)
> > 		return false;
> > 
> > then?  
> 
> That would be too simple ;-)
> 
> I'll do this change in v5.

I didn't review the driver thoroughly, but it looks clean an tidy. Feel
free to add

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>

One more thing. I think it'd be good to implement the dirmap hooks (in
a follow-up series, not here), so you don't have to iterate over the ops
table every time a read/write request is issued. Should be as simple as
storing the exec_op() pointer in the driver-private dirmap pointer, and
calling this function when ->dirmap_{read,write}() is called.

  reply	other threads:[~2021-12-17 10:53 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-18 13:05 [PATCH v4 0/3] mtd: spi-nor / spi / MFD: Convert intel-spi to SPI MEM Mika Westerberg
2021-11-18 13:05 ` Mika Westerberg
2021-11-18 13:05 ` [PATCH v4 1/3] mtd: spi-nor: intel-spi: Disable write protection only if asked Mika Westerberg
2021-11-18 13:05   ` Mika Westerberg
2021-11-18 13:05 ` [PATCH v4 2/3] mtd: spi-nor: intel-spi: Convert to SPI MEM Mika Westerberg
2021-11-18 13:05   ` Mika Westerberg
2021-12-16 10:51   ` Boris Brezillon
2021-12-16 10:51     ` Boris Brezillon
2021-12-16 16:22     ` Mika Westerberg
2021-12-16 16:22       ` Mika Westerberg
2021-12-16 16:43       ` Boris Brezillon
2021-12-16 16:43         ` Boris Brezillon
2021-12-17 10:38         ` Mika Westerberg
2021-12-17 10:38           ` Mika Westerberg
2021-12-17 10:52           ` Boris Brezillon [this message]
2021-12-17 10:52             ` Boris Brezillon
2021-12-17 11:05             ` Mika Westerberg
2021-12-17 11:05               ` Mika Westerberg
2021-11-18 13:05 ` [PATCH v4 3/3] Documentation / MTD: Rename the intel-spi driver Mika Westerberg
2021-11-18 13:05   ` Mika Westerberg
2021-12-16 10:39 ` [PATCH v4 0/3] mtd: spi-nor / spi / MFD: Convert intel-spi to SPI MEM Mika Westerberg
2021-12-16 10:39   ` Mika Westerberg

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=20211217115206.33da307c@collabora.com \
    --to=boris.brezillon@collabora.com \
    --cc=alexander.sverdlin@nokia.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=broonie@kernel.org \
    --cc=corbet@lwn.net \
    --cc=hans-gert.dahmen@immu.ne \
    --cc=lee.jones@linaro.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=mauro.lima@eclypsium.com \
    --cc=michael@walle.cc \
    --cc=mika.westerberg@linux.intel.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.