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

Mika Westerberg mika.westerberg at linux.intel.com
Fri Dec 17 03:05:25 PST 2021


On Fri, Dec 17, 2021 at 11:52:06AM +0100, Boris Brezillon wrote:
> 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>

Thanks!

> 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.

Okay.



More information about the linux-mtd mailing list