Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp284148pxf; Thu, 25 Mar 2021 04:10:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxGfT4AlSlfix0TQT7PXR68xjVfae5wR5EwJBUXrTACbdXQwbG5gMBFOwnVv1OO4vF2smGH X-Received: by 2002:a17:907:2513:: with SMTP id y19mr8793448ejl.241.1616670631710; Thu, 25 Mar 2021 04:10:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616670631; cv=none; d=google.com; s=arc-20160816; b=nhXgo4z+xBXzS6XvhTNiPcYfX114b8bHIIiUDFBFNGi7TmL3z5a7JMAjkGVGpdblj1 hnIb+Yg07FPr3Y6rwF71wZN65aEm4tQX4AkMTQW2mJmk9p0WhEjSZIw9slSGqqVtvouk fQkqNdbJGFctyS1Voeh2EWg48IDRgczeO/d+xsHpoXQeenOERuGXK/XWBK0O2gjLbsL8 6JW/3aNNfMMkmlKPZDGIWkBMU2V90aruNUyhyAQxcYaWl3N+zEB6WKh6B1Sqa3OhmdH2 H4r6r0gMWqYzUkBubtcDZphqKWp4A8D+ZQXUpygR1uxmzwpLO/WmtetRKx+GkvvAGkqW bwmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=xNg4FYleL+r0sDNN8078foPUBcvMcbwC5+est4TqJsw=; b=NKzZTsS8990DD5AD2AiRNBM5LqAaVggMkggCS3ENbjNXFPduGFBRlJxXquUaUJr/Xi Wzx3CO9xq6FxAnVHgSuzpe6kBiRUCwc0cqldzDssbCmthrviwzHaUR1VgOEpMwcds1Wc 9ggfSnayZJOelw6GPIts8T2wmmaqk2HKNHzy7CP6bn/cZjjOjQk8bm4Sq47FEmOuwm4T BtXEfEV27pIql1mlmGb/x5+Cq6xSrXFyOAcbxm/zXCBUKh9SDxbSFI9Qt8T03QP6/jhn tql3xVG02qQxTQPDi/6xl39ugW0MFDXkIMbltre11+FzeQuTERh6yqzZ4A/Ol9adRQ// ZAow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=tYj2uQtV; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b="bslZ7v/T"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f18si3915182edr.449.2021.03.25.04.10.09; Thu, 25 Mar 2021 04:10:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=tYj2uQtV; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b="bslZ7v/T"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230043AbhCYLJO (ORCPT + 99 others); Thu, 25 Mar 2021 07:09:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35518 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229995AbhCYLIk (ORCPT ); Thu, 25 Mar 2021 07:08:40 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 157AAC06175F; Thu, 25 Mar 2021 04:08:40 -0700 (PDT) Date: Thu, 25 Mar 2021 11:08:38 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1616670518; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xNg4FYleL+r0sDNN8078foPUBcvMcbwC5+est4TqJsw=; b=tYj2uQtVSWmENkw8wW25U9YgLr0xyMITN+kftjSQ8HFQLANVvJNvq+LtUlQVq2JP5Lqlym 785R3GHKtqIOv5pd4buH4uogf7d6TLdJ97wtnkmU/N4ZtTBHqwVmVu2ydgr7HWR8UTxHvr dUMwUjswXOc56aQlxLVYTE82Xd9XAOqPML3TdByOTiYf81aURF39hMJjc2eQAhFD4VxqdN Q/bMaM3IHEXm8+5eqzPEsI8iaoEOdxWHXxC9cp8K0nbmxln4rmJ6YXYejkvNCsfDXnCaOY P4x4LDXwzXeiV5A1UfBKM7rludj/WpLrUspubAe5ajgIlUhPEu/Azczsq7hetQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1616670518; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xNg4FYleL+r0sDNN8078foPUBcvMcbwC5+est4TqJsw=; b=bslZ7v/TBklOBK/ZPlXSP+SwPSWHEwV4+lv68qBJBfdoLAQiixQIbjCTEBrwZVpghwiYxB NZ64g1xI7Vv6qpBA== From: "tip-bot2 for Rasmus Villemoes" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: sched/core] sched/core: Stop using magic values in sched_dynamic_mode() Cc: Rasmus Villemoes , Ingo Molnar , Peter Zijlstra , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20210325004515.531631-1-linux@rasmusvillemoes.dk> References: <20210325004515.531631-1-linux@rasmusvillemoes.dk> MIME-Version: 1.0 Message-ID: <161667051806.398.14556471814285205703.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the sched/core branch of tip: Commit-ID: 7e1b2eb74928b2478fd0630ce6c664334b480d00 Gitweb: https://git.kernel.org/tip/7e1b2eb74928b2478fd0630ce6c664334b480d00 Author: Rasmus Villemoes AuthorDate: Thu, 25 Mar 2021 01:45:14 +01:00 Committer: Ingo Molnar CommitterDate: Thu, 25 Mar 2021 11:39:12 +01:00 sched/core: Stop using magic values in sched_dynamic_mode() Use the enum names which are also what is used in the switch() in sched_dynamic_update(). Signed-off-by: Rasmus Villemoes Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra Link: https://lore.kernel.org/r/20210325004515.531631-1-linux@rasmusvillemoes.dk --- kernel/sched/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 3384ea7..1fe9d3f 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -5376,13 +5376,13 @@ static int preempt_dynamic_mode = preempt_dynamic_full; static int sched_dynamic_mode(const char *str) { if (!strcmp(str, "none")) - return 0; + return preempt_dynamic_none; if (!strcmp(str, "voluntary")) - return 1; + return preempt_dynamic_voluntary; if (!strcmp(str, "full")) - return 2; + return preempt_dynamic_full; return -1; }