From patchwork Fri Jan 26 17:15:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 13532912 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 38E75C47DDB for ; Fri, 26 Jan 2024 17:17:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=HSL5LVDpSLyXsLqCXUItZd2DLs+6EJ9xsvaoJCj1GlU=; b=eLUteLV6EgViPU zmov+57nYAMQIdUAhjEVNbQAYNztabJSkNWoE0pN4q1tFBSkg7zF71WVyq0jqA1m7dmIcwFmtN3N2 nlyavODOf+iekKt5kTvlyclCx7//LnxC6L2AFF0l3WWG1RqunDPyJ5pf6M84Rc4IYoipj85fnYP6x NWZNmDDIr75/kVv06cqQuIeGTVUmj4GzggGRxigduGa89Gp2KoUHh1KyLMmg+Ah71oNFrw5EtOo7l 8cTiIgBgMFMJ2dotfwf/0tSYKStw/7GdgHKievmY4idjNoo9cIJjvuNr6pJlkWLbcsAEJig4oYU9y F2iT4nyHDbpmy+zeUH2Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTPpg-00000004qTy-0eR0; Fri, 26 Jan 2024 17:17:36 +0000 Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTPoG-00000004pWR-1D8A for linux-arm-kernel@lists.infradead.org; Fri, 26 Jan 2024 17:16:12 +0000 Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-50f11e3ba3aso1074660e87.1 for ; Fri, 26 Jan 2024 09:16:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706289363; x=1706894163; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ndYor9VIkq6f4pBg/Nd55Aw4wNpXBPkalwBZbSLcCVs=; b=vBEL3xUw1wrSiKS82pYThRUDHuBR+PPfIJAPxQK2pF7r+IsyK16XGs1PwJMyAe7SHW wrPo59x9DzA9OjN7fAEYerHtA8LhKNJB+mjjoC4iBUr7xEnyrJVbymmWUIQ0BBPKoAXM T/ikwf39kLYwXWecoz3RKsrWr2XmafzHMkiq6xyMrhO4Tx4UrE+dCDQ0vzDwrRncbiQU WZhMlsvXyQE6ETpy2mtjJO/4tR+w7J7ZQ+KRKhFa179UB1lCuKhEgv9zPGsi3M9DBfGL zT0eq3sDmuq9XGDRyNB+yDbuFE9sMzwWwnU4vQj6MwzEHN1pb9Tewb9qa0F94vdcArvR 755A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706289363; x=1706894163; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ndYor9VIkq6f4pBg/Nd55Aw4wNpXBPkalwBZbSLcCVs=; b=FQlspB2YUY5pIQhm51UyJXltUlxd1FIfjE0zdsRduWx+foi4TrMRo0fsNljIiJLDWy oyHPwnq/Io3Nx5OQsyzIBR2rGUl5nmd0E/oMlA5La4k+JMq+D4D+LYdfJA50DGeRbhBJ j+JCP0BXUJXnbICin+QwM6OurVVE7ix4nH+HuPpqtOycqGEs4Dvu7maaU/DI7CI82Tjy Sxe7jlo1GPjac3dQy/uBqBH63ixHEy/JD0sDvrEfSPX/6TP0MGJ482OgzlB7URlw8SCG joDDRd9JzsfmoYqluphDio/ilhMX4taF1L+tD6b6D51Zk41trywL412Ntc002WjxcHs8 c3mw== X-Gm-Message-State: AOJu0YwFFidjY3E58oIp6G/AeD9hkjYQTH3pobnF/7MW/7Qq4wLxTeDd rsigcVKKJDV83k9ePbwkO3P7F3XEjgHKAmUIuIVJ+3hHGE2tZzzFuflylnJxdfA= X-Google-Smtp-Source: AGHT+IFEtRaaitooDido15ekLBkacrVyqkBTdRgKQbRruG3+KRsCCYWnu1LvbW+f3Xs1EHiodmYnYw== X-Received: by 2002:ac2:5a11:0:b0:510:272c:d011 with SMTP id q17-20020ac25a11000000b00510272cd011mr187130lfn.69.1706289363696; Fri, 26 Jan 2024 09:16:03 -0800 (PST) Received: from ta2.c.googlers.com.com (88.140.78.34.bc.googleusercontent.com. [34.78.140.88]) by smtp.gmail.com with ESMTPSA id k10-20020a05600c1c8a00b0040e451fd602sm6287286wms.33.2024.01.26.09.16.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 09:16:02 -0800 (PST) From: Tudor Ambarus To: broonie@kernel.org, andi.shyti@kernel.org, semen.protsenko@linaro.org Cc: krzysztof.kozlowski@linaro.org, alim.akhtar@samsung.com, jassi.brar@samsung.com, linux-spi@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, andre.draszik@linaro.org, peter.griffin@linaro.org, kernel-team@android.com, willmcvicker@google.com, Tudor Ambarus Subject: [PATCH v3 12/17] spi: s3c64xx: return ETIMEDOUT for wait_for_completion_timeout() Date: Fri, 26 Jan 2024 17:15:40 +0000 Message-ID: <20240126171546.1233172-13-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.429.g432eaa2c6b-goog In-Reply-To: <20240126171546.1233172-1-tudor.ambarus@linaro.org> References: <20240126171546.1233172-1-tudor.ambarus@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240126_091608_881206_492E84EA X-CRM114-Status: GOOD ( 11.53 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org ETIMEDOUT is more specific than EIO, use it for wait_for_completion_timeout(). Signed-off-by: Tudor Ambarus Reviewed-by: Sam Protsenko --- 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);