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: 67504 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp952292wrd; Fri, 10 Mar 2023 08:01:39 -0800 (PST) X-Google-Smtp-Source: AK7set9/w9W4QFmQeiodKf4Gk/h0bFJPLj71M972skcddpgM1xvvqN9/QMGQT+8NuORLrR0ikGXE X-Received: by 2002:a6b:600c:0:b0:74c:7ea1:4f05 with SMTP id r12-20020a6b600c000000b0074c7ea14f05mr15141795iog.2.1678464099355; Fri, 10 Mar 2023 08:01:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678464099; cv=none; d=google.com; s=arc-20160816; b=XhhH0SKQRWHKq7DY5x6MG8vKiyPXotetP65Rx9Ce+yaP6LtlZ8KlOZwk6rVi7tWvSW XtkvSRVjNRg13SxwzAa/M9xsANwPAhoM44EEIhyo+nr6OryxdNFRc3o5RZ6+56VLQ+sm NqM8TfaBUHTXOJRNUUp9WhjQp3a+JNlcdKkRoXlJrRGqey0ZVB9ciiX6Gds9cSCToWC1 kiM5Fe4Vwbpwc/Y/stiMyWQ0kZ0SHUbtkRJWi+jBCMptTw9N/umvTsEb5WI195EstGeT 9HqlN+uO8uV4Uqm9xw1UlDezfrSEekEX76ADXYQzGGzaahl2biKlDidWNwzejZO6OGl9 xVCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=KNlPrj82BOz4kkZQDNoc1Q7JjM4rgWOlMuYTwCL/wEA=; b=UhI795PuB0eBtffZK/HRQqaV37H6U9K3PTHwgZ7QddJ9WcQuO5W0shL5oAr9CFM4Ym //Sn+EwRdOK6R087oXfdJ++FSbTLBj41UIaTzkmAR1sLxHERmdq6sjyZj7xY3tRQi9tb R2k6u2CAzWGoGaNKtj7+itHbczbS8YEQkSWPSzbZh56tqgVW6BojapQ1tbRLEory3SJw 944Gaa7BDGDbhj7ylC+btghi6h9Vd9mB4IuQEyxpEtoLzH5Y2YghPhUCKY4hqBrOkife aPla867dSziqnngMULqvLcU89xzyTTTTV2Z47Y67OO2ggunM9gElYySqFtjEBs4uTzaW 67dA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kAwUaG4H; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a21-20020a029995000000b003bc39fc7509si202564jal.49.2023.03.10.08.01.23; Fri, 10 Mar 2023 08:01:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kAwUaG4H; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231534AbjCJOBx (ORCPT + 99 others); Fri, 10 Mar 2023 09:01:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231493AbjCJOBp (ORCPT ); Fri, 10 Mar 2023 09:01:45 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 890011151D5 for ; Fri, 10 Mar 2023 06:01:41 -0800 (PST) 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 EA485B822BF for ; Fri, 10 Mar 2023 14:01:39 +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-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759996789660666854?= X-GMAIL-MSGID: =?utf-8?q?1759997171767674231?= 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 --- 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);