From patchwork Thu Jan 25 14:49:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 13531215 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 67F5CC47258 for ; Thu, 25 Jan 2024 16:04:56 +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=bBHhcLMI2viuI428NMk9WH0oxTTJ3jIfKGdrSzLg9M8=; b=3fy/QOTEC9Y7YH OvQtV09Tc32rzP6cgFILd1PGyuzG9mTXSvsod0eFspXnwB1gFHzruwhU9Ki2iN63VHbb7ZH7Bea9E 6oL3xiSu81gWzDs5a0BQZQOt0cMxN2xtRdV6M6MvJ6vyiXsl7M6NPyfZCVBvyIa+80NwPQtO3zrDG OKLJR7fytam++NUI8EqXygKDYf1ZXPG/MiYI09oZEgVeSzYWDuJpojsF2JZYM+5N13Ff3U9knCrTw gRl7xmy7MO22xYFuolC5DaJvny48da6XtCw5vqiAbLpMh3FKlXEdM3tquVNBWAF+JrWB5XCmQgAqp 7ZnaozXPl5Fy5B8G5H4g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rT2Dd-00000000isP-3DYl; Thu, 25 Jan 2024 16:04:45 +0000 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rT13h-00000000S1O-1dtn for linux-arm-kernel@lists.infradead.org; Thu, 25 Jan 2024 14:50:26 +0000 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-40ed252edd7so6243405e9.0 for ; Thu, 25 Jan 2024 06:50:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706194224; x=1706799024; 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=+YODKSwwosS+Boh3Md8IudPiFt2ZVlyI0co3V0SoeDA=; b=a5I8SkiBBEcmt86t+P3wfUIGH+iYO5/G8NPqvjW20NvTEwdzgr7prLEO4fOfcKqQ82 CO+Jyp7GbTDcHY3iRUADXVKARdXrPvH3HKSz/W3U9/lENV3YHiflaP0Qer8YSWNdlqc0 FXgV7tjMsNYTAwgJPE1OkpjFXYB04E38s32VwBX1zXJUyX1CjxVMsmYcmrygaYLh9BqC dNJ3UbGdds++q7y3aQgjKz7kets1/bFSCg9SqbahSS6CiYocD4cWD5vjhMKltEcdu3xh T8LGn/JmeH4l3jki4mHLAPCvJkuqlHA/okjIdvjOC8alZsXnKCuEDSkm4+FYl7S5birW aeZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706194224; x=1706799024; 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=+YODKSwwosS+Boh3Md8IudPiFt2ZVlyI0co3V0SoeDA=; b=c+z1jnnuJP6N4t9RSQWKKsjxuX0+5PlEJsC4UjCZMGhMqagB1NgnKIGLbzmuFAYG1V K7DBn50uD1YHmy2PhYWMVZ1mu7s84+uRVM1CxeOnQIGkuzdQ9U3VqAkgj6br9kRH8E9c Rf9G/8vcOmWp+YAbO3W3jT7Nx6OGXy81QGFan5rdxYDEigdxqPYpTqz+KPTwRPUAYGfU nmxlB3TaWeaNRlH1sNFPfnn1QFH6ZktF+IzppsWEVrf+nlO5RlOg5DyCJwxAuTg1k9NI Oe6BHOch1iRsrkClpuQAhjuQ7jUxVaBPf1+71EcfgjlF2g+eRFJFzhgG6RVl/dHmjjjc shkA== X-Gm-Message-State: AOJu0Yz1SCPUXV4/CEW4plpdUOWEH1jDwEFD+W2fuEl3tvdQbIXpKCn8 qC1S1P8hPJgTj36D/yRCC6aGBS/oX/DC844WW928FCUEJv6QdM30FviJR67cO3U= X-Google-Smtp-Source: AGHT+IHQibS5o6WlTuiDCwT7ZjkLtBnPKNQkGAG1I79CB9wOZ7GILO1eVGmHw8GQaGabYq+jMXwkKQ== X-Received: by 2002:a05:600c:6b03:b0:40e:6f03:45b5 with SMTP id jn3-20020a05600c6b0300b0040e6f0345b5mr390308wmb.261.1706194224044; Thu, 25 Jan 2024 06:50:24 -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 v17-20020a05600c471100b0040d91fa270fsm2875875wmo.36.2024.01.25.06.50.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 06:50:23 -0800 (PST) From: Tudor Ambarus To: broonie@kernel.org, andi.shyti@kernel.org, arnd@arndb.de Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, alim.akhtar@samsung.com, linux-spi@vger.kernel.org, linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arch@vger.kernel.org, andre.draszik@linaro.org, peter.griffin@linaro.org, semen.protsenko@linaro.org, kernel-team@android.com, willmcvicker@google.com, Tudor Ambarus Subject: [PATCH v2 15/28] spi: s3c64xx: return ETIMEDOUT for wait_for_completion_timeout() Date: Thu, 25 Jan 2024 14:49:53 +0000 Message-ID: <20240125145007.748295-16-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.429.g432eaa2c6b-goog In-Reply-To: <20240125145007.748295-1-tudor.ambarus@linaro.org> References: <20240125145007.748295-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-20240125_065025_459073_C99AA36A X-CRM114-Status: GOOD ( 11.97 ) 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 447320788697..d2dd28ff00c6 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -523,7 +523,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 @@ -544,7 +544,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; } @@ -574,7 +574,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);