[PATCH v4 2/3] mtd: spi-nor: intel-spi: Convert to SPI MEM

Boris Brezillon boris.brezillon at collabora.com
Fri Dec 17 02:52:06 PST 2021


On Fri, 17 Dec 2021 12:38:46 +0200
Mika Westerberg <mika.westerberg at 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 at 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.



More information about the linux-mtd mailing list