From patchwork Mon May 27 23:45:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qais Yousef X-Patchwork-Id: 13675938 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 98AC5C25B79 for ; Mon, 27 May 2024 23:45:28 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 459606B0093; Mon, 27 May 2024 19:45:26 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3EE6C6B0095; Mon, 27 May 2024 19:45:26 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 259BD6B0096; Mon, 27 May 2024 19:45:26 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 071706B0093 for ; Mon, 27 May 2024 19:45:26 -0400 (EDT) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id B7E1116070A for ; Mon, 27 May 2024 23:45:25 +0000 (UTC) X-FDA: 82165809810.21.C8CDCEF Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) by imf15.hostedemail.com (Postfix) with ESMTP id DF7E1A000B for ; Mon, 27 May 2024 23:45:23 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=layalina-io.20230601.gappssmtp.com header.s=20230601 header.b=kMF26z0S; dmarc=none; spf=pass (imf15.hostedemail.com: domain of qyousef@layalina.io designates 209.85.128.41 as permitted sender) smtp.mailfrom=qyousef@layalina.io ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1716853524; 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:in-reply-to:references:references:dkim-signature; bh=HNry0zoFn66IZX3uvbz/6TnygFqmohU9To85tOy+8kg=; b=5TuQH5T3fJX8z145sXkhvIhW9EzrodFfojn2R13kNj3YddKo8uVwy/30dBG6rf59LoKqOD 9hFLY5ZSq+Bb7JPRFVxW2OMN4W6/HfbZB8sUI1OG9WS1ENwrNzJdBQOEjQgC5GhPYN3N2c qMoxjeGz2IXugkqnQ1qhSnxY05S4Fxw= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=pass header.d=layalina-io.20230601.gappssmtp.com header.s=20230601 header.b=kMF26z0S; dmarc=none; spf=pass (imf15.hostedemail.com: domain of qyousef@layalina.io designates 209.85.128.41 as permitted sender) smtp.mailfrom=qyousef@layalina.io ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1716853524; a=rsa-sha256; cv=none; b=UDJo7ybXjsJmCz+XX4uCCFk1mVIXzS6CDGDUqHT75A1EL3B2Fr0Y0nhAMwoyprNg2ka7+X 53K9NtwNvtFhTJA1R/QY5pMP3euVcDEFKIT757R2NRB5TnA2mOKPrbf7oIUMDi5ZHaSm0Y A83aIjTIsttfYJMH0Z3p+LoaItTx+HM= Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-4202dd90dcfso1593275e9.0 for ; Mon, 27 May 2024 16:45:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=layalina-io.20230601.gappssmtp.com; s=20230601; t=1716853522; x=1717458322; darn=kvack.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=HNry0zoFn66IZX3uvbz/6TnygFqmohU9To85tOy+8kg=; b=kMF26z0S/mjOQ8+px/JhFa/YCcmca4b1jt6insHcJ4NQz0HpzT7+tnUNdsWAD06esP OIwAmjqmDM9wLrzBl4KDQvpheImGCRFSA1TrSOVXdgCBKdu/ZqfmJgbstApRzIjrxzEb /W22cLDDRKZgVcUIUaYIyHzR/sBQqJhA/Z04kDk3+rv2wBL2iy3AjzOL/NQg2le1LcK5 ua0DB/UfPi8IOG0fXL2MPUAH1mjg8BNuQEX9bo3U4qHBAciz75r9OU3A/DtcjTDfatKR lUVTInlQ7QLFy8d7PTRSUgbRV6bCWv3XrsglD/hZehUnh2E8vhIQ0I1FI/2L8uC0qh41 rPcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716853522; x=1717458322; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HNry0zoFn66IZX3uvbz/6TnygFqmohU9To85tOy+8kg=; b=eNnfQoapclgo9B9HroQoD8kLMI9+Su2mzCkC0PXnD7oytYmocAGBL+/Hk6cZETesxB NRAw5qdT7QyLBlVYYXvb5TlZ8HhZ/pjoXWMrC03ZNhZCCMErElKWvj9IJ5DeO/uwmp56 ONb0DMGM6RvxJNIOlH5AceJKdD92ufvPHFFcMwkancjNPnvcwd6AnCCQTM4PqhNoDFTs FPwB1bYe5pCtU2B/ektStRdmAmOjUpfDFMUOc2rY3Sab3w5RtSs8ZoXB9giszQUTty0K dQrUES5t04jXFfoa4Gbwy+bxlLwDEbKgU88pOPIHPhqk33dLelE4OVoUl6gey3cox7yy HBRQ== X-Forwarded-Encrypted: i=1; AJvYcCU8UkwuDVImJ1tXtuGl2syTCRhcAh4jZVwyihVx+cufSXFEQSkOchKjYWsUe7ogFiFqm2ySxdNcgZ5N2vp1zWkrT9U= X-Gm-Message-State: AOJu0Yy5PLiY04ioUeIya8K+uFDIr8q88Kiscothh0vd1ebu2fR1bwO1 rDaVuIZxDLidZzZ4yKhdOBlVlOphU9LlHcQQLXzXkPJJHyG6OMYiht1w3r2InLI= X-Google-Smtp-Source: AGHT+IF9T8Y/YkvAOvS0rS97TuRQ2Ix59hiyfEGtGD745/9EUk8XFN2C3Rg4A4HSPq7FUd53hxMojg== X-Received: by 2002:a05:600c:4f94:b0:41b:fea6:6526 with SMTP id 5b1f17b1804b1-421089f8d2cmr66410055e9.33.1716853522480; Mon, 27 May 2024 16:45:22 -0700 (PDT) Received: from airbuntu.. (host81-157-90-255.range81-157.btcentralplus.com. [81.157.90.255]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42108970967sm123535515e9.17.2024.05.27.16.45.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 16:45:22 -0700 (PDT) From: Qais Yousef To: Ingo Molnar , Peter Zijlstra , Juri Lelli , Steven Rostedt Cc: Vincent Guittot , Daniel Bristot de Oliveira , Thomas Gleixner , Sebastian Andrzej Siewior , Alexander Viro , Christian Brauner , Andrew Morton , Jens Axboe , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-mm@kvack.org, Qais Yousef Subject: [PATCH v3 3/3] sched/rt, dl: Convert functions to return bool Date: Tue, 28 May 2024 00:45:08 +0100 Message-Id: <20240527234508.1062360-4-qyousef@layalina.io> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240527234508.1062360-1-qyousef@layalina.io> References: <20240527234508.1062360-1-qyousef@layalina.io> MIME-Version: 1.0 X-Rspamd-Queue-Id: DF7E1A000B X-Stat-Signature: e8iw5zd3198n61mebzgn3dcr6hefypcb X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1716853523-950254 X-HE-Meta: U2FsdGVkX19+M+tuMB7TtPGVdIJ+/FXmcLiJcF3LZz2WRBcOIg1QPGhJlLqFopAyRwj8+K9HhHXFrZxJ4hopf9RhK4xNBagBek5Hv1R9luJNvUOqMiGSxLhuzwlW0iWF6YbRwV3UkDcU/dF3TK0xmJQZYVZmDPgwgqv3HcD/OUlsJOD2/1i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Q8r/bAIYGKfu+OZjIsQtKWgsSYY3P9EwUhp0AjAhPFDlYjhGPFLefPglY+Z/VDfN9TMDKXerYetbNr57jOFb1ybzm0aVLsmT2Xx29bPT7lkL/hcNl/+00Bplb+IJXEkxM+Z2q1dgqm1hhRD2+5ajcQN+pUhE6C8tt83N X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: {rt, realtime, dl}_{task, prio}() functions return value is actually a bool. Convert their return type to reflect that. Suggested-by: Steven Rostedt (Google) Signed-off-by: Qais Yousef --- include/linux/sched/deadline.h | 4 ++-- include/linux/sched/rt.h | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/linux/sched/deadline.h b/include/linux/sched/deadline.h index 5cb88b748ad6..87d2370dd3db 100644 --- a/include/linux/sched/deadline.h +++ b/include/linux/sched/deadline.h @@ -10,7 +10,7 @@ #include -static inline int dl_prio(int prio) +static inline bool dl_prio(int prio) { if (unlikely(prio < MAX_DL_PRIO)) return 1; @@ -21,7 +21,7 @@ static inline int dl_prio(int prio) * Returns true if a task has a priority that belongs to DL class. PI-boosted * tasks will return true. Use dl_policy() to ignore PI-boosted tasks. */ -static inline int dl_task(struct task_struct *p) +static inline bool dl_task(struct task_struct *p) { return dl_prio(p->prio); } diff --git a/include/linux/sched/rt.h b/include/linux/sched/rt.h index a055dd68a77c..78da97cdac48 100644 --- a/include/linux/sched/rt.h +++ b/include/linux/sched/rt.h @@ -6,14 +6,14 @@ struct task_struct; -static inline int rt_prio(int prio) +static inline bool rt_prio(int prio) { if (unlikely(prio < MAX_RT_PRIO && prio >= MAX_DL_PRIO)) return 1; return 0; } -static inline int realtime_prio(int prio) +static inline bool realtime_prio(int prio) { if (unlikely(prio < MAX_RT_PRIO)) return 1; @@ -24,7 +24,7 @@ static inline int realtime_prio(int prio) * Returns true if a task has a priority that belongs to RT class. PI-boosted * tasks will return true. Use rt_policy() to ignore PI-boosted tasks. */ -static inline int rt_task(struct task_struct *p) +static inline bool rt_task(struct task_struct *p) { return rt_prio(p->prio); } @@ -34,7 +34,7 @@ static inline int rt_task(struct task_struct *p) * PI-boosted tasks will return true. Use realtime_task_policy() to ignore * PI-boosted tasks. */ -static inline int realtime_task(struct task_struct *p) +static inline bool realtime_task(struct task_struct *p) { return realtime_prio(p->prio); }