linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] driver core: firmware loader: fix build error
@ 2013-06-04 11:53 Arnd Bergmann
  2013-06-04 13:44 ` Ming Lei
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2013-06-04 11:53 UTC (permalink / raw)
  To: linux-arm-kernel

Patch af5bc11e9 "driver core: firmware loader: kill FW_ACTION_NOHOTPLUG
requests before suspend" caused a regression for the case where
CONFIG_FW_LOADER_USER_HELPER is not enabled, because it adds
references to code that is not available in that configuration:

drivers/base/firmware_class.c: In function 'kill_requests_without_uevent':
drivers/base/firmware_class.c:1424:49: error: 'struct firmware_buf' has no member named 'pending_list'
  list_for_each_entry_safe(buf, next, &pending_fw_head, pending_list) {
drivers/base/firmware_class.c:1426:5: error: implicit declaration of function 'fw_load_abort' [-Werror=implicit-function-declaration]

This fixes the build error by making the new code conditional
as well. Found using ARM ape6evm_defconfig on today's linux-next.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Ming Lei <ming.lei@canonical.com>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index c415043..6cca468 100644
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -1417,6 +1417,7 @@ static void __device_uncache_fw_images(void)
 /* kill pending requests without uevent to avoid blocking suspend */
 static void kill_requests_without_uevent(void)
 {
+#ifdef CONFIG_FW_LOADER_USER_HELPER
 	struct firmware_buf *buf;
 	struct firmware_buf *next;
 
@@ -1426,6 +1427,7 @@ static void kill_requests_without_uevent(void)
 			 fw_load_abort(buf);
 	}
 	mutex_unlock(&fw_lock);
+#endif
 }
 
 /**

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

* [PATCH] driver core: firmware loader: fix build error
  2013-06-04 11:53 [PATCH] driver core: firmware loader: fix build error Arnd Bergmann
@ 2013-06-04 13:44 ` Ming Lei
  0 siblings, 0 replies; 2+ messages in thread
From: Ming Lei @ 2013-06-04 13:44 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Arnd,

Thanks for the fix.

On Tue, Jun 4, 2013 at 7:53 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> Patch af5bc11e9 "driver core: firmware loader: kill FW_ACTION_NOHOTPLUG
> requests before suspend" caused a regression for the case where
> CONFIG_FW_LOADER_USER_HELPER is not enabled, because it adds
> references to code that is not available in that configuration:
>
> drivers/base/firmware_class.c: In function 'kill_requests_without_uevent':
> drivers/base/firmware_class.c:1424:49: error: 'struct firmware_buf' has no member named 'pending_list'
>   list_for_each_entry_safe(buf, next, &pending_fw_head, pending_list) {
> drivers/base/firmware_class.c:1426:5: error: implicit declaration of function 'fw_load_abort' [-Werror=implicit-function-declaration]
>
> This fixes the build error by making the new code conditional
> as well. Found using ARM ape6evm_defconfig on today's linux-next.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Cc: Ming Lei <ming.lei@canonical.com>
> Cc: Takashi Iwai <tiwai@suse.de>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>
> diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
> index c415043..6cca468 100644
> --- a/drivers/base/firmware_class.c
> +++ b/drivers/base/firmware_class.c
> @@ -1417,6 +1417,7 @@ static void __device_uncache_fw_images(void)
>  /* kill pending requests without uevent to avoid blocking suspend */
>  static void kill_requests_without_uevent(void)
>  {
> +#ifdef CONFIG_FW_LOADER_USER_HELPER
>         struct firmware_buf *buf;
>         struct firmware_buf *next;
>
> @@ -1426,6 +1427,7 @@ static void kill_requests_without_uevent(void)
>                          fw_load_abort(buf);
>         }
>         mutex_unlock(&fw_lock);
> +#endif

Fenggang's kbuild robot captured the build failure, and a similar fix patch
has been posted out:

      http://marc.info/?l=linux-kernel&m=137031139632564&w=2

Thanks,
--
Ming Lei

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

end of thread, other threads:[~2013-06-04 13:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-04 11:53 [PATCH] driver core: firmware loader: fix build error Arnd Bergmann
2013-06-04 13:44 ` Ming Lei

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