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: 197879 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp2182305dyb; Wed, 7 Feb 2024 04:14:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IEMvmEE3sYmWr6jIdzgGQBEor4TDD6jzv+uEEv3n1+KrbmeqdNCsHlDuWnJts6xGev1hg4a X-Received: by 2002:a17:903:18b:b0:1d5:8cbc:863c with SMTP id z11-20020a170903018b00b001d58cbc863cmr5907288plg.27.1707308055242; Wed, 07 Feb 2024 04:14:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707308055; cv=pass; d=google.com; s=arc-20160816; b=gIewoat85haQXivS33FQH6CHTnKnrzLfvQ3fCx96USrpsd+TvgRQ2jzH99nq0HWpBT 9rBoO0RgCx85fp/8sy7vFwDtoz47OFSu2AO0JlmWQrUnUo4bNXBr6u6/tdm81Iu+FaPR dIWQjNtsqpICRLyBhr2FbzTC9HWQV9+2RivBpbLlXigL8Fw0PS8AYVAYtdtKAp1byaYe wPL3LeMJloL81/KtGq4bDWlzuDcifoHUjFugEJvL6jgNiv7Y/C+t6XPQmSULcNOgZRuM Px73+LQ7xtxcDYowlp9u4Vvk2zh6y4xfFIsQOPs0uxGZeke/YmnS+dy7sKVYjEeQ3S4g 5n7Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=lw2MVCnXePoaGoFwhILfXnUXamqqjuyMAhC06ZDA+Mc=; fh=1Wl447m0cu2/rxXii4+BQL/ZxL1n++slOGB2QPQc/tc=; b=bFFHZsLjyE/mRKduSNUjo4k8EXJFADbY9OGHwgGEPVCQz1FJpVzzKo611x2u99/Jso z7HOrSzLVG/QlXM6DuqJ5pOkPaPW9R/EcKJlgro++em9wr9eaAvWqKTIXtVnXVHmNCzm jpRV4IjMbNWPFEzZJdCLByhY9pJg6jQKYKPJyLZLZaGRuqAGBFqur4AcOhhbEzgFmCty 9FGsL/OJT4Jf2fvfzsOVf/6IGBp301Nwt/hBEx1K6lOMLl+2vZJITnmcpVFRANeyFJzz 4NpvgH32PZ4UX/aG0Nv7nWRnP7fI7aJdrYKEKlP98CnsuLBh5TGNgvGfcjHOFuEBuQaq S+gw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CHA7CYIG; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-56451-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56451-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org X-Forwarded-Encrypted: i=2; AJvYcCW/MiFEzhrwGNkv8SwQyO8j3lBXbWJFb91tO4beQHE7yobN5qLnmCqmtUHLmBuGjDj0hDUPX+8mXla4Qs3A8SKDsQJf2g== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id q8-20020a17090311c800b001d7270f6b79si1515240plh.420.2024.02.07.04.14.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 04:14:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-56451-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CHA7CYIG; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-56451-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56451-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 35B1E28FC9B for ; Wed, 7 Feb 2024 12:08:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C9C6A5F847; Wed, 7 Feb 2024 12:05:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="CHA7CYIG" Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8619B5B20F for ; Wed, 7 Feb 2024 12:04:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707307496; cv=none; b=niEV2V+Z1ne38D+lzAKbeqq956FDumvYIoRsIpNbygm+eeUQv5jNWl99NjuMxFLcI3e6mx1jWYS9730wvICe+A5JsZLeQJwhef2Gy9Y2M0rGe6d++PW/o33lrmRn/3/Ye8KZy2jIojsMoe25LEB5DPpJ7x5xjrLyxyKuO6OSnLk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707307496; c=relaxed/simple; bh=m1U2ibNS2o4vQmNNZdCySzHxJgiI2IGiRefG6tMF48Y=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=i62mm6omW+8Mqef0HJWJ78nlSODJQPiLefcE1FDHv0pNlOfKSS0oLR9rDcqoKNTHRyf/RkqStpWiFtcb4pETMIRhGuqDr77RkbTcMREWe8faiNKcIKmMiij3RPXUJrSTxsWNZSuH0G/rULG6NvEaTqiOWnYwQzKWTuS9E5rItWs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=CHA7CYIG; arc=none smtp.client-ip=209.85.221.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-33b29b5eab5so367361f8f.2 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=vger.kernel.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=CHA7CYIGDFaxAthUuyoMT4LtUHxzxqyWQAXJT2cRYhunpf3xXRsmTby+HcFl6n25yV HSdwbUlesUq2QerWOEntSP2s+BCvbEYlFYJgqyQWw/FjvuU5FFj8qelh1gp/m8SerICC okKnR77bONbx7QOrMEv1NSFYrtmfDfxX87l/yu1Zqv57YnKYhiyXfQkw2MEv3oPSJ0d7 yIr8+sOnKKPmptxXL5RxHE7xIbuBK5I051Z1sGnR2IidQgW4YTdn9oYhK7iRuJlO2sF0 Khs4omdTNWL5qiyT9Aa9VZdTRiIb2Pqd9q3LmWbayekDJ83xOAKffIZzMG+u1J6Te7YG AAyQ== 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=GySNISP/7Ljd2E72KD4RubMlJepI8n6ruKqCyoGKc97WRyV9S1mAVjmWn4blStKWsO wHI8dpHqSv7GO7WNyxzpQIOg84ym9XPQklGXL8iCi6F0otXWElzfV+SQlDzvdt7q/HOt x92ugNRzYpP5vVFZrHAYcxUNJ2HrhaJUY+8XZIilDAHOI7qhcNgPCS67/BC3oVMTHP9D vRO3hXzNm6klQAPUlc+o/rSQ2yFl6nx8gAiQu+r573lOWlDTi4Z7GTXWLOnqsnh+3Kkg vlXRZ1V6g8waDfsFJIDupRu2v3PdoNJ01JlnHVYQNChCkrwsykc9DIyODuJARKl0vha8 /P6w== X-Gm-Message-State: AOJu0Ywg8n6deu+U/2Fx4N3zlRNosVDZxLHr2TTh0DOMSE6ORc0lIg7D LUO9mFQ84W9uq4KUJpF9XR4wSgjmn9Wlqfggk9PcBcFXDAyIljQF4fIgD/6N1LU= 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790242251621751802 X-GMAIL-MSGID: 1790242251621751802 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);