Thread (30 messages) 30 messages, 3 authors, 2024-01-29

Re: [PATCH v3 12/17] spi: s3c64xx: return ETIMEDOUT for wait_for_completion_timeout()

From: Sam Protsenko <semen.protsenko@linaro.org>
Date: 2024-01-26 20:14:06
Also in: linux-samsung-soc, linux-spi, lkml

On Fri, Jan 26, 2024 at 11:16 AM Tudor Ambarus [off-list ref] wrote:
ETIMEDOUT is more specific than EIO, use it for
wait_for_completion_timeout().

Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
---
Looks like you missed my R-b tag I added to this patch in your
previous submission.
quoted hunk ↗ jump to hunk
 drivers/spi/spi-s3c64xx.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
index 76fa378ab5ab..2f2c4ad35df4 100644
--- a/drivers/spi/spi-s3c64xx.c
+++ b/drivers/spi/spi-s3c64xx.c
@@ -526,7 +526,7 @@ static int s3c64xx_wait_for_dma(struct s3c64xx_spi_driver_data *sdd,

        /*
         * If the previous xfer was completed within timeout, then
-        * proceed further else return -EIO.
+        * proceed further else return -ETIMEDOUT.
         * DmaTx returns after simply writing data in the FIFO,
         * w/o waiting for real transmission on the bus to finish.
         * DmaRx returns only after Dma read data from FIFO which
@@ -547,7 +547,7 @@ static int s3c64xx_wait_for_dma(struct s3c64xx_spi_driver_data *sdd,

        /* If timed out while checking rx/tx status return error */
        if (!val)
-               return -EIO;
+               return -ETIMEDOUT;

        return 0;
 }
@@ -577,7 +577,7 @@ static int s3c64xx_wait_for_pio(struct s3c64xx_spi_driver_data *sdd,
        if (use_irq) {
                val = msecs_to_jiffies(ms);
                if (!wait_for_completion_timeout(&sdd->xfer_completion, val))
-                       return -EIO;
+                       return -ETIMEDOUT;
        }

        val = msecs_to_loops(ms);
--
2.43.0.429.g432eaa2c6b-goog
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help