From patchwork Wed Feb 7 12:04:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 13548393 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 6A084C4828D for ; Wed, 7 Feb 2024 12:05:34 +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=rj4mES35XJKXuPC5ltpFL8TZFLgi9IrU+yU2Vjmld8E=; b=ndm1CSi4dzp+FC l+MBYDNlOH4fJlQci/QV323+SVVo2a60lyOstngFHs1xO4izkS0a9lEzw048XoWDWee8/KY0mhVV/ oO1WgqzVsxW73rhgrCwIuLFlBQd8WhjFbDEnBnxYfNRN+4VguIvni3qCDHWLKwoRUkyd0L2NsXyJv AreFKkOuaNRhxHcYprJwNmd+q62mbLAxJ3Zg4xXbuETjksDsnxNcE8LZ2qLC1Cy5rCaPSsAei4Gkp HFGrS783sn+xFb/DWSUGZKq5kB//RkXLA2fxgUoezt+0CAL+Te3lOt0heG/7C8KLrffuWtQ20Av5Z YVAODiRmqE5lAKa5Tb7Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rXgg5-0000000AZeV-3NJh; Wed, 07 Feb 2024 12:05:21 +0000 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rXgfc-0000000AZG3-2anR for linux-arm-kernel@lists.infradead.org; Wed, 07 Feb 2024 12:04:54 +0000 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-337cc8e72f5so414932f8f.1 for ; Wed, 07 Feb 2024 04:04:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707307491; x=1707912291; 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=lw2MVCnXePoaGoFwhILfXnUXamqqjuyMAhC06ZDA+Mc=; b=I4BLandRbUt1G/C4SMLcwvqkbsQwUpiJgmscHaEGKj8pu4wIqz2zl3vQOrfP9b+UcJ d6XoUsvgCqPYZ1B01I4B4xrCHJDvzqTCm1YfK+/5iWd05IQrCPg/d4k6Vv471eYRNhf8 FgvVcbPjlRIUwdiE9hhqcBQlCKRwyHfdM1gHInOMciPymIU0Anv0WK4IOLJN+f3kqoi1 0T0tONx7FnQJS6BSh0yJDp0+1HQlZ2AXsw23pTH66pt6AinorxMPJB/mJyDvK3HB4zCT rv8SOqK9QJTp5SPYEaES51wzdTwsX9YNHnA71KjHqrJjxTcXY9bozy+tI0Ha91XkhIpL XAGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707307491; x=1707912291; 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=lw2MVCnXePoaGoFwhILfXnUXamqqjuyMAhC06ZDA+Mc=; b=kzUvAYC2kP/gvV+9BlLiy1snvNFGvajXWWUisx1tW/wV25aYW/Icm8i7Stn5t2DM3k esvOoCR5Sjtt0tnL+vv90AptMhcTc93kRK9k6o7gsKYnfC6bftZ5mGa5HepfTzp0Ko/F qoShBWUT/MVCbgddFP00CWBmr2/wISgN7uBoIW+8fjBwLgpenvCihzLwD/0YE2MywK/F WikucNPt0948NY3HBWhWYVDQWk5lFUL796y33ZAQvPSbMqxF1ha3Ih0DS8PfUaFPP5Gp uDFsheAZCfe0PQhZZ8OFjqEevM/mj4DkNAw+8L/va2MpWnj5agFV5I5InMBzNEuDbN3g MddA== X-Gm-Message-State: AOJu0YzAS2TnhM3bPU8OyUwGUXUNCfURFvCGmBDbjFTOATkXy5PB1cgQ 3aYS5wBEK9w8P92C6TXrS4AXZmlbycEndbwVL3HhuF00F+uwcW4F9ukOA+XS8eE= X-Google-Smtp-Source: AGHT+IHAYlMgGVbJm1ulTdNKa/+d0RgWGvnEGEpkGS2NLVlo4ZSIijWb3cfglDfGFwxik/TiWE7lGQ== X-Received: by 2002:adf:9b88:0:b0:33b:216d:70bc with SMTP id d8-20020adf9b88000000b0033b216d70bcmr3033646wrc.42.1707307490826; Wed, 07 Feb 2024 04:04:50 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCUAVMzVycVD1s6muTwkHOso64lMG/emDU5TiblalPWX7ZMHPJ5//3sDLDgEuNNZ2aejKW5KK9QN7rDbCTgQ2Wj/UBuVCg2IXUOVzlU5gB6mNN1onRg/Jsmvj9MNWKST7hrSIBv2qCpxV4AxqG6CDKNAZqjBq3PsymshtpNimVbZJPX4GC7xX/WWsSaTzZknsKwN1XOo5G8bnWTdaVmBfDL/TIeiHwE7NYFnJRI5RXe+k5TSIk4H33xzDkNeqod5v4+3vhsGtBzwrYiLOywBnRWzgl04dRvB5kwuD/+yuqmjC9UqOizl+brwqNY4GqGKADdhdSrMxTH01oc8sE5ntbRmHTtCKTLkl7joeouwRxmGAACiPA6Qq98RFng40UhReyhxs3JGqC4atlIgyOnV7ERYsOdt6gLbFhEJOucDrjhUWqPFNPIJjVRLs6ty16nLLqdFiX+paCeYJouUXhqtJtN8c0Y9l1OiQPYQyCkFWJocTIClBepJQa2sqjQceA== Received: from ta2.c.googlers.com.com (105.168.195.35.bc.googleusercontent.com. [35.195.168.105]) by smtp.gmail.com with ESMTPSA id d15-20020a5d644f000000b0033b44a349e1sm1349967wrw.38.2024.02.07.04.04.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 04:04:50 -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, 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 v5 13/17] spi: s3c64xx: return ETIMEDOUT for wait_for_completion_timeout() Date: Wed, 7 Feb 2024 12:04:27 +0000 Message-ID: <20240207120431.2766269-14-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.687.g38aa6559b0-goog In-Reply-To: <20240207120431.2766269-1-tudor.ambarus@linaro.org> References: <20240207120431.2766269-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-20240207_040452_713922_806DDDA3 X-CRM114-Status: GOOD ( 11.34 ) 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(). Reviewed-by: Sam Protsenko Signed-off-by: Tudor Ambarus --- 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 4cafec877931..bcc00cb5e0d1 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -566,7 +566,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 @@ -587,7 +587,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; } @@ -617,7 +617,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);