Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp3596442rwo; Fri, 4 Aug 2023 07:15:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFoQestlN4kkO71r+Yle5nyLZERmntuN2vcEYyvG+UzsWh6boQpCFweBllFoWAzC8mNLMCE X-Received: by 2002:a17:906:9bf8:b0:993:d6e8:2389 with SMTP id de56-20020a1709069bf800b00993d6e82389mr1569635ejc.26.1691158536988; Fri, 04 Aug 2023 07:15:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691158536; cv=none; d=google.com; s=arc-20160816; b=JxmhqfGSO2TMpLb0YhU5hBXtBBTElmkLemL3xskSaX+0wT7Zt4WidQGf/yEqrieKJe lps8jp/q2lJC4h5cSHF9DcgLNkytLEacRqzUD/SvlA3fDPjzipXAhgsicmMsQFhE7lxm rxHGVemmg7ZD3RXf44PZCv1Q/VrGcvEUu5Tu3rRyst/FmRy5D1u3tnRr0Qm6SNFm+yRA iV4PI5cySQtpdi4LXfuc+g5QVLftkLO0AM1MJT54CfRv5Q/RZQWTSI1j1efHUbKo4amP z5l0XLJSHOYdR4IGOVN//nKBmcNW4WyL8sH3v635ZpRV4zS9Y6nSJqJJaNODRviR7ZfZ mrRg== 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=01muRbSo/rwOWzaPv4FqRv59SGspU65qQkSlByXWg3E=; fh=GwLKiwoIb3R11/k2eJnLsM9g1f9xcZmDhdwCGIDxTXw=; b=GHr2ZrrBLq3509sFrGe59DzmoqX/43iJT6RsHKdVfoUj3bTyHjmKm+Ue3J3vJoZLFM ZB46R+vs+1e4amuNFHz1DtjeKkxkCAVZOP94030/FDVCPmq54QDJduh50DVlwTbcFISl /PM7cqjjiePT42JpnVp0yUV1KC3NlFmx34gkF6O0XZ0Ai10/Laz+Kq3PEac+JhXl2oBZ IHgonITJd1ZAQ3cvvq4UqNbRXXPsYcxlsofotB4NS48nfhHvWptBOrfj4nHkfjMwiIzH vMdF578/QQNMUDnzt96D3y+1TtjNLp1aaHDN38SJgssrkg9b6e9Kpu6ycEGhlV2Caw/M 64tQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="eN2Dh/AT"; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b6-20020a1709065e4600b00988d0cd5273si1692695eju.112.2023.08.04.07.15.02; Fri, 04 Aug 2023 07:15:36 -0700 (PDT) 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="eN2Dh/AT"; 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 S229560AbjHDN2d (ORCPT + 99 others); Fri, 4 Aug 2023 09:28:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230358AbjHDN2X (ORCPT ); Fri, 4 Aug 2023 09:28:23 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06A55198C for ; Fri, 4 Aug 2023 06:28:10 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 994886200C for ; Fri, 4 Aug 2023 13:28:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 57601C433C7; Fri, 4 Aug 2023 13:28:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691155689; bh=lqWFMUCSgl4MzmkAhbpi04RG6x0pOTOX1AFce7iyhAI=; h=From:To:Cc:Subject:Date:From; b=eN2Dh/ATWUjDV1BMbtPhyZQkr9SQmTNdS5J3mBcMnsCoe+GdhneMPMPtwsbV8bpb+ X8fvLSSaxE9gFWIfIPPOMu5sS2ypT4iVOpHPYNP108iboLhBtweWtdGdZrAWl+fPHw xrk9RBOfDVZ/mIsSenER/kcpUn2wtdFXPwX2hilMxWVu60eEntzK8D4ItO65yFRvB/ KJuinP1voQCEeAyM8PkspfkFhE5x/9CcNIVp+negp19GYEoo+YVqp/GuymoPP7oqNH eyB7KNTgV2Wt+Dc8cw47skfnBAHRM6jM3c6eX8aHigQgpG0yq3CKuTjz7tqjssaUp7 WXud7QeKKc5Cg== From: Arnd Bergmann To: Andrew Morton , Douglas Anderson Cc: Petr Mladek , Arnd Bergmann , Pingfan Liu , Lecopzer Chen , linux-kernel@vger.kernel.org Subject: [PATCH 1/2] watchdog/hardlockup: avoid unused-function warning Date: Fri, 4 Aug 2023 15:27:50 +0200 Message-Id: <20230804132800.2270896-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,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 From: Arnd Bergmann The newly added hardlockup_all_cpu_backtrace_proc_handler() function is defined in some configurations that don't actually call it: kernel/watchdog.c:112:12: error: 'hardlockup_all_cpu_backtrace_proc_handler' defined but not used [-Werror=unused-function] 112 | static int hardlockup_all_cpu_backtrace_proc_handler(struct ctl_table *table, int write, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Hide the definition when either CONFIG_SMP or CONFIG_SYSCTL are disabled and the function is not actually needed. Fixes: 838b3b76220d5 ("watchdog/hardlockup: avoid large stack frames in watchdog_hardlockup_check()") Signed-off-by: Arnd Bergmann --- kernel/watchdog.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/watchdog.c b/kernel/watchdog.c index 25d5627a6580b..0dd6a7acacd97 100644 --- a/kernel/watchdog.c +++ b/kernel/watchdog.c @@ -108,6 +108,7 @@ notrace void arch_touch_nmi_watchdog(void) } EXPORT_SYMBOL(arch_touch_nmi_watchdog); +#if defined(CONFIG_SMP) && defined(CONFIG_SYSCTL) static int hardlockup_all_cpu_backtrace_proc_handler(struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos) { @@ -130,6 +131,7 @@ static int hardlockup_all_cpu_backtrace_proc_handler(struct ctl_table *table, in return ret; } +#endif void watchdog_hardlockup_touch_cpu(unsigned int cpu) { -- 2.39.2