From patchwork Tue Jan 23 15:34:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 13527636 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 B811AC47258 for ; Tue, 23 Jan 2024 15:35:50 +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=uTGWAXTTnyqjjsk9wU7Z7pLm06Io9Vo3LzQi92aD48Q=; b=QzLf1gRuQFBF7m srDTckayAd3Zo3zLCyxVI1mjo7AJ9ROR/oaXgXWnyftWVfQWHkSqlMGuC+9zQJuwiYYOFuEBrr8kp 62fXIskJv/AlqhXSY5RAp8vUUrsMDYgLvcOkN8ZsDcwjNAHLRxyi1PGr2cZyTv4KcjqgwiJalm455 PbNYs9WQyaffj2vflI/5tXR3N2Z3DCN4H0Ni1uFk2F/cGhfDIry8Obq/EMCDtDALGlQmJT62M7ZNf puODTQcgO17NMzcY1TQl/1JpVCk3EVc3iHOzkqbFXOICyOIIx+SUGY7V5h4KOOsziUcl04q0n3SJj 6ud2aX8qLz3FEx/nB5Nw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rSIo2-00H3uK-01; Tue, 23 Jan 2024 15:35:18 +0000 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rSInR-00H3Q1-2y for linux-arm-kernel@lists.infradead.org; Tue, 23 Jan 2024 15:34:43 +0000 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-40ea5653f6bso41148335e9.3 for ; Tue, 23 Jan 2024 07:34:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706024078; x=1706628878; 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=BDcK5S8n/PLxtzPm44TTZV7bPj0wDFTndTNX2CSFLe8=; b=X0qYqQrq0TVPzpefol3hbY8YsCj2M1hhFJVKrkipVNSZur/wh3VH3MoI0GIwMhGcPU 17KRAaCQDq43EtTJ/axpFQHP5MjG8oF27O6RJBi4o9tWFhriIB5YRWglyX2rLOUmIOuK QFUhTpxCFIoSDajCcwslAzZ9i+3CJrVF2T1iABZexF+hLAa7175i8zH3LPvZlbIPFIDm //7mvmTb5bXL5S89giq8Vb+GHYkQDC0J92CKdqsiBB+/K9DLi/mRy6EfUT65pfOTaSPK BtRZqA8WU00ykfJy2PxRewbIKXKAieEzSpf9sGQQdWd7lUwS4aM/6iUJv31rB6fxEHcH OQlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706024078; x=1706628878; 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=BDcK5S8n/PLxtzPm44TTZV7bPj0wDFTndTNX2CSFLe8=; b=e9XhwglclZsbFf1HmFdkUjo6u+9o/Le7qWFRxxrdHFw812f5OvejKHu3m4oflT+PCQ OMwaRQOzOMK6t1IOm4p+7VOusrtmY74h7iQp1T5CB5RIGIlwIHsIMNJbGdbhEKjFJNd0 Z2FeNapqcgyueqzc4RvVYxUlzJYO9wom1BaCrs7if/8WlrvEANjJaY3jN4x0BrtjpAdO ivV6OoloBiQItKoqvzJmWHOx/g/CYQyfIYF5j/TAxLWrHW3NERzhUEP593RoI20Z6uvE XspB4vzh/b/i5LuLABhLYi9VIbweULk3ZpdUyE+zeZtOw3BjigOOxDOxMf90K2OCsgOo Sqaw== X-Gm-Message-State: AOJu0YyS4wPpqyKgKmh9UPxCXJRLxlMmt1CPunxSzAZ3JROPgo/Mx9kc T1S3GMg5Jz+JtLUrPkJGecigufZqApBLtTfj8Cv2ceUpXKngdJuZ1v7ZTgjFGFg= X-Google-Smtp-Source: AGHT+IEaPKuKYQ2O6yA2vkn4qNMcqnTA/hNm86+45dMXVIcjSmoweGA6oIQ5FlKxetXppti+/C/LhA== X-Received: by 2002:a05:600c:3ca9:b0:40e:88d7:3dd1 with SMTP id bg41-20020a05600c3ca900b0040e88d73dd1mr250569wmb.37.1706024078284; Tue, 23 Jan 2024 07:34:38 -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 p21-20020a05600c359500b0040e3488f16dsm42457536wmq.12.2024.01.23.07.34.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 07:34:37 -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 14/21] spi: s3c64xx: return ETIMEDOUT for wait_for_completion_timeout() Date: Tue, 23 Jan 2024 15:34:13 +0000 Message-ID: <20240123153421.715951-15-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.429.g432eaa2c6b-goog In-Reply-To: <20240123153421.715951-1-tudor.ambarus@linaro.org> References: <20240123153421.715951-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-20240123_073441_973701_124179BD X-CRM114-Status: GOOD ( 12.06 ) 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 --- drivers/spi/spi-s3c64xx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index 8897b5895cde..fd0e62ff8968 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -520,7 +520,7 @@ static int s3c64xx_wait_for_dma(struct s3c64xx_spi_driver_data *sdd, val = msecs_to_jiffies(ms) + 10; val = wait_for_completion_timeout(&sdd->xfer_completion, val); if (!val) - return -EIO; + return -ETIMEDOUT; /* * If the previous xfer was completed within timeout proceed further. * DmaTx returns after simply writing data in the FIFO, @@ -568,7 +568,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);