Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp756651pxb; Fri, 22 Apr 2022 10:29:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyvH9vHvpGQAfvpYBsGXusE80e3kTil6pyDMdaOPdl4i8UoPycXaB+H5Gq1gsExw+nDTwfX X-Received: by 2002:a05:6a00:1988:b0:4fa:c15d:190d with SMTP id d8-20020a056a00198800b004fac15d190dmr5953097pfl.44.1650648551020; Fri, 22 Apr 2022 10:29:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650648551; cv=none; d=google.com; s=arc-20160816; b=zGX5pZDvcu8EJBfBDWXZ5p5pyTK9rA7iXNiATh2vu/0r9VcQ0qLB1q1pjLIKrBHcUP Y/HTuV4O2K2DySDE1Uc8LXuyrSi2rBWL4Z4rHtRpZWE001zI0NZAULZH/2GxPzsyF60C gjZ1AT4tDyytC9fIvvQcgcxMOwC7vGXBBXP6zNnGDi4K19o9vg1N+0ikJRYa6lV0ASZ8 8mwxjgR450hLDaezdFxcenD6K97ZHmb5/pNP5YNIarXbG1tko4HQy87EVjNFLdp1kAM5 5T7nyh1iSsQLoPp8lIMPEtMA6XZQp92uyn8Q6WpClIW47KfLtzZSGonFH9cCNK0JsYzV en7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:content-disposition:mime-version :message-id:subject:cc:to:from:date; bh=a1Tjq3vyZzQ/5T9etWxxCAsjSa2GFgE4pHecXHOwSlU=; b=P9k7PylUihEgpzC8MtGzaGMjrW4+oqUFoYDI8OwvVxb+TuWkmAA4hSK414lwQwjFLz 3vVVTY5S+QOnIDzHSv0IV1953/AT9iOIn13ZkWREezNxD9Tnv8DPtdQqhKViXahejHBd P0dHLEoU3XVOSzAWTO9JRoucWaFK/XzYWsqMalJuPf60xR4J+TuQa8eXMBkpuQryz3T7 cEQI8FATF+TwuidUflMltReGvyyz0iREelrqRJGxVsMFoN8G8BYSUohDFDU3yZ3tYoAT ZOyuZpLfVTYWJjMraauNXL5FtW96b/dnpxZXC3Bf9p7N40X7z5aZIZ9/bskk6sO2B0RA yqDQ== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id k13-20020a63ab4d000000b003a9ee7f8defsi9253923pgp.295.2022.04.22.10.29.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 10:29:11 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 008E7A7759; Fri, 22 Apr 2022 10:22:20 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1444876AbiDVHjG (ORCPT + 99 others); Fri, 22 Apr 2022 03:39:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345405AbiDVHjB (ORCPT ); Fri, 22 Apr 2022 03:39:01 -0400 X-Greylist: delayed 1715 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Fri, 22 Apr 2022 00:36:09 PDT Received: from localhost.localdomain (unknown [219.141.250.2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 22C0C50B02 for ; Fri, 22 Apr 2022 00:36:08 -0700 (PDT) Received: from [127.0.0.1] (helo=localhost.localdomain) by localhost.localdomain with esmtps (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92.3) (envelope-from ) id 1nhnNr-0006Hd-Mq; Fri, 22 Apr 2022 15:07:15 +0800 Received: (from root@localhost) by localhost.localdomain (8.15.2/8.15.2/Submit) id 23M76wCn024156; Fri, 22 Apr 2022 15:06:58 +0800 Date: Fri, 22 Apr 2022 15:06:58 +0800 From: Li kunyu To: Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira Cc: linux-kernel@vger.kernel.org Subject: [PATCH] sched: Optimize unused integer return values Message-ID: <20220422070658.GA24149@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE 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 sched: Optimize unused integer return values Signed-off-by: Li kunyu --- kernel/sched/core.c | 3 +-- kernel/sched/sched.h | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 51efaabac3e4..a71d09d6bb75 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -5491,11 +5491,10 @@ static void sched_tick_stop(int cpu) } #endif /* CONFIG_HOTPLUG_CPU */ -int __init sched_tick_offload_init(void) +void __init sched_tick_offload_init(void) { tick_work_cpu = alloc_percpu(struct tick_work); BUG_ON(!tick_work_cpu); - return 0; } #else /* !CONFIG_NO_HZ_FULL */ diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index 8dccb34eb190..850e25f7460d 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -2326,7 +2326,7 @@ extern void post_init_entity_util_avg(struct task_struct *p); #ifdef CONFIG_NO_HZ_FULL extern bool sched_can_stop_tick(struct rq *rq); -extern int __init sched_tick_offload_init(void); +extern void __init sched_tick_offload_init(void); /* * Tick may be needed by tasks in the runqueue depending on their policy and @@ -2346,7 +2346,7 @@ static inline void sched_update_tick_dependency(struct rq *rq) tick_nohz_dep_set_cpu(cpu, TICK_DEP_BIT_SCHED); } #else -static inline int sched_tick_offload_init(void) { return 0; } +static inline void sched_tick_offload_init(void) { } static inline void sched_update_tick_dependency(struct rq *rq) { } #endif -- 2.18.2