From mboxrd@z Thu Jan 1 00:00:00 1970 From: Boris Brezillon Subject: Re: [PATCH v2 02/10] spi: Expose spi_{map,unmap}_buf() for internal use Date: Wed, 18 Apr 2018 16:20:53 +0200 Message-ID: <20180418162053.22d47152@bbrezillon> References: <20180410224439.9260-1-boris.brezillon@bootlin.com> <20180410224439.9260-3-boris.brezillon@bootlin.com> <20180416121127.GC20726@sirena.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Yogesh Gaur , Vignesh R , Kamal Dasu , Richard Weinberger , Miquel Raynal , linux-spi@vger.kernel.org, Peter Pan , Marek Vasut , Frieder Schrempf , linux-mtd@lists.infradead.org, Cyrille Pitchen , =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= , Maxime Chevallier , Sourav Poddar , Brian Norris , David Woodhouse To: Mark Brown Return-path: In-Reply-To: <20180416121127.GC20726@sirena.org.uk> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+gldm-linux-mtd-36=gmane.org@lists.infradead.org List-Id: linux-spi.vger.kernel.org Hi Mark, On Mon, 16 Apr 2018 13:11:27 +0100 Mark Brown wrote: > On Wed, Apr 11, 2018 at 12:44:31AM +0200, Boris Brezillon wrote: > > > 2/ we create a new header (drivers/spi/internals.h?) for all > > definitions that are meant for internal use (shared between spi.c > > and spi-mem.c) > > > I personally prefer #2 as it provides a better separation between spi > > and spi-mem code. > > --- > > drivers/spi/spi.c | 23 +++++------------------ > > include/linux/spi/spi.h | 26 ++++++++++++++++++++++++++ > > 2 files changed, 31 insertions(+), 18 deletions(-) > > I prefer that too (if you prefer it you should go with it so it's the > option on the table!). I hesitated for long and went for the solution I didn't like, mainly because everything is already put in a single header file so I thought you would prefer that approach. > I'd go with drivers/spi/internals.h though so > that it's even more obvious if something is being silly trying to use > it when they shouldn't. Okay, I'll move those definitions to drivers/spi/internals.h. Thanks, Boris ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.bootlin.com ([62.4.15.54]) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1f8nxK-0004Xj-52 for linux-mtd@lists.infradead.org; Wed, 18 Apr 2018 14:21:15 +0000 Date: Wed, 18 Apr 2018 16:20:53 +0200 From: Boris Brezillon To: Mark Brown Cc: David Woodhouse , Brian Norris , Marek Vasut , Richard Weinberger , Cyrille Pitchen , linux-mtd@lists.infradead.org, Miquel Raynal , linux-spi@vger.kernel.org, Peter Pan , Frieder Schrempf , Vignesh R , Yogesh Gaur , =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= , Kamal Dasu , Sourav Poddar , Maxime Chevallier Subject: Re: [PATCH v2 02/10] spi: Expose spi_{map,unmap}_buf() for internal use Message-ID: <20180418162053.22d47152@bbrezillon> In-Reply-To: <20180416121127.GC20726@sirena.org.uk> References: <20180410224439.9260-1-boris.brezillon@bootlin.com> <20180410224439.9260-3-boris.brezillon@bootlin.com> <20180416121127.GC20726@sirena.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Hi Mark, On Mon, 16 Apr 2018 13:11:27 +0100 Mark Brown wrote: > On Wed, Apr 11, 2018 at 12:44:31AM +0200, Boris Brezillon wrote: > > > 2/ we create a new header (drivers/spi/internals.h?) for all > > definitions that are meant for internal use (shared between spi.c > > and spi-mem.c) > > > I personally prefer #2 as it provides a better separation between spi > > and spi-mem code. > > --- > > drivers/spi/spi.c | 23 +++++------------------ > > include/linux/spi/spi.h | 26 ++++++++++++++++++++++++++ > > 2 files changed, 31 insertions(+), 18 deletions(-) > > I prefer that too (if you prefer it you should go with it so it's the > option on the table!). I hesitated for long and went for the solution I didn't like, mainly because everything is already put in a single header file so I thought you would prefer that approach. > I'd go with drivers/spi/internals.h though so > that it's even more obvious if something is being silly trying to use > it when they shouldn't. Okay, I'll move those definitions to drivers/spi/internals.h. Thanks, Boris