Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1424968

Re: [PATCH] spi: add spi_sync_single_transfer wrapper for single spi_transfer

From Andi Shyti <andi@etezian.org>
Newsgroups linux.kernel
Subject Re: [PATCH] spi: add spi_sync_single_transfer wrapper for single spi_transfer
Date 2016-06-17 13:50 +0200
Message-ID <rL0rE-60E-13@gated-at.bofh.it> (permalink)
References <rKsJj-HV-1@gated-at.bofh.it> <rKQ8W-7Ix-27@gated-at.bofh.it> <rKIbn-28U-3@gated-at.bofh.it> <rKQ8V-7Ix-25@gated-at.bofh.it> <rL0hX-5Wp-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Jun 17, 2016 at 12:34:53PM +0100, Mark Brown wrote:
> On Fri, Jun 17, 2016 at 09:43:11AM +0900, Andi Shyti wrote:
> 
> > > > The spi_sync_single_transfer function calls spi_sync_transfer
> > > > with a single spi_transfer element, instead of an array.
> 
> > > So, what's the advantage of using this as opposed to calling
> > > spi_sync_transfer with a 1 for the number of transfers?
> 
> > Not much, but it keeps the code a bit nicer to read for those
> > using spi_sync_transfer with only one spi_transfer. Besides it's
> > also more understandable what the function itself does and there
> > would not be any need to jump into the spi_sync_transfer to check
> > what the number '1' is needed for (for example it's not a boolean 
> > 'true' value).
> 
> I really don't think this has been a big source of confusion for people.

OK, nevermind, then :)

Thanks,
Andi

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] spi: add spi_sync_single_transfer wrapper for single  spi_transfer Andi Shyti <andi.shyti@samsung.com> - 2016-06-16 01:50 +0200
  Re: [PATCH] spi: add spi_sync_single_transfer wrapper for single  spi_transfer Lars-Peter Clausen <lars@metafoo.de> - 2016-06-16 18:20 +0200
    Re: [PATCH] spi: add spi_sync_single_transfer wrapper for single  spi_transfer Andi Shyti <andi.shyti@samsung.com> - 2016-06-17 02:50 +0200
      Re: [PATCH] spi: add spi_sync_single_transfer wrapper for single  spi_transfer Mark Brown <broonie@kernel.org> - 2016-06-17 13:40 +0200
        Re: [PATCH] spi: add spi_sync_single_transfer wrapper for single  spi_transfer Andi Shyti <andi@etezian.org> - 2016-06-17 13:50 +0200

csiph-web