linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Solomon Peachy <pizza@shaftnet.org>
To: Ming Lei <tom.leiming@gmail.com>
Cc: Greg KH <gregkh@linuxfoundation.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [firmware_class] Fix compile with no builtin firmware
Date: Wed, 21 Nov 2012 21:15:46 -0500	[thread overview]
Message-ID: <20121122021546.GA6076@shaftnet.org> (raw)
In-Reply-To: <CACVXFVOuGQTLKSuFmTnv50-Eo0hzZSA2gh65upWu-E+439Dvsg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1921 bytes --]

On Thu, Nov 22, 2012 at 09:45:23AM +0800, Ming Lei wrote:
> No, it is not related closely, CONFIG_FIRMWARE_IN_KERNEL means
> that all in-kernel-tree firmware blobs should be included in kernel binary,
> but CONFIG_EXTRA_FIRMARE means that one additional firmware
> image will be put into kernel binary.

Okay.

> Considered that there is no your problem in -linus tree or -next tree 
> and the current code works for long time, maybe it is better to not 
> touch the code. Or suggest you to study this kind of config options 
> and firmware/Makefie first, then figure out one proper patch.

Given what you've told me (i.e. support for loading "builtin" firmware is 
always required), I propose this patch instead:

diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index 8945f4e..d291e15 100644
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -38,8 +38,6 @@ MODULE_LICENSE("GPL");
 
 /* Builtin firmware support */
 
-#ifdef CONFIG_FW_LOADER
-
 extern struct builtin_fw __start_builtin_fw[];
 extern struct builtin_fw __end_builtin_fw[];
 
@@ -69,19 +67,6 @@ static bool fw_is_builtin_firmware(const struct firmware *fw)
 	return false;
 }
 
-#else /* Module case - no builtin firmware support */
-
-static inline bool fw_get_builtin_firmware(struct firmware *fw, const char *name)
-{
-	return false;
-}
-
-static inline bool fw_is_builtin_firmware(const struct firmware *fw)
-{
-	return false;
-}
-#endif
-
 enum {
 	FW_STATUS_LOADING,
 	FW_STATUS_DONE,


The empty stub functions can never be compiled, as firmware_class.c 
isn't compiled when CONFIG_FW_LOADER isn't enabled.  So let's just nuke 
this unused code entirely.

 - Solomon
-- 
Solomon Peachy        		       pizza at shaftnet dot org	 
Melbourne, FL                          ^^ (mail/jabber/gtalk) ^^
Quidquid latine dictum sit, altum viditur.

[-- Attachment #2: Type: application/pgp-signature, Size: 190 bytes --]

  reply	other threads:[~2012-11-22 18:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-20 14:45 [PATCH] [firmware_class] Fix compile with no builtin firmware Solomon Peachy
2012-11-20 16:01 ` Ming Lei
2012-11-20 16:10   ` Solomon Peachy
2012-11-20 16:33     ` Greg KH
2012-11-20 18:12       ` Solomon Peachy
2012-11-21  1:35         ` Ming Lei
2012-11-21 14:01           ` Solomon Peachy
2012-11-22  1:45             ` Ming Lei
2012-11-22  2:15               ` Solomon Peachy [this message]
2012-11-22  2:42                 ` Ming Lei

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=20121122021546.GA6076@shaftnet.org \
    --to=pizza@shaftnet.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tom.leiming@gmail.com \
    /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).