linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: yuankuiz@codeaurora.org
To: mcgrof@kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] firmware: hardcode the debug message for -ENOENT
Date: Mon, 14 Jan 2019 17:58:30 +0800	[thread overview]
Message-ID: <e1e9df03b288daf7258ab9e0f7402ca1@codeaurora.org> (raw)
In-Reply-To: <7e752055f72d67a4b963436d67965123@codeaurora.org>

Hi,

     Refined at below.

 From bbd0d9c8f28eb78ca34353347c3d4092e88f000c Mon Sep 17 00:00:00 2001

When the return code of "-ENOENT" was printed inside
of the debug message, which could be hardcoded meaningfully.

Signed-off-by: John Zhao <yuankuiz@codeaurora.org>
---
  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);
-- 
2.7.4


On 2019-01-14 03:19 PM, yuankuiz@codeaurora.org wrote:
> From d6892f54a81bf85ad011bfb8822567690713d575 Mon Sep 17 00:00:00 2001
> 

  reply	other threads:[~2019-01-14  9:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-14  7:19 [PATCH] firmware: hardcode the debug message for -ENOENT yuankuiz
2019-01-14  9:58 ` yuankuiz [this message]
2019-02-04 23:30   ` Luis Chamberlain
2019-02-17  8:25     ` yuankuiz
2019-02-19 16:38       ` Luis Chamberlain
2019-02-20  2:39         ` [PATCH v2] " yuankuiz
2019-02-21 15:22           ` Luis Chamberlain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e1e9df03b288daf7258ab9e0f7402ca1@codeaurora.org \
    --to=yuankuiz@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcgrof@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).