public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Andi Shyti <andi.shyti@samsung.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>,
	linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org,
	Andi Shyti <andi@etezian.org>
Subject: Re: [PATCH] spi: add spi_sync_single_transfer wrapper for single spi_transfer
Date: Fri, 17 Jun 2016 12:34:53 +0100	[thread overview]
Message-ID: <20160617113453.GG26099@sirena.org.uk> (raw)
In-Reply-To: <20160617004311.GA911@samsunx.samsung>

[-- Attachment #1: Type: text/plain, Size: 761 bytes --]

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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

  reply	other threads:[~2016-06-17 11:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-15 23:40 [PATCH] spi: add spi_sync_single_transfer wrapper for single spi_transfer Andi Shyti
2016-06-16 16:10 ` Lars-Peter Clausen
2016-06-17  0:43   ` Andi Shyti
2016-06-17 11:34     ` Mark Brown [this message]
2016-06-17 11:38       ` Andi Shyti

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160617113453.GG26099@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=andi.shyti@samsung.com \
    --cc=andi@etezian.org \
    --cc=lars@metafoo.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox