From: Takashi Iwai <tiwai@suse.de>
To: linux-kernel@vger.kernel.org
Cc: Prarit Bhargava <prarit@redhat.com>,
Ming Lei <ming.lei@canonical.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
x86@kernel.org, amd64-microcode@amd64.org
Subject: [PATCH v2 3/3] firmware: Avoid bogus fallback warning
Date: Mon, 11 Nov 2013 16:21:18 +0100 [thread overview]
Message-ID: <1384183278-19787-4-git-send-email-tiwai@suse.de> (raw)
In-Reply-To: <1384183278-19787-1-git-send-email-tiwai@suse.de>
The commit [3e358ac2bb5b: firmware: Be a bit more verbose about direct
firmware loading failure] introduced a new warning message about
falling back to user helper, but this isn't true when
CONFIG_FW_LOADER_USER_HELPER isn't set.
For avoiding the confusion, add a proper ifdef. And now we can remove
the dummy fw_load_from_user_helper(), too, since it's no longer called
with CONFIG_FW_LOADER_USER_HELPER=n.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
drivers/base/firmware_class.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index 7f48a6ffb0df..bb03c71bd94d 100644
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -940,14 +940,6 @@ static void kill_requests_without_uevent(void)
#endif
#else /* CONFIG_FW_LOADER_USER_HELPER */
-static inline int
-fw_load_from_user_helper(struct firmware *firmware, const char *name,
- struct device *device, bool uevent, bool nowait,
- long timeout)
-{
- return -ENOENT;
-}
-
/* No abort during direct loading */
#define is_fw_load_aborted(buf) false
@@ -1097,11 +1089,13 @@ _request_firmware(const struct firmware **firmware_p, const char *name,
if (ret) {
dev_warn(device, "Direct firmware load failed with error %d\n",
ret);
+#ifdef CONFIG_FW_LOADER_USER_HELPER
if (fallback) {
dev_warn(device, "Falling back to user helper\n");
ret = fw_load_from_user_helper(fw, name, device,
uevent, nowait, timeout);
}
+#endif
}
/* don't cache firmware handled without uevent */
--
1.8.4.2
next prev parent reply other threads:[~2013-11-11 15:21 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-11 15:21 [PATCH v2 0/3] Add request_firmware_direct() for microcode loader Takashi Iwai
2013-11-11 15:21 ` [PATCH v2 1/3] firmware: Introduce request_firmware_direct() Takashi Iwai
2013-11-11 15:34 ` Borislav Petkov
2013-11-11 17:30 ` Takashi Iwai
2013-11-11 19:47 ` Borislav Petkov
2013-11-11 20:05 ` Prarit Bhargava
2013-11-12 2:11 ` Ming Lei
2013-11-11 15:21 ` [PATCH v2 2/3] microcode: Use request_firmware_direct() Takashi Iwai
2013-11-11 15:21 ` Takashi Iwai [this message]
2013-11-12 1:40 ` [PATCH v2 3/3] firmware: Avoid bogus fallback warning Ming Lei
2013-11-12 6:26 ` Takashi Iwai
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=1384183278-19787-4-git-send-email-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=amd64-microcode@amd64.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ming.lei@canonical.com \
--cc=prarit@redhat.com \
--cc=x86@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
all inboxes | Powered by JetHome®