Re: [PATCH 1/1] spi: Re-do correctly function name and 'ret' return value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Geert-san

Thanks for your comments,

On 2015年04月24日 16:25, Geert Uytterhoeven wrote:
Hi Hiep-san,

On Fri, Apr 24, 2015 at 8:40 AM, Cao Minh Hiep <cm-hiep@xxxxxxxxxxx> wrote:
From: Hiep Cao Minh <cm-hiep@xxxxxxxxxxx>

qspi_trigger_transfer_out_int function should be qspi_trigger_transfer_out_in
without "t". "ret" value in rspi_dma_check_then_transfer should be returned
insteeds of returning zero. It just returns qspi_trigger_transfer_out_in() value
in qspi_transfer_out_in().
Thanks for your patch!

I guess Mark will want you to split this in 3 separate patches, as it does 3
different things...
Thanks, I will split this patch in 3 separate patches.
Signed-off-by: Hiep Cao Minh <cm-hiep@xxxxxxxxxxx>
---
  drivers/spi/spi-rspi.c | 10 +++-------
  1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
index 186924a..9304a6d 100644
--- a/drivers/spi/spi-rspi.c
+++ b/drivers/spi/spi-rspi.c
@@ -670,7 +670,7 @@ static int rspi_dma_check_then_transfer(struct rspi_data *rspi,
                 int ret = rspi_dma_transfer(rspi, &xfer->tx_sg,
                                         xfer->rx_buf ? &xfer->rx_sg : NULL);
                 if (ret != -EAGAIN)
-                       return 0;
+                       return ret;
         }

         return -EAGAIN;
Upon closer look, you can just drop the "if" check, and return "ret"
unconditionally. Or better, drop "ret", and just use

         return rspi_dma_transfer(...);
Thanks, I will do it as you pointed out.


Hiep.

--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux