From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 70341C433EF for ; Fri, 17 Dec 2021 11:05:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235122AbhLQLFd (ORCPT ); Fri, 17 Dec 2021 06:05:33 -0500 Received: from mga11.intel.com ([192.55.52.93]:16181 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234890AbhLQLFc (ORCPT ); Fri, 17 Dec 2021 06:05:32 -0500 X-IronPort-AV: E=McAfee;i="6200,9189,10200"; a="237272476" X-IronPort-AV: E=Sophos;i="5.88,213,1635231600"; d="scan'208";a="237272476" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Dec 2021 03:05:32 -0800 X-IronPort-AV: E=Sophos;i="5.88,213,1635231600"; d="scan'208";a="612088757" Received: from lahna.fi.intel.com (HELO lahna) ([10.237.72.163]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Dec 2021 03:05:27 -0800 Received: by lahna (sSMTP sendmail emulation); Fri, 17 Dec 2021 13:05:25 +0200 Date: Fri, 17 Dec 2021 13:05:25 +0200 From: Mika Westerberg To: Boris Brezillon Cc: Tudor Ambarus , Mark Brown , Lee Jones , Michael Walle , Pratyush Yadav , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Jonathan Corbet , Mauro Lima , Alexander Sverdlin , Andy Shevchenko , Hans-Gert Dahmen , 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 Message-ID: References: <20211118130543.11179-1-mika.westerberg@linux.intel.com> <20211118130543.11179-3-mika.westerberg@linux.intel.com> <20211216115100.448351e4@collabora.com> <20211216174347.69cf611c@collabora.com> <20211217115206.33da307c@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211217115206.33da307c@collabora.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org On Fri, Dec 17, 2021 at 11:52:06AM +0100, Boris Brezillon wrote: > On Fri, 17 Dec 2021 12:38:46 +0200 > Mika Westerberg 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 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.