Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp5457167rwb; Wed, 7 Sep 2022 03:12:34 -0700 (PDT) X-Google-Smtp-Source: AA6agR5vCKMeAlzFiMmnZakvD8Fa4ltt6fW8NKDlcua4TH5vgvWIIwZk/eDJEock9FCrOJnw74Ua X-Received: by 2002:a17:907:94c4:b0:741:9910:9dd with SMTP id dn4-20020a17090794c400b00741991009ddmr1819183ejc.568.1662545554547; Wed, 07 Sep 2022 03:12:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662545554; cv=none; d=google.com; s=arc-20160816; b=hOGdus4nXY8picOx3Jo1u0p+CRWSFUfyYhFrjakochlw7V2mrlFXdBewaHQFiLls1i 3QEIQWhjNRKUsuGoRuXmn0f4zRU6tYOuWZLzTFRVf/kSBTwCr7c+CcqY3xzy8gLGgIJJ 7oX4HbtrXWBgtZJcWvNxPO4fmPIMzlb5W7FajIenO3vDmVMUcddtWhGKcxnVXvk++4y0 BtbjEAq65SeivEesIn/p1M4zTR5vbLzacrBmIlrHee5gYlvdrgFncAQumN/z8zBHuwFg 9td0qks3jfuMHdcC5ovDF6s3kV9/nLB4D0lrCNNOoWlOpzP2rnQfgaE70lOhf3xpqMRG Te1Q== 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; bh=RTaEF4Zrffeqdv0LQ7v71zOoI5YpXMkC+ZbOyQ15Vng=; b=MbFs6q2NG69axccWne8+c5pBp3z0QPCqmW40taSTLo939+8MzUUHQIDmwXo+JXe3Mp lt5w38dAYj7aDxTDBKnyBhz/JVvPsaa0tOzEJ0uYkWa+3J7KwWUrFb8hiy10MdossN76 OUMiiQkipvFHLAZ7mvuDgOzUXEaXmX4lcfDeHh/BvjBuDQP+paqos4Al5R7TFcdd73NU YRcHSf/d0UjAf9m1HHpOdDgXtud/3h/LL9+VhepXilIUY2gYsxe+MCnOqwVxSOzmGMpi HzX+nYKNoOfxh1CKWL0tKCeDkT/0apDiRLbG2C72UR3rXm7hgLHTNZYJJ+n9keAUxljV rjmQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dt7-20020a170907728700b0073d75db8e78si10842867ejc.64.2022.09.07.03.12.09; Wed, 07 Sep 2022 03:12:34 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230449AbiIGKAb (ORCPT + 99 others); Wed, 7 Sep 2022 06:00:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230079AbiIGJ7f (ORCPT ); Wed, 7 Sep 2022 05:59:35 -0400 Received: from mailgw.kylinos.cn (unknown [124.126.103.232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA018B7EF6 for ; Wed, 7 Sep 2022 02:59:04 -0700 (PDT) X-UUID: 9bdc8eb97ef345e3b24c13d13cebed45-20220907 X-Spam-Fingerprint: 0 X-GW-Reason: 11109 X-Policy-Incident: 5pS25Lu25Lq66LaF6L+HMTDkurrpnIDopoHlrqHmoLg= X-Content-Feature: ica/max.line-size 121 audit/email.address 1 dict/adv 1 dict/operate 1 X-CPASD-INFO: 044c42c310a74cff8dbd9cb65df565c8@eYRug2FkkWNdUKODg6axoFiVkpRpj4K Fd56GZmRlj1iVhH5xTV5uYFV9fWtVYV9dYVR6eGxQYmBgZFJ4i3-XblBhXoZgUZB3f3Zug2Vgkw== X-CLOUD-ID: 044c42c310a74cff8dbd9cb65df565c8 X-CPASD-SUMMARY: SIP:-1,APTIP:-2.0,KEY:0.0,FROMBLOCK:1,OB:1.0,URL:-5,TVAL:196. 0,ESV:0.0,ECOM:-5.0,ML:0.0,FD:0.0,CUTS:176.0,IP:-2.0,MAL:-5.0,PHF:-5.0,PHC:-5 .0,SPF:4.0,EDMS:-5,IPLABEL:4480.0,FROMTO:0,AD:0,FFOB:1.0,CFOB:1.0,SPC:0,SIG:- 5,AUF:7,DUF:4278,ACD:73,DCD:73,SL:0,EISP:0,AG:0,CFC:0.786,CFSR:0.037,UAT:0,RA F:0,IMG:-5.0,DFA:0,DTA:0,IBL:-2.0,ADI:-5,SBL:0,REDM:0,REIP:0,ESB:0,ATTNUM:0,E AF:0,CID:-5.0,VERSION:2.3.17 X-CPASD-ID: 9bdc8eb97ef345e3b24c13d13cebed45-20220907 X-CPASD-BLOCK: 1000 X-CPASD-STAGE: 1 X-UUID: 9bdc8eb97ef345e3b24c13d13cebed45-20220907 X-User: chenzhang@kylinos.cn Received: from localhost.localdomain [(112.64.161.44)] by mailgw (envelope-from ) (Generic MTA) with ESMTP id 2063516333; Wed, 07 Sep 2022 17:24:33 +0800 From: chen zhang To: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com Cc: chenzhang_0901@163.com, linux-kernel@vger.kernel.org, chen zhang Subject: [PATCH] sched/fair: fix a -Wmissing-prototypes warning Date: Wed, 7 Sep 2022 17:23:53 +0800 Message-Id: <20220907092353.65757-1-chenzhang@kylinos.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KHOP_HELO_FCRDNS, RDNS_DYNAMIC,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE,T_SPF_PERMERROR, UNPARSEABLE_RELAY autolearn=no 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 We get a warning when building kernel with W=1: kernel/sched/fair.c:11510:6: warning: no previous prototype for ‘task_vruntime_update’ [-Werror=missing-prototypes] Add the missing declaration in head file to fix this. And remove the unnecessary declaration in kernel/sched/core.c. Signed-off-by: chen zhang --- kernel/sched/core.c | 2 -- kernel/sched/sched.h | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index b60422300af6..5a354b4bcd0c 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -5874,8 +5874,6 @@ static inline struct task_struct *pick_task(struct rq *rq) BUG(); /* The idle class should always have a runnable task. */ } -extern void task_vruntime_update(struct rq *rq, struct task_struct *p, bool in_fi); - static void queue_core_balance(struct rq *rq); static struct task_struct * diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index f616e0cec20c..ae8554356108 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -2268,6 +2268,8 @@ static inline bool sched_fair_runnable(struct rq *rq) extern struct task_struct *pick_next_task_fair(struct rq *rq, struct task_struct *prev, struct rq_flags *rf); extern struct task_struct *pick_next_task_idle(struct rq *rq); +extern void task_vruntime_update(struct rq *rq, struct task_struct *p, bool in_fi); + #define SCA_CHECK 0x01 #define SCA_MIGRATE_DISABLE 0x02 #define SCA_MIGRATE_ENABLE 0x04 -- 2.25.1