From patchwork Wed Oct 16 14:10:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thorsten Blum X-Patchwork-Id: 13838528 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 43930D1F9DA for ; Wed, 16 Oct 2024 14:11:55 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9ACB06B0083; Wed, 16 Oct 2024 10:11:54 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 95D006B008C; Wed, 16 Oct 2024 10:11:54 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 84B516B0092; Wed, 16 Oct 2024 10:11:54 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 6861B6B0083 for ; Wed, 16 Oct 2024 10:11:54 -0400 (EDT) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 67172A8D40 for ; Wed, 16 Oct 2024 14:11:34 +0000 (UTC) X-FDA: 82679653896.22.872A0AD Received: from out-173.mta0.migadu.com (out-173.mta0.migadu.com [91.218.175.173]) by imf10.hostedemail.com (Postfix) with ESMTP id 77C58C001C for ; Wed, 16 Oct 2024 14:11:48 +0000 (UTC) Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=pPfyjyTc; spf=pass (imf10.hostedemail.com: domain of thorsten.blum@linux.dev designates 91.218.175.173 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=1729087721; 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=ISSouLUnXFGN9ZwaMkrAb5KWVY6BF4Uow2vNhpvRt3E=; b=OuoSvGPmW17yhxG36uU1h+yHOrIBOiuJhrxOJFoskkqY1DDYHnjTK80EVo7Mf+vZOCyoUv 7KR1S1x1ckcJLokLjE1EjbjbyjGzARaGOgWAQ+L3ztfrZq/5TyiXyOEPC1x/FhFjtmGI16 5VC+KDUVV1ZCHtVtTbeznxISWc1XTlo= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=pPfyjyTc; spf=pass (imf10.hostedemail.com: domain of thorsten.blum@linux.dev designates 91.218.175.173 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=1729087721; a=rsa-sha256; cv=none; b=nIzGXzROB42A4/joKixfG6MsetJuZKYy+s808WckrAq+SiHFrx8QTaVOo73UdoNyRQ0aGG RYgQS5COBlyrKxS6dHPYYOSoCG4KmZDP2aPg0svLfA4qgaNqHc3Wt3uAbxKzYOeSYpLX4l 18FoMRh8ySXPoemNnOvnnVnKKWohpxg= 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=1729087910; 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=ISSouLUnXFGN9ZwaMkrAb5KWVY6BF4Uow2vNhpvRt3E=; b=pPfyjyTc5XObNE2yNXJIaGwKRfDXyEgZJRoxZ4Wrgi7yZKsJhQpRSo/k9GTKMo2BCiqYDJ CmYW8N6ow6bEdmb0P+MW3tCQbSD3B4j5jbEEuMOn1kAIqFep4Ipy6QsazABEB6DGccjP1P P5PuXFbrV53dmqB5lLkjqY20Z7B3jkM= From: Thorsten Blum To: Andrew Morton Cc: Thorsten Blum , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH] mm: swap: Use str_true_false() helper function Date: Wed, 16 Oct 2024 16:10:41 +0200 Message-ID: <20241016141040.79168-2-thorsten.blum@linux.dev> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 77C58C001C X-Stat-Signature: apny1bjs6mxo71u8bx81mcy39mj9j83k X-Rspam-User: X-HE-Tag: 1729087908-78520 X-HE-Meta: U2FsdGVkX18ieXN9hZ0rbMVaUsJGyp3kSiYbNcQ6otNDH8F+5JDp6L7zcgpyRNz0FfQkfkY4scTSLd7b0erB0P0lXEVlmZoplGFseqDC+jjnPmnQZJ+DebnVwmHs3ncj+G/0KC2DezrABdtwCjQhn5516Uv5DAYWyYVVit+wec/UwfdgdRVlT9b6DD3tx1eFaLnpirnbpKBOn/WcewAztI35JzPP56bn4pdEIXtwwboJM6qxpG+c4oZJ07Z6rLt4pjBDdMkhxkUKiLOArMJZ3wtIthj+k5/Y8rwMAWMRLLPugo0GFHsgi3pZ86Eha0Vv3nyQkSj+t8sBGyaxh1TiGdLFudO2eDt0ERoFlMFKv+nzjxZHRl0Ysxed9vsrvxv7LJjDPvUus/PwkzOl9FmjP8vKDEqngDMFO8xoVH8SOgeACuWWnFDVUszDFl9j3ZIy8r5wzc2XOex5xxEKAb4tplhXULBfTY6WqZ8W9jwKO2Bp7g+Hip42m2iQ2Imr3f/YfB6R/OU8xqhzKbVH8TQcZBaMNGOPEM46JEHmx9nm+nnTlvZ1wMndVXvemVQafl4dk7y1DSCplGD15qCuYK0p0DaS/D9/jsN04R2erL/luIR7UukYEe3k0yfRXw3Nst3vPKTzXphkNGultUFCVmdHqZeBs1kcTs5GDjopDIcw1SLBN8uWxl+qLzxskI5qAkl8xZXhnBOqj0WTbXXMSU/m7AJan6M0Lq/LMYHMOEpwuDOPrfBo1TDIx5/GjtZzujay67l4fjGOofFSAQWntE2ydsI6HBhHtwk1aY/aTIdaPjBvQ5gRG5OHTuWu5DKHr+8sWXTl9Wh/h+UEffyA2wnisgsT5ffZomHWdCvvRs5i/7nUv98z5MXqb9Rt0xp0dschdKxoohhRtnBCCDdBi6YBUNWDMm2I8ON8A5VeK4JSNzyVqK1vgoMcGiQBXi41GutoA608n30Ztx+bl1zJGlw 6sx6F25Z x0sx/NSDKbyK7q3Ndj4xbEONKLwm90su8tYoKchu56MUlfR1O7zV9v53edcUBXWtgdkAFqnpIsX1k0pD4yx2aX2iWXHtZrCujPz0OKu/dxsJXd96O6cWsXIy86aQThHHk7ep18EFkrKiNabri/9H7Tusps+5xOjkDsGGP8htVDPY0L8z1PrvpPbN1NA== 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 helper function str_true_false(). Signed-off-by: Thorsten Blum --- mm/swap_state.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mm/swap_state.c b/mm/swap_state.c index 4669f29cf555..e0c0321b8ff7 100644 --- a/mm/swap_state.c +++ b/mm/swap_state.c @@ -889,8 +889,7 @@ struct folio *swapin_readahead(swp_entry_t entry, gfp_t gfp_mask, static ssize_t vma_ra_enabled_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) { - return sysfs_emit(buf, "%s\n", - enable_vma_readahead ? "true" : "false"); + return sysfs_emit(buf, "%s\n", str_true_false(enable_vma_readahead)); } static ssize_t vma_ra_enabled_store(struct kobject *kobj, struct kobj_attribute *attr,