From patchwork Fri Mar 10 14:01:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13169291 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 36640C64EC4 for ; Fri, 10 Mar 2023 14:02:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=zeKKL2Q21m3LCZfti+Wqm0BWtmFkJmmKRiIoJGDGEGQ=; b=hSbHZgqRRu5V4e pDfwQ7onGQDEmM03G3gtvMrduON/u1UuB3asSIWbKx/VlvSam/KeB6evgsdl+Rf26gaJFzeM/QnCm +23jfS7SWEco7X2kW6//cox9ZkbX1AVW6iq6FSg1z/YUvIRCKG4YQ5OCSLJiwC6jNIq75qA4BI9P7 klPfHUEH/tGKda8B+spI1ffYGb2I5uUXkAJwrHyIUNZACLKmsaNcskjh4i3We874eHv107CaFiUoA PwaSEwUnSAOH/bqLRFBVlvcPUTfAH8a0j943s/qTCDiVvFzqgno31aJp+pm/jxjai36iXQ5kTJeQH wUdKnqhazvDd4lQ8GvPw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1padJZ-00Efog-40; Fri, 10 Mar 2023 14:01:45 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1padJW-00EfnZ-1w for linux-arm-kernel@lists.infradead.org; Fri, 10 Mar 2023 14:01:43 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 0F3A4B822C3; Fri, 10 Mar 2023 14:01:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1651DC433EF; Fri, 10 Mar 2023 14:01:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1678456898; bh=mKGr1ypxxF+X86Tp40In+ocfizQZWE08+13VDMyFtKs=; h=From:To:Cc:Subject:Date:From; b=kAwUaG4HVbRtWn1cBmNVqoVVPq5YkHkTAg4VjF9d8uYVG73w+fp0TUHlrqIp2T0YB 6bg7nlfFYU0Fk0WkXPCovchICKr5neGoOdcTYn32+LBtZoHaY7jMt7bAAN1niYl47A rE/Y9v1i4JTXQmwBWP8EckehUbM6Fc87SJrvuD5sZdac5e/ObEgcTXcSA+nI/7Y8kn Gdyip129SVoRtTeYQB6lZKfrywBPofiR2MqT+uarenABArCPc9WuaVA+a2utgMtamy G8M1n8rzhysT2qmJI+l35iX9VBQclUDeaotFhg9qXYpbcu/7d6oEu4nw9w0bw3qQTu y3+seKYb2ThjA== From: Arnd Bergmann To: Vincenzo Palazzo , Luis Chamberlain , Jason Baron Cc: Arnd Bergmann , Russell King , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] ARM: dyndbg: allow including dyndbg.h in decompressor Date: Fri, 10 Mar 2023 15:01:26 +0100 Message-Id: <20230310140133.291594-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230310_060142_271544_C698F467 X-CRM114-Status: GOOD ( 16.34 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Arnd Bergmann 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 ''; did you forget to '#include '? +++ |+#include 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 Acked-by: Jason Baron Reviewed-by: Vincenzo Palazzo --- 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);