Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp81585imp; Tue, 19 Feb 2019 18:40:14 -0800 (PST) X-Google-Smtp-Source: AHgI3IZMU5HOibcDiRpys7n/EeK/GtDFFEPcQm7lP3q+z2/oziCcOha7UY0TekR9sLTmgv01szKA X-Received: by 2002:a63:f412:: with SMTP id g18mr27153354pgi.262.1550630414836; Tue, 19 Feb 2019 18:40:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550630414; cv=none; d=google.com; s=arc-20160816; b=zKl6Wlpv7Ympn3fl7P5InWSDqR4np9P1M1wIhKECeMg6s3GmU0Jsqh0u44RVwMB6UG Hb3Kgwq85+gyJANw/SN81yvizf2NMKPHxybPuuOX256WHoEFC4KID6Mbzv4HQ0e9ZVe+ NYBKmr6241312ABFlVmwSrPC9HmQDdyMkU+ENTVQ21oURnB5BYHmKpl72wwleS1u1Xzm qu2bKRILNHeA0mbb9nKrw+PV04CCYb3duJC6HoEQJ9bhy41N9X854byhsyfcouiwy504 79fOjgMJVeJ1uUrdsemDodXk6mT3Xdv495nCGzwXMyKUHz/O20pLpgFM2pMWDo52GSXJ lvsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature:dkim-signature; bh=N/DuWJDhjys8/YcObhWtfgcnPPMYV41VDOJrG9C28CE=; b=OxhipDtO7bmfYotGxxFsyzgu2XtE5+ZWztBfJhuq2C/0imFpS3qQM6g2rEV3fSPuxy oESTiAkVrwyrYkrKB1YshJhUbJEPrnR+ZzfjPnHKtWY6MBbbNUiH/TFzEKqL3Yma4wQV 2MLRLuYiwYF0XmOZH/dh7yV4eFTPc7oH2p5zWVB3q6JLN39YvKtrw/Az9AdAoLjEZNzH JWOmBtqa41UtTa0vmH9ytPzA3MWWS6VejzmMLWGdvX1V4O1J/1Iffpc+AoOhgCry47Ta oDtpqu2rGtkK2Jn8orRrmUK112Xz+XXmGkMLfUxGyVL+L1AAfluH9OrW9MsJMwK7DhzK u/QQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=L4wpNhlE; dkim=pass header.i=@codeaurora.org header.s=default header.b=L4wpNhlE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f23si16409569pgv.431.2019.02.19.18.39.59; Tue, 19 Feb 2019 18:40:14 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=L4wpNhlE; dkim=pass header.i=@codeaurora.org header.s=default header.b=L4wpNhlE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729172AbfBTCjF (ORCPT + 99 others); Tue, 19 Feb 2019 21:39:05 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:39056 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726235AbfBTCjE (ORCPT ); Tue, 19 Feb 2019 21:39:04 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 5EFC3607DD; Wed, 20 Feb 2019 02:39:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1550630344; bh=3CGBwsaI7EFppSp/kRLYnynci5AF/Rc/sr92ZLqSvHA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=L4wpNhlEt4b2ryBg2s5oesqUeU5vUkYt1XP3YEVTjIv/dTAZhrUYxSa1+a6r2bMa+ IZ8sep/b0NfjFn/fUJSCjsafk+6G3tIwQUxhBb4HHBzxmUNeFNkb4sVQf2lOfAYMVY Rqv+5fIm0F2EOSGRrcA2J49E3MzN77cOYgJBuimQ= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 09D4260559; Wed, 20 Feb 2019 02:39:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1550630344; bh=3CGBwsaI7EFppSp/kRLYnynci5AF/Rc/sr92ZLqSvHA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=L4wpNhlEt4b2ryBg2s5oesqUeU5vUkYt1XP3YEVTjIv/dTAZhrUYxSa1+a6r2bMa+ IZ8sep/b0NfjFn/fUJSCjsafk+6G3tIwQUxhBb4HHBzxmUNeFNkb4sVQf2lOfAYMVY Rqv+5fIm0F2EOSGRrcA2J49E3MzN77cOYgJBuimQ= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 20 Feb 2019 10:39:04 +0800 From: yuankuiz@codeaurora.org To: Luis Chamberlain Cc: gregkh@linuxfoundation.org, rafael@kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] firmware: hardcode the debug message for -ENOENT In-Reply-To: <20190219163810.GI11489@garbanzo.do-not-panic.com> References: <7e752055f72d67a4b963436d67965123@codeaurora.org> <20190204233047.GT11489@garbanzo.do-not-panic.com> <20190219163810.GI11489@garbanzo.do-not-panic.com> Message-ID: <96bbc0d0f3c76b91752db07f0f5287e4@codeaurora.org> X-Sender: yuankuiz@codeaurora.org User-Agent: Roundcube Webmail/1.2.5 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: John Zhao When no file /path was found, the error code of -ENOENT enumerated in errno-base.h, is returned. Stating clearly that the file was not found is much more useful for debugging, So let's be explicit about that. Signed-off-by: John Zhao --- drivers/base/firmware_loader/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/base/firmware_loader/main.c b/drivers/base/firmware_loader/main.c index 8e9213b..7eaaf5e 100644 --- a/drivers/base/firmware_loader/main.c +++ b/drivers/base/firmware_loader/main.c @@ -328,12 +328,12 @@ fw_get_filesystem_firmware(struct device *device, struct fw_priv *fw_priv) rc = kernel_read_file_from_path(path, &fw_priv->data, &size, msize, id); if (rc) { - if (rc == -ENOENT) - dev_dbg(device, "loading %s failed with error %d\n", - path, rc); - else + if (rc != -ENOENT) dev_warn(device, "loading %s failed with error %d\n", path, rc); + else + dev_dbg(device, "loading %s failed for no such file or directory.\n", + path); continue; } dev_dbg(device, "direct-loading %s\n", fw_priv->fw_name); --