linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] firmware: hardcode the debug message for -ENOENT
@ 2019-01-14  7:19 yuankuiz
  2019-01-14  9:58 ` yuankuiz
  0 siblings, 1 reply; 7+ messages in thread
From: yuankuiz @ 2019-01-14  7:19 UTC (permalink / raw)
  To: mcgrof; +Cc: linux-kernel

 From d6892f54a81bf85ad011bfb8822567690713d575 Mon Sep 17 00:00:00 2001

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

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..9ab1409 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 with error -ENOENT\n",
+					 path);
  			continue;
  		}
  		dev_dbg(device, "direct-loading %s\n", fw_priv->fw_name);
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-02-21 15:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-14  7:19 [PATCH] firmware: hardcode the debug message for -ENOENT yuankuiz
2019-01-14  9:58 ` yuankuiz
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

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).