From patchwork Thu Jan 16 20:42:16 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thorsten Blum X-Patchwork-Id: 13942282 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 5919DC02183 for ; Thu, 16 Jan 2025 20:42:35 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A1F586B0082; Thu, 16 Jan 2025 15:42:34 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 9CEF96B0083; Thu, 16 Jan 2025 15:42:34 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8968F6B0085; Thu, 16 Jan 2025 15:42:34 -0500 (EST) 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 68B576B0082 for ; Thu, 16 Jan 2025 15:42:34 -0500 (EST) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 1926D1C7766 for ; Thu, 16 Jan 2025 20:42:34 +0000 (UTC) X-FDA: 83014488228.08.5A3638B Received: from out-175.mta0.migadu.com (out-175.mta0.migadu.com [91.218.175.175]) by imf26.hostedemail.com (Postfix) with ESMTP id 6BC5B140013 for ; Thu, 16 Jan 2025 20:42:32 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=JMGWI+uf; spf=pass (imf26.hostedemail.com: domain of thorsten.blum@linux.dev designates 91.218.175.175 as permitted sender) smtp.mailfrom=thorsten.blum@linux.dev; dmarc=pass (policy=none) header.from=linux.dev ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1737060152; 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:references:dkim-signature; bh=Ovyegd+SvQDVW3xzfKBYSdbeEeBaZAIftFZmgrwXI4k=; b=yF7IMvfto8G10EhU7mnX8r8HuMVbitY8iqHMKu6vEiihuq/PxtX3qtPHHKB48ZF69vAhB+ lnzW0etMs52tKrcm7yhFTiMD8UTWPxD/HztEaHAushPTKf6mkEYifBf89UNueTq2CPgDrg DyXi7zNeo9Pk6Qc8/RPaAONRPY2EsRg= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=JMGWI+uf; spf=pass (imf26.hostedemail.com: domain of thorsten.blum@linux.dev designates 91.218.175.175 as permitted sender) smtp.mailfrom=thorsten.blum@linux.dev; dmarc=pass (policy=none) header.from=linux.dev ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1737060152; a=rsa-sha256; cv=none; b=SuhYGqoc2fS6g+dy3QcTZhA1dFiP1t+UYjBO/LjaP7vWQQhKsjE8dUdBG6VLxeJXwvX+vi I5peAqTgJ2sy1nQZgp27r3i1fMopYF+IfFYS5zy0Bmk9ebxsBZQ2Uwqmz+ABbGXR18E5ss DkaBBLTjZg3TzTCSYaBYlyrYGI8hinU= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1737060145; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=Ovyegd+SvQDVW3xzfKBYSdbeEeBaZAIftFZmgrwXI4k=; b=JMGWI+ufxbq+srbVP08mzl0Qzpsoc26wVhXrxnI5jZItLF7IJ8PuYUijnezdFe6nqLfMEW 2c+6Nxu/0gUbJhsF8CvpwmHTUYBLqEAmaEbsHJS2A+jvGF7ZBFhyJjjCXXpcFAYnmtbjSl c1UXgCfJIJTkgGQoLiI7+hneDN73WME= From: Thorsten Blum To: SeongJae Park , Andrew Morton Cc: Thorsten Blum , damon@lists.linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH] mm/damon/core: Use str_high_low() helper in damos_wmark_wait_us() Date: Thu, 16 Jan 2025 21:42:16 +0100 Message-ID: <20250116204216.106999-2-thorsten.blum@linux.dev> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 6BC5B140013 X-Stat-Signature: sr81fgoytgmwipj5m8c31qg3jyozzxmx X-Rspam-User: X-HE-Tag: 1737060152-964815 X-HE-Meta: U2FsdGVkX1/67PyzasxrBUfoXNzeP9WhaESEkUIZ5vcPB7Jaw+bPqAbB6pVYdd0idaIzin04yZGc+DABxcx9D4epp7HV9i5GxANNDc4aHE83eLcm5C3e4ntl/+zRN8A8Z8fMypAzqaRA9Iy4MLTACH7rcbpvY19SiK2Ofl9pBrMsKu7IoSoZqQLMK+3ErKNuIQyL2jxSOqInIW6RYMcy/19Rp6HmMEEsfZMycqDN/VLvEkrSVYtw0ExMronKM6o7ULi/itnR++/5B7w+nameyn+CSb8vNlXJ14R62ueOkG0h+O9wDZkEedshlcDyCXfQrteNWm0yF9qrL3NsSAKAg9F+76sGv6bp9/CgzE6Dx4WzTuxV+Ojk1BlWxC8+KKIAlux01Qmc/9UqeGA59ybxVyhTZpnw7EVV+P0/kgCwLCX1TGxoR/zyalCNAF5uQSXgNyGoClyMCN1vAIdBn8RC0F8B1MYzy8Uv80+3yD0QSJbSs7QzP0W2QVpuyEauJmUwciHyPVOEz+M9EtP+J+pREudhu40M2Qjj4a969quLRpNmBKnrtxKdlYtOkKqQCUO1mF6uo13vXPW0JqQOwgNcfrfikA3FwvIba0jS3tBTRW8yVtBDJrVWQZ8uOydTdEO3Vrc1x/7TBSZGsNCwbz5M6su848gMa8/SEb3hbJvHjqOig0NtBKOGzHPqEP/pvnjgyXbK+6wa4Zp9k45ALsDWvyjjhH/XyVIwclbA8Z4OuNgEV1SgQYYl/qLr3iYC3mhqRFlWI1uLY66A9kcLpTu2jWEtm65gMjj15xo3nNIz5ZgOX4JMTP3FZeR+nk9cjLLb/lb8wRG4oODopQJwJ9zF6DAiR+GBBfy8nUBP5uXxoDIhITn8xAA2CBfRBTrnknymy/3C4FKeiNceYThldypadxLOZOsLitP/TVx86D1XDy85eEEcxcZzKR6qGs7hbBcLQGRQXg7u8aPpqyYzfkS ZL2Bx43a zLsK/BOhsHOOPozb+ncT1es2qjqP+x8VNFOoAlsBzqvEG/qLErTI2L427Q1gZqBFAdcE4LyZkXTtFTPRRgTrAym0qn23rzF5gfEqmGAsBvQIImb7A5QHfrdTl9a1aYAO+nmZv3hAMbVcDffW26j7RlBVkFk7h92w4dYTR8hkYYHxvBrQz6TOYMzvtqDfgGcmbpaeCTsYW70P5knq/ICsn4rh/bw== 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: Remove hard-coded strings by using the str_high_low() helper function. Signed-off-by: Thorsten Blum Reviewed-by: SeongJae Park --- mm/damon/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mm/damon/core.c b/mm/damon/core.c index 0776452a1abb..ae1715a338d4 100644 --- a/mm/damon/core.c +++ b/mm/damon/core.c @@ -14,6 +14,7 @@ #include #include #include +#include #define CREATE_TRACE_POINTS #include @@ -1894,9 +1895,8 @@ static unsigned long damos_wmark_wait_us(struct damos *scheme) if (metric > scheme->wmarks.high || scheme->wmarks.low > metric) { if (scheme->wmarks.activated) pr_debug("deactivate a scheme (%d) for %s wmark\n", - scheme->action, - metric > scheme->wmarks.high ? - "high" : "low"); + scheme->action, + str_high_low(metric > scheme->wmarks.high)); scheme->wmarks.activated = false; return scheme->wmarks.interval; }