public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/3] MX28: SPI: Refactor spi_xfer a bit
Date: Mon, 9 Jul 2012 12:13:54 +0200	[thread overview]
Message-ID: <201207091213.54882.marex@denx.de> (raw)
In-Reply-To: <4FFAA64F.4010203@denx.de>

Dear Stefano Babic,

> On 09/07/2012 03:33, Marek Vasut wrote:
> > This makes it easier to adapt for addition of DMA support.
> > 
> > Signed-off-by: Marek Vasut <marex@denx.de>
> > Cc: Fabio Estevam <festevam@freescale.com>
> > Cc: Otavio Salvador <otavio@ossystems.com.br>
> > Cc: Stefano Babic <sbabic@denx.de>
> > Cc: Wolfgang Denk <wd@denx.de>
> > ---

[...]

> You do not need this if-then-else chain. I think is more readable with :

I think you're right ;-)

> 	if (din && dout) {
> 		/* Half-duplex only */
> 		return -EINVAL;
> 	}
> 	if (!din && !dout) {
> 		/* No data */
>   		return 0;
> 	}
> 
> 
> Best regards,
> Stefano Babic

Best regards,
Marek Vasut

      reply	other threads:[~2012-07-09 10:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-09  1:33 [U-Boot] [PATCH 1/3] MX28: SPI: Refactor spi_xfer a bit Marek Vasut
2012-07-09  1:33 ` [U-Boot] [PATCH 2/3] MX28: SPI: Pull out the PIO transfer function Marek Vasut
2012-07-09  1:33 ` [U-Boot] [PATCH 3/3] MX28: SPI: Add DMA transfer support Marek Vasut
2012-07-09  9:37 ` [U-Boot] [PATCH 1/3] MX28: SPI: Refactor spi_xfer a bit Stefano Babic
2012-07-09 10:13   ` Marek Vasut [this message]

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=201207091213.54882.marex@denx.de \
    --to=marex@denx.de \
    --cc=u-boot@lists.denx.de \
    /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