mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ARM: decompressor: add strlen prototype
@ 2017-01-25 22:24 Arnd Bergmann
  2017-01-30 18:55 ` Russell King - ARM Linux
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2017-01-25 22:24 UTC (permalink / raw)
  To: Russell King
  Cc: Sven Schmidt, Andrew Morton, Arnd Bergmann, linux-arm-kernel,
	linux-kernel

The decompress.c file contains a declaration for strstr() so we can
include some compression library code.

With the updated LZ4 implementation, we run into the same problem again
for strlen():

In file included from ../include/linux/rcupdate.h:40:0,
                 from ../include/linux/srcu.h:33,
                 from ../include/linux/notifier.h:15,
                 from ../include/linux/memory_hotplug.h:6,
                 from ../include/linux/mmzone.h:749,
                 from ../include/linux/gfp.h:5,
                 from ../include/linux/kmod.h:22,
                 from ../include/linux/module.h:13,
                 from ../arch/arm/boot/compressed/../../../../lib/lz4/lz4_decompress.c:39,
                 from ../arch/arm/boot/compressed/../../../../lib/decompress_unlz4.c:13,
                 from ../arch/arm/boot/compressed/decompress.c:55:
include/linux/cpumask.h: In function 'cpumask_parse':
include/linux/cpumask.h:592:53: error: implicit declaration of function 'strlen';did you mean 'strstr'? [-Werror=implicit-function-declaration]

This adds another declaration to work around the new problem.

Fixes: ce83d9ab80d6 ("lib: update LZ4 compressor module")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/boot/compressed/decompress.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/compressed/decompress.c b/arch/arm/boot/compressed/decompress.c
index a0765e7ed6c7..ea7832702a8f 100644
--- a/arch/arm/boot/compressed/decompress.c
+++ b/arch/arm/boot/compressed/decompress.c
@@ -32,6 +32,7 @@ extern void error(char *);
 
 /* Not needed, but used in some headers pulled in by decompressors */
 extern char * strstr(const char * s1, const char *s2);
+extern size_t strlen(const char *s);
 
 #ifdef CONFIG_KERNEL_GZIP
 #include "../../../../lib/decompress_inflate.c"
-- 
2.9.0

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

* Re: [PATCH] ARM: decompressor: add strlen prototype
  2017-01-25 22:24 [PATCH] ARM: decompressor: add strlen prototype Arnd Bergmann
@ 2017-01-30 18:55 ` Russell King - ARM Linux
  0 siblings, 0 replies; 2+ messages in thread
From: Russell King - ARM Linux @ 2017-01-30 18:55 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Sven Schmidt, Andrew Morton, linux-arm-kernel, linux-kernel

On Wed, Jan 25, 2017 at 11:24:33PM +0100, Arnd Bergmann wrote:
> The decompress.c file contains a declaration for strstr() so we can
> include some compression library code.
> 
> With the updated LZ4 implementation, we run into the same problem again
> for strlen():
> 
> In file included from ../include/linux/rcupdate.h:40:0,
>                  from ../include/linux/srcu.h:33,
>                  from ../include/linux/notifier.h:15,
>                  from ../include/linux/memory_hotplug.h:6,
>                  from ../include/linux/mmzone.h:749,
>                  from ../include/linux/gfp.h:5,
>                  from ../include/linux/kmod.h:22,
>                  from ../include/linux/module.h:13,
>                  from ../arch/arm/boot/compressed/../../../../lib/lz4/lz4_decompress.c:39,
>                  from ../arch/arm/boot/compressed/../../../../lib/decompress_unlz4.c:13,
>                  from ../arch/arm/boot/compressed/decompress.c:55:
> include/linux/cpumask.h: In function 'cpumask_parse':
> include/linux/cpumask.h:592:53: error: implicit declaration of function 'strlen';did you mean 'strstr'? [-Werror=implicit-function-declaration]
> 
> This adds another declaration to work around the new problem.
> 
> Fixes: ce83d9ab80d6 ("lib: update LZ4 compressor module")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Please put this in the patch system, thanks.

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.

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

end of thread, other threads:[~2017-01-30 19:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-25 22:24 [PATCH] ARM: decompressor: add strlen prototype Arnd Bergmann
2017-01-30 18:55 ` Russell King - ARM Linux

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®