Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754606AbbKQS67 (ORCPT ); Tue, 17 Nov 2015 13:58:59 -0500 Received: from mail-pa0-f50.google.com ([209.85.220.50]:34799 "EHLO mail-pa0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753648AbbKQS65 (ORCPT ); Tue, 17 Nov 2015 13:58:57 -0500 From: Joshua Clayton To: linux-arm-kernel@lists.infradead.org Cc: Mark Brown , Jonathan Corbet , Adrian Remonda , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org Subject: Re: [PATCH 1/8] Documentation/spi/spidev_test.c: use one rx buffer Date: Tue, 17 Nov 2015 10:58:54 -0800 Message-ID: <2858640.EtAPBOce2G@jclayton-pc> User-Agent: KMail/5.0.2 (Linux/4.2.0-18-generic; KDE/5.15.0; x86_64; ; ) In-Reply-To: <20151117174156.GX31303@sirena.org.uk> References: <2f17ae29e75967b4522b080c275b907622e1d353.1447773299.git.stillcompiling@gmail.com> <20151117174156.GX31303@sirena.org.uk> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1114 Lines: 24 On Tuesday, November 17, 2015 05:41:56 PM Mark Brown wrote: > On Tue, Nov 17, 2015 at 07:24:21AM -0800, Joshua Clayton wrote: > > > default_rx and rx are needlessly different. > > Use one buffer, local to transmit() > > Why? This isn't what I'd expect from black boxing the API, from a > userspace point of view the transfer is atomic and in an ideal world > we'd be able to do direct to/from memory transfers rather than memcpy() > into kernel space which means that userspace should assume the transfers > are going on simultaneously even if they don't currently. The important thing here was to get rid of the default_rx buffer. I just noticed that the output can be set up completely within the scope of the transmit function, since the operands are global. But I would be just as happy to set it up at the top level. I'll change this in V2 -- ~Joshua Clayton -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/