Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3E2CFC4338F for ; Sat, 24 Jul 2021 12:12:26 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D7A9260EB5 for ; Sat, 24 Jul 2021 12:12:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D7A9260EB5 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=anirudhrb.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.linuxfoundation.org Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id A87F76060F; Sat, 24 Jul 2021 12:12:25 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3NDL6-OWywNU; Sat, 24 Jul 2021 12:12:25 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp3.osuosl.org (Postfix) with ESMTPS id D6F916077C; Sat, 24 Jul 2021 12:12:24 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id B6937C001A; Sat, 24 Jul 2021 12:12:24 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) by lists.linuxfoundation.org (Postfix) with ESMTP id BAEE7C000E for ; Sat, 24 Jul 2021 12:12:22 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id A9D3D6077C for ; Sat, 24 Jul 2021 12:12:22 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id N1pRhE1RxWgU for ; Sat, 24 Jul 2021 12:12:22 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from sender4-of-o53.zoho.com (sender4-of-o53.zoho.com [136.143.188.53]) by smtp3.osuosl.org (Postfix) with ESMTPS id 3836D6060F for ; Sat, 24 Jul 2021 12:12:22 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; t=1627128733; cv=none; d=zohomail.com; s=zohoarc; b=IEByUCooav9mPLmqbmo/8t2xH5NNltXcSta7Ut3LW+6xEYi8uDfJceR9Um0fXHR+w/j2D/AVhZBDanq/P/TL0qtrbRonph+nnkNdBeURyebm2UFM4nu/7bzPtTlq27EmBRusNqLShUyUoE6VPM0nG/AqFeq7dov7PQKgU1NTaOc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1627128733; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=vIjY2fpXV0SCCDz1yCqG7n2aKYPkuWYL6qrV1nbEmmg=; b=lnBREQbvcRmAxZfvduVfX03omyFZScmnP1ppdbySxFWrdYtSu3xg+n2l8cFpu3gtOx/PfEmV0Jxl/zUKxdV+LCRX8gwO8HPyKsyLYAEThkUMd352qqwo53HRa3TjJZZYj1+TCd1h+DbBESPFqXZuBesv1sY/s9jimS4K2lbt/i8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=anirudhrb.com; spf=pass smtp.mailfrom=mail@anirudhrb.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1627128733; s=zoho; d=anirudhrb.com; i=mail@anirudhrb.com; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding; bh=vIjY2fpXV0SCCDz1yCqG7n2aKYPkuWYL6qrV1nbEmmg=; b=weNTpLxhhDi19rWEHw3oCvre03W+YIRURG5M7GayGVGJ9q//QV8GKqkD71DN9nfs nl9VmZSjY3INaSRH9ccZiD/BW5VqPMmaKcWdlgs0fRybZ055Z7GI28Io74RdwzrBdNt 0opvMMTu2gBp1RfQQJ0JAWFbtcm0iM1Q9TaRWTPU= Received: from localhost.localdomain (106.51.107.3 [106.51.107.3]) by mx.zohomail.com with SMTPS id 1627128721398315.2124753449539; Sat, 24 Jul 2021 05:12:01 -0700 (PDT) From: Anirudh Rayabharam To: mcgrof@kernel.org, gregkh@linuxfoundation.org, rafael@kernel.org, skhan@linuxfoundation.org Subject: [PATCH v7 1/2] firmware_loader: use -ETIMEDOUT instead of -EAGAIN in fw_load_sysfs_fallback Date: Sat, 24 Jul 2021 17:41:33 +0530 Message-Id: <20210724121134.6364-2-mail@anirudhrb.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210724121134.6364-1-mail@anirudhrb.com> References: <20210724121134.6364-1-mail@anirudhrb.com> MIME-Version: 1.0 X-ZohoMailClient: External Cc: linux-kernel-mentees@lists.linuxfoundation.org, linux-kernel@vger.kernel.org X-BeenThere: linux-kernel-mentees@lists.linuxfoundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-kernel-mentees-bounces@lists.linuxfoundation.org Sender: "Linux-kernel-mentees" The only motivation for using -EAGAIN in commit 0542ad88fbdd81bb ("firmware loader: Fix _request_firmware_load() return val for fw load abort") was to distinguish the error from -ENOMEM, and so there is no real reason in keeping it. -EAGAIN is typically used to tell the userspace to try something again and in this case re-using the sysfs loading interface cannot be retried when a timeout happens, so the return value is also bogus. -ETIMEDOUT is received when the wait times out and returning that is much more telling of what the reason for the failure was. So, just propagate that instead of returning -EAGAIN. Suggested-by: Luis Chamberlain Signed-off-by: Anirudh Rayabharam --- drivers/base/firmware_loader/fallback.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/base/firmware_loader/fallback.c b/drivers/base/firmware_loader/fallback.c index 91899d185e31..1a48be0a030e 100644 --- a/drivers/base/firmware_loader/fallback.c +++ b/drivers/base/firmware_loader/fallback.c @@ -535,8 +535,6 @@ static int fw_load_sysfs_fallback(struct fw_sysfs *fw_sysfs, long timeout) if (fw_state_is_aborted(fw_priv)) { if (retval == -ERESTARTSYS) retval = -EINTR; - else - retval = -EAGAIN; } else if (fw_priv->is_paged_buf && !fw_priv->data) retval = -ENOMEM; -- 2.26.2 _______________________________________________ Linux-kernel-mentees mailing list Linux-kernel-mentees@lists.linuxfoundation.org https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees