public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Jason Baron <jbaron@akamai.com>
To: Arnd Bergmann <arnd@kernel.org>,
	Vincenzo Palazzo <vincenzopalazzodev@gmail.com>,
	Luis Chamberlain <mcgrof@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Russell King <linux@armlinux.org.uk>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ARM: dyndbg: allow including dyndbg.h in decompressor
Date: Fri, 10 Mar 2023 09:15:54 -0500	[thread overview]
Message-ID: <bfa92c1d-11ea-eaad-2dd0-546ec1b4b0d3@akamai.com> (raw)
In-Reply-To: <20230310140133.291594-1-arnd@kernel.org>

On 3/10/23 9:01 AM, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> After a change to linux/module.h, dyndbg.h is now included
> indirectly from the decompressor for lz4 support, which in turn
> causes a build failure on 32-bit Arm:
> 
> In file included from include/linux/module.h:30,
>                   from arch/arm/boot/compressed/../../../../lib/lz4/lz4_decompress.c:39,
>                   from arch/arm/boot/compressed/../../../../lib/decompress_unlz4.c:10,
>                   from arch/arm/boot/compressed/decompress.c:59:
> include/linux/dynamic_debug.h: In function 'ddebug_dyndbg_module_param_cb':
> include/linux/dynamic_debug.h:307:14: error: implicit declaration of function 'strcmp' [-Werror=implicit-function-declaration]
>    307 |         if (!strcmp(param, "dyndbg")) {
>        |              ^~~~~~
> include/linux/dynamic_debug.h:1:1: note: 'strcmp' is defined in header '<string.h>'; did you forget to '#include <string.h>'?
>    +++ |+#include <string.h>
> 
> The decompressor has its own replacement for the linux/string.h contents,
> so the normal declaration is not visible here. Since the function is
> not actually called, it is sufficient to add a declaration, and this
> is in fact the correct one as it matches the definition in
> arch/arm/boot/compressed/string.c.
> 
> Fixes: 7deabd674988 ("dyndbg: use the module notifier callbacks")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> The patch that caused the problem is in linux-next, maybe fold
> the fix into that patch if possible
> ---
>   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 74255e819831..0669851394f0 100644
> --- a/arch/arm/boot/compressed/decompress.c
> +++ b/arch/arm/boot/compressed/decompress.c
> @@ -31,6 +31,7 @@
>   /* 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);
> +extern int strcmp(const char *cs, const char *ct);
>   extern int memcmp(const void *cs, const void *ct, size_t count);
>   extern char * strchrnul(const char *, int);
>   


Hi Arnd,

Thank you for the fix up, I was about to look into this...

Acked-by: Jason Baron <jbaron@akamai.com>

Thanks,

-Jason

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2023-03-10 14:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-10 14:01 [PATCH] ARM: dyndbg: allow including dyndbg.h in decompressor Arnd Bergmann
2023-03-10 14:15 ` Jason Baron [this message]
2023-03-10 14:23 ` Vincenzo Palazzo
2023-03-10 18:29 ` Luis Chamberlain

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=bfa92c1d-11ea-eaad-2dd0-546ec1b4b0d3@akamai.com \
    --to=jbaron@akamai.com \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=mcgrof@kernel.org \
    --cc=vincenzopalazzodev@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