From patchwork Mon May 22 19:50:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 97578 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1692654vqo; Mon, 22 May 2023 13:13:14 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4+gL4nwgYGuv1FDPsIPTHWtyGXVXx6ErjKpTlKz3VfEgYSu78YhD7RkKWI7wixOv0Ra5KD X-Received: by 2002:a17:903:124a:b0:1ad:e198:c4f2 with SMTP id u10-20020a170903124a00b001ade198c4f2mr14586028plh.18.1684786394046; Mon, 22 May 2023 13:13:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684786394; cv=none; d=google.com; s=arc-20160816; b=X22+fof5Zt78ObQ8pPUdZPIvuEa3yjydiGoL+y9DODVv/vasHi4CwD9i/PBbzRsdSF tKCMf2IHBgaIXIEzTI+zRYw8YCZzPpVwFzx+jPqyPvf0IB8/R5MPZlNWydjjW2RRzrX3 zeYnr6yA4VXw9rkZneogc9O6qkGMo5+G96BWl4EfGq/+OXRiyseetZRh3H12FPhf+BtU KA3bDCmwwwS7/bd8qI08yYfox8S1CLTNW/SNTix/Guf3pKPXRXXexOIGE5X7qGNmOrfs /ROm83smaiVQrU5N9Uw+oSIo1nErix9LXNET9n2+UTbPAjj6i9x+jSdd22C1rGCobwVQ CKWA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=4TV2blp8SU24hPHKp9o7KoTwdyRJXfAYgkCs+yiDCko=; b=QuoN78J8XETfNhHtmsWqBlJMlBvu/13c+lOXQeirQfH2xG1n3pAaRulbh0/RP1CoD4 c8zMx8YjSMvEmC6rCdXSYhMVdgJ0JOYgz1Lp4Vr0vn5nxKpWxW+njOHrucSPMUJW/4pi IG1sd08SrPUubHd8ZtPAVh44gHQ5FRaCZ5zk38iKp8FYPbwBxVuFP1tW0yN65s/D85dq b205yf+LV7f7V1Qrds2EQwU/4XCm32pOeH33ePIYw5RUY1s445qdSw/sXqx40+eaExkZ cukR1NCNbtxPSq7zr0qW5PAm2HA1N2/wOp4MfPWrel45dgLA2Z1H87cu2MvMcVyulLMT IpTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=crnD9m0k; 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 jf10-20020a170903268a00b001a92a507187si527392plb.80.2023.05.22.13.12.59; Mon, 22 May 2023 13:13:14 -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=crnD9m0k; 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 S235410AbjEVTuo (ORCPT + 99 others); Mon, 22 May 2023 15:50:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235402AbjEVTuj (ORCPT ); Mon, 22 May 2023 15:50:39 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F93BCF for ; Mon, 22 May 2023 12:50:36 -0700 (PDT) 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 0066962AF3 for ; Mon, 22 May 2023 19:50:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D58A8C433EF; Mon, 22 May 2023 19:50:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684785035; bh=n3hkm02LXOePQNQAyKjmIwhyEzCueusGC98dUMzLcs0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=crnD9m0k8IK17T1hRcrALDIZrL2EZaxdKR6l3kSP9Sc6qK6RjlP+rnDSjK8su+7gY qLQ39mynAkbAdU554KNuGFPS4gpTofqUIUje1UTpXRXzfZSh0/i38G9ukA6du0PVv4 XtxmOpbdisIh/b5flVzP0OGOIbuUFMG9w8U+Hcpe+ZPymTX2XqqS6KcHVEnbEa8Lua 3Wlcd335L0P/WFlSdcuCjRAu2LVLKD4xC8qZ6W0tz/+sprXb865bayP075BDmJmZaA FUWK+9471aAPy7W3pj5VAtG0aoZrIZwG3QsH4LoJaVfiqdRTB6B6BUijwqEx+qvL8n ub8rfSp9miAwA== From: Arnd Bergmann To: Ingo Molnar , Peter Zijlstra Cc: Arnd Bergmann , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , linux-kernel@vger.kernel.org Subject: [PATCH 1/5] sched: hide unused sched_update_scaling() Date: Mon, 22 May 2023 21:50:17 +0200 Message-Id: <20230522195021.3456768-2-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230522195021.3456768-1-arnd@kernel.org> References: <20230522195021.3456768-1-arnd@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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?1766626577713077442?= X-GMAIL-MSGID: =?utf-8?q?1766626577713077442?= From: Arnd Bergmann This function is only used when CONFIG_SMP is enabled, without that there is no caller and no prototype: kernel/sched/fair.c:688:5: error: no previous prototype for 'sched_update_scaling' [-Werror=missing-prototypes Hide the definition in the same #ifdef check as the declaration. Fixes: 8a99b6833c88 ("sched: Move SCHED_DEBUG sysctl to debugfs") Signed-off-by: Arnd Bergmann Reviewed-by: Mukesh Ojha --- kernel/sched/fair.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 48b6f0ca13ac..2c1b345c3b8d 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -684,7 +684,7 @@ struct sched_entity *__pick_last_entity(struct cfs_rq *cfs_rq) /************************************************************** * Scheduling class statistics methods: */ - +#ifdef CONFIG_SMP int sched_update_scaling(void) { unsigned int factor = get_update_sysctl_factor(); @@ -702,6 +702,7 @@ int sched_update_scaling(void) return 0; } #endif +#endif /* * delta /= w