From patchwork Wed Mar 29 08:02:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13192065 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5B3B2C6FD18 for ; Wed, 29 Mar 2023 08:02:59 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 802C76B0072; Wed, 29 Mar 2023 04:02:58 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7B3626B0074; Wed, 29 Mar 2023 04:02:58 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 67A796B0075; Wed, 29 Mar 2023 04:02:58 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 5910D6B0072 for ; Wed, 29 Mar 2023 04:02:58 -0400 (EDT) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 229E180C0F for ; Wed, 29 Mar 2023 08:02:58 +0000 (UTC) X-FDA: 80621194836.11.64CA8E4 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf01.hostedemail.com (Postfix) with ESMTP id 7553D4001E for ; Wed, 29 Mar 2023 08:02:56 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=hA0X1vVf; spf=pass (imf01.hostedemail.com: domain of arnd@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=arnd@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1680076976; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=eTRpX3jW7TH42nWWQvGtpj1dA+UZjyFRIjoULCtIjAA=; b=PZpZ+xr9dq1ThAZjCRBiMf/XPOQ2jdCQ2BanFEfepC4Ac3KCvwjyWpEiKiQYTGLaOSmzkg yTzqWg+RPgG2WENc+Uyq1gIceDlF2X3LmtoO3saDlhsNZ3uE8DsLIyyIa3hKRXOyLsY9v6 Yl27U4sR9RYJyIVcbPVa7vb3Pn1t4qI= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=hA0X1vVf; spf=pass (imf01.hostedemail.com: domain of arnd@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=arnd@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1680076976; a=rsa-sha256; cv=none; b=mwOLQZAjrf0a5rrT04pD6h5WcU0cZYKf4QOjgmrHa2Iv3Ubd3R3uLyndSxEDgpIuC3VHO1 m8mSQpqIvDgQHUpfCJwDxcGxq83t2yl6sKzODf3syljHJI7nIjRY59fsyNjJNHz9pmBUxD iLHFm0Q4qEc0fVfSHUzHVQkSmdiGijE= 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 dfw.source.kernel.org (Postfix) with ESMTPS id 6FFB261AE3; Wed, 29 Mar 2023 08:02:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0902FC433D2; Wed, 29 Mar 2023 08:02:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680076974; bh=92TAbqWARXeujUx3JkwuNmKYR3DjPGLIhIOnKSx3mpg=; h=From:To:Cc:Subject:Date:From; b=hA0X1vVfmB6PTFroH5fIUajvrFvPW7/4V1OzE58pVDoViEAq4MMhFMcCITGr9/ZBx O5wXJBH67X8+23zbSvNdt2XtsQArIH0tL7zQwJfG0eZPOybQOskXcTYp9br6vpO606 U24LeJkIp+DqPp9CMZjCPmX6d+PHZda8ufgoVjejP3ki3NGyi3u4FpFdnX8bDXHlq/ 52X/gLoXIvzvpRNcDTRRlraRp0o+AN1IxlDFBaeDQl3WZNd6SN8qilKnjA7BXmEN1C JxdDttsCSLghrxLhzZJCaPz1+1MSNHRUbieMfcyKcdPiR6W6NVpjsfNTW2FZnO5BVp Z8bV/CUymVw7A== From: Arnd Bergmann To: Andrew Morton , Luis Chamberlain , Minghao Chi , Vlastimil Babka Cc: Arnd Bergmann , Miaohe Lin , Baolin Wang , Mel Gorman , "Matthew Wilcox (Oracle)" , Kefeng Wang , NARIBAYASHI Akira , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH] mm: compaction: remove incorrect #ifdef checks Date: Wed, 29 Mar 2023 10:02:41 +0200 Message-Id: <20230329080248.2543492-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 7553D4001E X-Stat-Signature: i8zeurswnib6w8pp8zoqem4tbpg1fdtg X-HE-Tag: 1680076976-780914 X-HE-Meta: U2FsdGVkX1+iSxVxrwCyNI+WeSBtMURo3XVCopDkYwRWc81KPUh9oTwOnNpGNn/2hpHtc71SpAe+rBaQdMaew6E/FveGyYmk3CNvm0WUZ0HjAOoOVYVfRor/6CTtTiJf3j0psIB3RutNg6ag0yT5oYHzb1nSQQJLclTD7dLGoS8MKhkyfWlnmfPvbiCMs0eaIKGiUj4r9t9YHz8AJ/yRFbK9Fq5ofBQlofmr+rHtUkSr0NW8IT23l+emgADSkJRXACXVGY451uSF0oXwltZtojyw28Jdcuwhno1CsQibEtBf2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: owner-majordomo@kvack.org List-ID: From: Arnd Bergmann Without CONFIG_SYSCTL, the compiler warns about a few unused functions: mm/compaction.c:3076:12: error: 'proc_dointvec_minmax_warn_RT_change' defined but not used [-Werror=unused-function] mm/compaction.c:2780:12: error: 'sysctl_compaction_handler' defined but not used [-Werror=unused-function] mm/compaction.c:2750:12: error: 'compaction_proactiveness_sysctl_handler' defined but not used [-Werror=unused-function] The #ifdef is actually not necessary here, as the alternative register_sysctl_init() stub function does not use its argument, which lets the compiler drop the rest implicitly, while avoiding the warning. Fixes: c521126610c3 ("mm: compaction: move compaction sysctl to its own file") Signed-off-by: Arnd Bergmann --- mm/compaction.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/mm/compaction.c b/mm/compaction.c index 3dfdb84b9c98..c8bcdea15f5f 100644 --- a/mm/compaction.c +++ b/mm/compaction.c @@ -3092,7 +3092,6 @@ static int proc_dointvec_minmax_warn_RT_change(struct ctl_table *table, return ret; } -#ifdef CONFIG_SYSCTL static struct ctl_table vm_compaction[] = { { .procname = "compact_memory", @@ -3130,7 +3129,6 @@ static struct ctl_table vm_compaction[] = { }, { } }; -#endif static int __init kcompactd_init(void) { @@ -3147,9 +3145,7 @@ static int __init kcompactd_init(void) for_each_node_state(nid, N_MEMORY) kcompactd_run(nid); -#ifdef CONFIG_SYSCTL register_sysctl_init("vm", vm_compaction); -#endif return 0; } subsys_initcall(kcompactd_init)