From patchwork Mon Nov 4 22:27:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Keren Sun X-Patchwork-Id: 13862180 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 26016D1CA06 for ; Mon, 4 Nov 2024 22:28:09 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A11546B0098; Mon, 4 Nov 2024 17:28:08 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 9C1596B009A; Mon, 4 Nov 2024 17:28:08 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8890A6B009E; Mon, 4 Nov 2024 17:28:08 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 69B4F6B0098 for ; Mon, 4 Nov 2024 17:28:08 -0500 (EST) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id E7104120C11 for ; Mon, 4 Nov 2024 22:28:07 +0000 (UTC) X-FDA: 82749849588.17.4AB53D9 Received: from mail-yb1-f202.google.com (mail-yb1-f202.google.com [209.85.219.202]) by imf08.hostedemail.com (Postfix) with ESMTP id 965BB160029 for ; Mon, 4 Nov 2024 22:27:44 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=1yBg0+v9; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf08.hostedemail.com: domain of 3dUopZwgKCO4aUhUdikdWeeWbU.SecbYdkn-ccalQSa.ehW@flex--kerensun.bounces.google.com designates 209.85.219.202 as permitted sender) smtp.mailfrom=3dUopZwgKCO4aUhUdikdWeeWbU.SecbYdkn-ccalQSa.ehW@flex--kerensun.bounces.google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1730759227; a=rsa-sha256; cv=none; b=RoJivbp0VX7hTQoNIdEh8jOAfD+q71//PHSHzBj8tnnAwUhYhXILym4PGFnzAQESvKvJxG AtjIIm66V7X6jbe2G4eDT1IBMsXi+rGkz93GIk8tXZhIz2WYdudpJspqN/v5NpzjDEy/5C CckUlTYGkBVSekfUFGjyYPb1gvXMoNw= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=1yBg0+v9; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf08.hostedemail.com: domain of 3dUopZwgKCO4aUhUdikdWeeWbU.SecbYdkn-ccalQSa.ehW@flex--kerensun.bounces.google.com designates 209.85.219.202 as permitted sender) smtp.mailfrom=3dUopZwgKCO4aUhUdikdWeeWbU.SecbYdkn-ccalQSa.ehW@flex--kerensun.bounces.google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1730759227; 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-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=9Y1rurBWlXkBJ5QujXdpx9YV8mvueM8qn9kB2Iz3Dps=; b=jrGI3r3OgzAlcYhZZ1xYlEOhk6bD87mG20xPQ7RzHj7DjTwcWugHU9Sr8UQhZHijsAL0mG NvYtqr+KIyYSAn9lEpJgcIUF/7lQFgBoFEi83Lnkpvc2O7RHWLsjqp/xjE7o9+3oP7sWJI bHXeeJXV1FEmbiizD3KgNEkN4s3GP6Y= Received: by mail-yb1-f202.google.com with SMTP id 3f1490d57ef6-e290947f6f8so8519850276.2 for ; Mon, 04 Nov 2024 14:28:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1730759285; x=1731364085; darn=kvack.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=9Y1rurBWlXkBJ5QujXdpx9YV8mvueM8qn9kB2Iz3Dps=; b=1yBg0+v9j2gIB56tmglA23RJ/RLEl2JPuJ5+D/BuLtyvkgrS9X1Y7AkofrkR48Cq9J PsucRtuHLXSCucy/XKuSgCK9Jr7nPik+MMEAZi+3XZYoENmS/npwirsVXMPTVwB1ov3Q +fKPTTZTe12wyT9GvJqOM07YwszN2OON4iX+qSGdo/+jQ2MPvMBo3/r8XlIP8PAX9odK stAllgeRGu6SoKWpjtSDEmRAVLZlym2mGcv460vA/5BTvQdfzPjKM1bUXYnVQijwGTF2 chjTweSUAP0B6bJ03P0wMvgfIJgKVOUyyYcLMP4FwrfGZxx00AHu2XYgNqBjnrQh1ZmM 0ZBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730759285; x=1731364085; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=9Y1rurBWlXkBJ5QujXdpx9YV8mvueM8qn9kB2Iz3Dps=; b=XnhJV7K24AMhf5lRBr7eMVkDW5OxKtl8RPpxjSZs9j94PVPLtT/pZY7WDtqddTYBTj 6xJKJqmRkgvW+drZx0oklFMv3hFikeRGwcOgOUvmZvX+FsQBre+8f1eXYhe00WC+INE0 KL+v1D9xwf5P6N2hNZcKu7wsudPRdkZAzqnZw/p/Swsao79rXDp6qP+ulOwEU727OILW Kl4dTvwaU+CZI9+X955WG7poeZJ+nZlKc43xq4fhiniRwKbvxC+SwG3G3T0e5scfuBpZ 1MBw4bFNz+D+8P3BNfSjrrfhQCxe5Vl50LmdPrwffUb1k8Vsuo6LqsP2+FPYLHMCa0sP IpSw== X-Forwarded-Encrypted: i=1; AJvYcCW1IgzHAYFjNwvt1L6LyScm9FTMbS0teQRvx4bYnk2ir/oE6BaovT0/qdVYuzZt7U0h1XdGVMnWpA==@kvack.org X-Gm-Message-State: AOJu0Yxm8F+9pEvZHiCxeL07XusWDYIqeDqwcQuvXw3xTNTKIGkKQC5s D8ocYMXKP9uYOTACEsNBoDwuLYH9bl442KUvzX73pDfHUmPFvUuouZ6e+XuYgWDhoXE2SpH9I6Q U6dLjHZA0sw== X-Google-Smtp-Source: AGHT+IFYKOaIjpS8Fz6C5WIVgYJMz0Emr23R1GgYJzZPyhN+IxJ95BqWZNBsDFRPvDl3JbnLJUB3ze0a9JPbmw== X-Received: from kerensun.svl.corp.google.com ([2620:15c:2c5:11:2520:b863:90ba:85bc]) (user=kerensun job=sendgmr) by 2002:a25:b324:0:b0:e1c:ed3d:7bb7 with SMTP id 3f1490d57ef6-e330253c596mr9576276.1.1730759285167; Mon, 04 Nov 2024 14:28:05 -0800 (PST) Date: Mon, 4 Nov 2024 14:27:34 -0800 In-Reply-To: <20241104222737.298130-1-kerensun@google.com> Mime-Version: 1.0 References: <20241104222737.298130-1-kerensun@google.com> X-Mailer: git-send-email 2.47.0.199.ga7371fff76-goog Message-ID: <20241104222737.298130-2-kerensun@google.com> Subject: [PATCH 1/4] mm: fix quoted strings spliting across lines From: Keren Sun To: akpm@linux-foundation.org Cc: roman.gushchin@linux.dev, hannes@cmpxchg.org, mhocko@kernel.org, shakeel.butt@linux.dev, muchun.song@linux.dev, cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Keren Sun X-Rspam-User: X-Rspamd-Queue-Id: 965BB160029 X-Rspamd-Server: rspam11 X-Stat-Signature: etzsido9u7scpcqe81qjcbenjd6qjoib X-HE-Tag: 1730759264-434530 X-HE-Meta: U2FsdGVkX1+ZXZyxsO+X2MJwB8m07R29XyPdpjVDse9xsYtxN8eBghmPD/6n74mDcQRMNc79oZo4APSpDG1Ibhq7uVnImK2SPK/asxdyy9QJ5+QxceT7D4sljKZn1iinVJ2uuKPnG34L+K2KKztC2xF2gj87zXN4f8dMEo2afeZbRpCLr1Wr5/SupWLdcvh9KrMPHk/yHoJPj5WkUiq6bTQtD90BH9CdIjRwM2Edy8n5uIOx1t+FL8IPS1Gea8XaFaUyDv8zE/ARz7vGwPYpMHylazs+FX0D8OmskDCbGSAxUJC3sRcRNURVJqpm1u5Uz+9Gxeq+qGJ1kd1y4pPSCQec95Fq35K1gyPuYy9eF/lGqxmPzEZuPtAE4ExW/tPDJzJyWp0mTJ3Af0iEyl91TsWuCS6R+G0B2RqvKuxfoJnoqaAEgFBNlitc/p6owFEWPf/dlkXILgX/w6KXr6Mt3qP0awGyAbJZsHm8ETRYKbkVeLMcJZ4ekK0QLNGAGjKnUQ2pDm3aVqxyD+q8zz6aZt2i0b//yN+7wUtmRZZ2E9/4XRGuIIj6JJdDdlkAa6OfvG/EH4HCnOesaf6Nu3PgGaTyeCX1ZjVqz2LPpwCmvhqBqcd0KQb9lRnmGNzhwzpuBACBG3QSjozeznUVzEcsixJUNlakAV1mRC7y9VoS7h/egrqxBDEAnaqOQ0E+laGIRc/FSFh9I0NQYgbiZplb6cFE61TV7g+x3Gef8QZtR3aqumyHXY1hiFtSrytRWL8HVbCbopSg05IrEz80jpcpTVAimupZLyMAsOyFIt/TSYDkkVvm3C4UUvq++WX7J69fCJ8dD3oXjkrml8DYemEoXHrGTut6LhtPil/9S8QT/6cn/a80oLItHp96vw/uufR+jTweIgVFvVm/SZQebuSt5FGTatksA1ukMM4YI0Mf2lX0UdtEvE/AsjLLpPlnpeSZ+YuFSgjPNysLqRGZE73 Cz/tnY+0 wX/4V9zOz0cQAUopwjuE3rG225iFra1B2KMyWWv4LfyXC4/QrMbk9Nqvfaqxn8FGJZZGaz0QM1emCNpfTT7GvAGEJuAiMvIryt7dszC4AzjG+we/YDo8dU39bHBasgDkPungJm9YVvHNnTR5hPOOtAq4Gvw7BOFP7ZmOdUhJ5r9wqT/dLvD4CYz8KrM/yKfN/ZUugV8SWozB0jG/5mOEZbVnTAhswR4FZFmIjRwF7Q0hKKKSrD6YejGShSmmMmGRMxBRpNIFwOZRuoX6/Jmv9DCxW4kg4+jQ9MW1MVF2tWC/RRl/M4whRUgQo0Iw5BCuYrKMcHRDIgeS2BAfshjShO10+vbwlVDFVO2FV+VOQ8obobUM+geWSfR6Ny+f+l8r7AIXVtuzODFWsp5Wl2kyaSdLtnpLlVXTv9yD9SNjtKjyCTOkPIyiOxW+oNT6wHEDkm2kw5UwwYv7kZNwFlNFWhCbNlpcOzyWIJpWwz+swz6HDtoaFHL2Kh/zjedFfDHRKcdUyej74QWsQXJGK+LLnt+N/UqVWOU4D7iiC0zApfaU7dD4eNmrvtjxf3+VBHsPJai2MVsXufrB9X6FPKNovmZY9ganM6fpftIBSEpLQaeeANWc= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000006, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: This patch fixes quoted strings splitting across lines in pr_warn_once() by putting them into one line. Signed-off-by: Keren Sun --- mm/memcontrol-v1.c | 33 ++++++++------------------------- 1 file changed, 8 insertions(+), 25 deletions(-) diff --git a/mm/memcontrol-v1.c b/mm/memcontrol-v1.c index 81d8819f13cd..3951538bd73f 100644 --- a/mm/memcontrol-v1.c +++ b/mm/memcontrol-v1.c @@ -602,9 +602,7 @@ static int mem_cgroup_move_charge_write(struct cgroup_subsys_state *css, { struct mem_cgroup *memcg = mem_cgroup_from_css(css); - pr_warn_once("Cgroup memory moving (move_charge_at_immigrate) is deprecated. " - "Please report your usecase to linux-mm@kvack.org if you " - "depend on this functionality.\n"); + pr_warn_once("Cgroup memory moving (move_charge_at_immigrate) is deprecated. Please report your usecase to linux-mm@kvack.org if you depend on this functionality.\n"); if (val & ~MOVE_MASK) return -EINVAL; @@ -1994,15 +1992,11 @@ static ssize_t memcg_write_event_control(struct kernfs_open_file *of, event->register_event = mem_cgroup_usage_register_event; event->unregister_event = mem_cgroup_usage_unregister_event; } else if (!strcmp(name, "memory.oom_control")) { - pr_warn_once("oom_control is deprecated and will be removed. " - "Please report your usecase to linux-mm-@kvack.org" - " if you depend on this functionality. \n"); + pr_warn_once("oom_control is deprecated and will be removed. Please report your usecase to linux-mm-@kvack.org if you depend on this functionality.\n"); event->register_event = mem_cgroup_oom_register_event; event->unregister_event = mem_cgroup_oom_unregister_event; } else if (!strcmp(name, "memory.pressure_level")) { - pr_warn_once("pressure_level is deprecated and will be removed. " - "Please report your usecase to linux-mm-@kvack.org " - "if you depend on this functionality. \n"); + pr_warn_once("pressure_level is deprecated and will be removed. Please report your usecase to linux-mm-@kvack.org if you depend on this functionality.\n"); event->register_event = vmpressure_register_event; event->unregister_event = vmpressure_unregister_event; } else if (!strcmp(name, "memory.memsw.usage_in_bytes")) { @@ -2408,9 +2402,7 @@ static int mem_cgroup_hierarchy_write(struct cgroup_subsys_state *css, if (val == 1) return 0; - pr_warn_once("Non-hierarchical mode is deprecated. " - "Please report your usecase to linux-mm@kvack.org if you " - "depend on this functionality.\n"); + pr_warn_once("Non-hierarchical mode is deprecated. Please report your usecase to linux-mm@kvack.org if you depend on this functionality.\n"); return -EINVAL; } @@ -2533,16 +2525,11 @@ static ssize_t mem_cgroup_write(struct kernfs_open_file *of, ret = mem_cgroup_resize_max(memcg, nr_pages, true); break; case _KMEM: - pr_warn_once("kmem.limit_in_bytes is deprecated and will be removed. " - "Writing any value to this file has no effect. " - "Please report your usecase to linux-mm@kvack.org if you " - "depend on this functionality.\n"); + pr_warn_once("kmem.limit_in_bytes is deprecated and will be removed. Writing any value to this file has no effect. Please report your usecase to linux-mm@kvack.org if you depend on this functionality.\n"); ret = 0; break; case _TCP: - pr_warn_once("kmem.tcp.limit_in_bytes is deprecated and will be removed. " - "Please report your usecase to linux-mm@kvack.org if you " - "depend on this functionality.\n"); + pr_warn_once("kmem.tcp.limit_in_bytes is deprecated and will be removed. Please report your usecase to linux-mm@kvack.org if you depend on this functionality.\n"); ret = memcg_update_tcp_max(memcg, nr_pages); break; } @@ -2551,9 +2538,7 @@ static ssize_t mem_cgroup_write(struct kernfs_open_file *of, if (IS_ENABLED(CONFIG_PREEMPT_RT)) { ret = -EOPNOTSUPP; } else { - pr_warn_once("soft_limit_in_bytes is deprecated and will be removed. " - "Please report your usecase to linux-mm@kvack.org if you " - "depend on this functionality.\n"); + pr_warn_once("soft_limit_in_bytes is deprecated and will be removed. Please report your usecase to linux-mm@kvack.org if you depend on this functionality.\n"); WRITE_ONCE(memcg->soft_limit, nr_pages); ret = 0; } @@ -2847,9 +2832,7 @@ static int mem_cgroup_oom_control_write(struct cgroup_subsys_state *css, { struct mem_cgroup *memcg = mem_cgroup_from_css(css); - pr_warn_once("oom_control is deprecated and will be removed. " - "Please report your usecase to linux-mm-@kvack.org if you " - "depend on this functionality. \n"); + pr_warn_once("oom_control is deprecated and will be removed. Please report your usecase to linux-mm-@kvack.org if you depend on this functionality.\n"); /* cannot set to root cgroup and only 0 and 1 are allowed */ if (mem_cgroup_is_root(memcg) || !((val == 0) || (val == 1))) From patchwork Mon Nov 4 22:27:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Keren Sun X-Patchwork-Id: 13862181 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 7D16BD1CA06 for ; Mon, 4 Nov 2024 22:28:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0C45D6B0083; Mon, 4 Nov 2024 17:28:12 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 04C9A6B0089; Mon, 4 Nov 2024 17:28:11 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E2EC66B009A; Mon, 4 Nov 2024 17:28:11 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id C227D6B0083 for ; Mon, 4 Nov 2024 17:28:11 -0500 (EST) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 6F2C8160AF2 for ; Mon, 4 Nov 2024 22:28:11 +0000 (UTC) X-FDA: 82749850764.25.86B79AA Received: from mail-yb1-f201.google.com (mail-yb1-f201.google.com [209.85.219.201]) by imf06.hostedemail.com (Postfix) with ESMTP id 94F3618001B for ; Mon, 4 Nov 2024 22:27:46 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=nbrsgBqG; spf=pass (imf06.hostedemail.com: domain of 3eEopZwgKCPEdXkXglngZhhZeX.Vhfebgnq-ffdoTVd.hkZ@flex--kerensun.bounces.google.com designates 209.85.219.201 as permitted sender) smtp.mailfrom=3eEopZwgKCPEdXkXglngZhhZeX.Vhfebgnq-ffdoTVd.hkZ@flex--kerensun.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1730759124; 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-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=15O9ca4pVZTESzuvBdGrLRHe530YHW6qwFu9Oe4DO8I=; b=LjmFWjlWVSd6xIrNfGhcLjEr3kVI7f0KMtrBK6tgCI+ucp11JN/OFWXJVvnvnsRm7T6xnn 38yCbE6PsZq7ZTrf+/dLBJIK7eDiH6scR9Wozq/OvjiZuQpjf/C9ZjKZ1yBQp9HTkfx3os GlKlWIcaCE87fO0KXEDDS36+0YRtFFw= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=nbrsgBqG; spf=pass (imf06.hostedemail.com: domain of 3eEopZwgKCPEdXkXglngZhhZeX.Vhfebgnq-ffdoTVd.hkZ@flex--kerensun.bounces.google.com designates 209.85.219.201 as permitted sender) smtp.mailfrom=3eEopZwgKCPEdXkXglngZhhZeX.Vhfebgnq-ffdoTVd.hkZ@flex--kerensun.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1730759124; a=rsa-sha256; cv=none; b=Lj5I7Ru+bxUo8ByhLvNVOsXsCRfli1AEp+QWPDfSSAUfBFHqCYp/XMoFhbnl4jUqRYkkwV wBNlbIQH+ZzM6EWIidc1iE9b0E1u4mnoNoGmv83gmOCrdK2KraHLgBbsPJD8tbZLrsxpYJ RrmdhdzwTFn1PSVrxdIoKAnR4AeF8IA= Received: by mail-yb1-f201.google.com with SMTP id 3f1490d57ef6-e2b9f2c6559so7294300276.2 for ; Mon, 04 Nov 2024 14:28:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1730759288; x=1731364088; darn=kvack.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=15O9ca4pVZTESzuvBdGrLRHe530YHW6qwFu9Oe4DO8I=; b=nbrsgBqGH6hbdKhqi0fGKt8sm4f85wqKJO7aXNi4OFD3Zygm84n/v91Kiwmfxwg4V5 uMYDCYp2YcgoCt5mqI7H4+qbuiCpKUYlwcv3OCxgBdkXmjGJ6JfG2oa5LB82RrSf6o/r tjdKZQF3de4wHmX7eRNtqfGjERz5Z+tHDtmRC/L13JN1kzZLXQUvMqOBzgW2EUrP7hLT fATmYaHpUpplzPalZpW/RBnOaU1zON5QeRy3Eq8+dPD0AJzVmt+H5RvKF9kF2qhyOZ8R 6LCYs3X5QDsHsNXcYjzkrLFnI1zJhfsK4kowcNc0K3ju2rV7GJQyvrhcgYVxk3FONo74 qqgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730759288; x=1731364088; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=15O9ca4pVZTESzuvBdGrLRHe530YHW6qwFu9Oe4DO8I=; b=XHFkqZqr6A3CbVzh2RP89As7GTtECx8NFqad6nMhytixMlvS/xWUmx1oe+klLxPs1+ vH5AvtA6zLFx6akWerNrSMmwjiDw3lwPvan6obBHxUoA6NVmKHgogI6On4DNiduuEg5w 2f9AVkiBdv66MGcrqj+1SGmYzuZo5SF28k+W2TeOIwd6QuGfl3YMlEJoDzivNOIE+AKV gTB8Oo6lLoGjhi56sQIxOHm/SRAcGP38ejWODkp8cBSunklKhpNk8IwWQC5cu4aqCNxP cv+u1VG/DIa4Rdi/2PekOFvGzI6sBXQ+z0CpaOGLbPzlXOXHxcEAzwioFDf0r9zSeYW3 7tHg== X-Forwarded-Encrypted: i=1; AJvYcCWV4lisV50O1aFa7v+9kF1fK3IAQ7pMgJL5xtooQNZ4aG4iW3FIMZBSOOmufDnJmaa2nPGfAd3XeA==@kvack.org X-Gm-Message-State: AOJu0YyCmsJF3baKo/2O4sn9hhWI6E+kF1akryc/VabIh8En+JPsvZV0 xtkMGB/BWLaQfhpZBminICxlOccuMIKT7lU74fJ07z1Mm+ctcyAtLZu2Lj5HFjtKa9vs3aMOfM2 I2nRz4x/+xw== X-Google-Smtp-Source: AGHT+IEpn3Ozfl3bEakiUcys3vke1g1CcEk4jHzka3T3PWfF9UiVOWvD6xNRzVdmFNyJHcOxgC4N0YzCvE4knA== X-Received: from kerensun.svl.corp.google.com ([2620:15c:2c5:11:2520:b863:90ba:85bc]) (user=kerensun job=sendgmr) by 2002:a25:b411:0:b0:e2b:da82:f695 with SMTP id 3f1490d57ef6-e30e5b0f56amr10735276.6.1730759288333; Mon, 04 Nov 2024 14:28:08 -0800 (PST) Date: Mon, 4 Nov 2024 14:27:35 -0800 In-Reply-To: <20241104222737.298130-1-kerensun@google.com> Mime-Version: 1.0 References: <20241104222737.298130-1-kerensun@google.com> X-Mailer: git-send-email 2.47.0.199.ga7371fff76-goog Message-ID: <20241104222737.298130-3-kerensun@google.com> Subject: [PATCH 2/4] mm: Fix minor formatting issues for mm control From: Keren Sun To: akpm@linux-foundation.org Cc: roman.gushchin@linux.dev, hannes@cmpxchg.org, mhocko@kernel.org, shakeel.butt@linux.dev, muchun.song@linux.dev, cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Keren Sun X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 94F3618001B X-Stat-Signature: tjrd7scwkis783f7xaet678amot6kbow X-Rspam-User: X-HE-Tag: 1730759266-272546 X-HE-Meta: U2FsdGVkX18g0E8e+SfTDMvaoTEkLKKsloKUdvsyFJv9MiNmu00vh32utcQ8Wt4ecrxoSYLjJxMq07kd18yGlgQb7Ievxqwy8ErohK2L2eBi1fgrK1Jk1GRXLHxWNXLGB4I2PG9kPwIlIrQ3x3vkbnR9VtCn1NF/1hfaK+5p+ISlBNA/AyczM/S1zwE9Es9RZqqGwqwcESgnf1tMZhI4bVMx3sdv5U5peeJEHqIFRO1vnqApaL5bgY9/wKbLlXg4XXsB+3U3OBP6U89X7V78tvPw2mQPA829gc+S/bp0kKybdhIuQAc8VqqorlDdtLUlS+vM0OLvMwNaU5jWDDhdrw7piZSsd7OLB+CRINOyc5y4k4dK4E7QgF02kBX5tkh25FsIpkkOvaoIwn6NICtx3H3aaD/lCNL9V+UbWblVNBCbbEa7ZLRzPNZqICFXRj2/+PbqGs0TkvjtAjb1GXoHXYs6hmgZNpTU1SDgN9g9NcG8ij5e7CYGytFAjF5kk4Pti0a497O+sqmp6nAwAMHu+AsVVj56dvWDBVPVd8bK1o57IUgrSR0Nq3LoOL7UeXL7E2u37L06xpLPwsV/VWidHjWvyEPKFlk0bQpe+UHXRn6Xw0YGEdbpIhYN67d5+OsiZp+B7kVNAA8dNBZdv+YU9dUXXFvsw95wbuPlaaivVouAumGiGynuCv/gJ1GvlZWorGpVm1JX+gJTT8rtXsBFC/nZbI3ozZrsma5BE16cpWveZTF/ADkN5ZtltZeSSLIJYHjWrWXN1OyISJb940eEZNQzn8euLcpfU9D0iApXXdovSlz4LtLnB0I5d1TLjyTRcMxY8BoJHyAxGh2w2XxDZaIIX/tTeSKK49oMdvjQxfvDHVUkGaCw3fag/1q7MsSPv8prG+4ceUK6NCa5Pf8DnLBeYOFDdmU1QxacoS73PeQyZdKeBrTTvu8WVCLA4X1JHFEidcWZNT7ibAHeLEn nzWfiIah NEkeuGtQQtwMJ9Tj9YNOgSqCzaML6NbOe8TFtMEtxY47G4HP07z0hjhmVICcpG+iLFlWBuQ3KCiWyLN/8Z+qeWr8yAVArEKg/4j5VSql7vcj1oyzjUdjOv+7evIhueUZxYMRCYc+qlydogSfzoQqifXe9iE617TxzodfGoS1VNObBYMhw3Bm+r9NUJM1onWt2ymkngQA0I36O6DsUnH8PZz+JfRSDLGgpH80IDDEhGD1E0bHswhaHelv62qkOC8NB8torjfSt+ZmkKVrPHl+aP4LRpTy3brqQazSSbGcrLAzzdvHOANqSPUNJfBJWas8cHOperlwI7ApVv4DMGx7z+apYCBTsaL3MgMWHx5UQyPNxGCrHoBdKKj28zDsBjRHcagMlbMJzJriK4L4vlUSR7dZN1kTHrqllkeiP9edM6yy3XEMbjSTU7OU+W3CL2ZHxpFKDRB1GaF2hoEnbyo00Z1fZN7/4OO9Uw/aVNwQQlMMT3h/ZJedyfWmlhMX+pjnNXJ22Pz4JXIXarRZo5bGWH9pgQwwSUWrVRZHMPtTTIAZ5N8DFw10GKlJlgg== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000018, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Add a line after declaration as it's missing after DEFINE_WAIT(), replace the spaces with tabs for indent, and remove the non-useful else after a break in a if statement. Signed-off-by: Keren Sun Acked-by: Shakeel Butt --- mm/memcontrol-v1.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mm/memcontrol-v1.c b/mm/memcontrol-v1.c index 3951538bd73f..5f9d3d6d443c 100644 --- a/mm/memcontrol-v1.c +++ b/mm/memcontrol-v1.c @@ -460,6 +460,7 @@ bool memcg1_wait_acct_move(struct mem_cgroup *memcg) if (mc.moving_task && current != mc.moving_task) { if (mem_cgroup_under_move(memcg)) { DEFINE_WAIT(wait); + prepare_to_wait(&mc.waitq, &wait, TASK_INTERRUPTIBLE); /* moving charge context might have finished. */ if (mc.moving_task) @@ -490,7 +491,7 @@ void folio_memcg_lock(struct folio *folio) * The RCU lock is held throughout the transaction. The fast * path can get away without acquiring the memcg->move_lock * because page moving starts with an RCU grace period. - */ + */ rcu_read_lock(); if (mem_cgroup_disabled()) @@ -2096,8 +2097,8 @@ static bool mem_cgroup_oom_trylock(struct mem_cgroup *memcg) failed = iter; mem_cgroup_iter_break(memcg, iter); break; - } else - iter->oom_lock = true; + } + iter->oom_lock = true; } if (failed) { From patchwork Mon Nov 4 22:27:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Keren Sun X-Patchwork-Id: 13862182 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 2BBEAD1CA05 for ; Mon, 4 Nov 2024 22:28:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AD6106B00A0; Mon, 4 Nov 2024 17:28:14 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A86576B00A1; Mon, 4 Nov 2024 17:28:14 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8FFBA6B00A2; Mon, 4 Nov 2024 17:28:14 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 6E3CC6B00A0 for ; Mon, 4 Nov 2024 17:28:14 -0500 (EST) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 2BC7A40B03 for ; Mon, 4 Nov 2024 22:28:14 +0000 (UTC) X-FDA: 82749850890.25.BBB2A37 Received: from mail-yb1-f202.google.com (mail-yb1-f202.google.com [209.85.219.202]) by imf13.hostedemail.com (Postfix) with ESMTP id F1A502001C for ; Mon, 4 Nov 2024 22:27:38 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=Zu3FQmpa; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf13.hostedemail.com: domain of 3e0opZwgKCPQganajoqjckkcha.Ykihejqt-iigrWYg.knc@flex--kerensun.bounces.google.com designates 209.85.219.202 as permitted sender) smtp.mailfrom=3e0opZwgKCPQganajoqjckkcha.Ykihejqt-iigrWYg.knc@flex--kerensun.bounces.google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1730759170; a=rsa-sha256; cv=none; b=yGBxFF/h/ptemY7b65TlFsKtUy5hlRrL04XIA85zzLONFfOpUO/okLUhEmI/scvEvllK2F RKMGCiYCgir9PkdO12y6T3emwG4xGsEr51xWxuEFWsrktH6mzjWLtoc+OWUHaPrsovmRKM 6/LUzBUOqXAp7GX+ZAc+nmSrY2U5f2U= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=Zu3FQmpa; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf13.hostedemail.com: domain of 3e0opZwgKCPQganajoqjckkcha.Ykihejqt-iigrWYg.knc@flex--kerensun.bounces.google.com designates 209.85.219.202 as permitted sender) smtp.mailfrom=3e0opZwgKCPQganajoqjckkcha.Ykihejqt-iigrWYg.knc@flex--kerensun.bounces.google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1730759170; 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-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=FJTHsOFb69amuDKNp+L1s7mL9nLva+h50iWgGzl+suk=; b=5cO/ggVnOpVhi0hHSOHTkFGUrjzclV4uTpdGADgoNvveo+7/G/bF9E+vK/jI/LCYNbNSor t8jy3pgbi91TYscc5c2RIanKshccCiE2gwTHUNXo0pWRriGUfuimMc8eN4tO2Zr8VlWneE Matlt6BWwpfJKxh481VnRxFeJffbmGk= Received: by mail-yb1-f202.google.com with SMTP id 3f1490d57ef6-e29142c79d6so7678036276.3 for ; Mon, 04 Nov 2024 14:28:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1730759291; x=1731364091; darn=kvack.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=FJTHsOFb69amuDKNp+L1s7mL9nLva+h50iWgGzl+suk=; b=Zu3FQmpaJjlXAg7xaXzW/7RMWZFNfcm4J/xWi0pf+vRYc2b5szz2sXB0QRIViwCeJX gzPs1p5fBSR3s88ZspRQ7LdJ95/nAWejegBVTMs/Io5xnOshi9CaVLhATUg2d5dEJDQZ 8trzZvCrx35ryVAnfLFlUjIQAXpaj8RYyMgnn3Hm6jLv62OSNghEzKcjmL0fZeTBC2BN tGWOpvUByg1FbRMWPjFTefBo/aOt+2rM2u/UR+agwJeyNC7zK9NS46bcUobPEUCLuhid eY37LHrzmxGCJTg9DFnen6GcE9ry8g945PjXkgzOfCe3tAp0OBPfW0nWixpTmoOnvj9L cdpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730759291; x=1731364091; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=FJTHsOFb69amuDKNp+L1s7mL9nLva+h50iWgGzl+suk=; b=AyIcUFyelUSil4PuhxwdQMO1k2CK/NTs581Gwb7Dz7CIsGColLOt5cNLbdCoNgJOdl tv1tHq3zsEvWarFov2RXjwZaicU6g7tPdHPylMMq14q+guYaoCxSQDTkRMRIYhoW/+39 GdO/l8Tdjcocm38iLDojGp54szmMI6He4mHVpOxUYKGVNNr627PtkeeLntj9g99uoQOD fKTRH2DlyFl9NVEXia3abX8+hWh2WszLiKoESXv0qIsPX2hjcOCOPP95QSQLeIfI9iFC QJSe6T+zZicw+P0khoWFoGWIYCh73BNqqpx641KHDUBeGteSk1R5e6unAm7Aj/26sQVf C0cg== X-Forwarded-Encrypted: i=1; AJvYcCWw7QnUeB0q3Joyu4Zo4FUgFF1DTo5X8Z+WDgLvEWcxjKtXjR427koHAepi6f64r7j/dc18CwwDwQ==@kvack.org X-Gm-Message-State: AOJu0YzMEW07OYz9/Qkkj34TZBrT0AGUCV1MsduswM7hj2RgV+KCBsUk RntCH9IUtNMc11TE8s0W0b6/jtaC3Gzp0wSHaj884WenQW4TsZOAMi9finb0xaOjWOydz9ZFLh/ IBMaVWR5TtA== X-Google-Smtp-Source: AGHT+IEg/gpZS2Wwa740IUzym+/kFOc+iN2HO8l3hmsWV/sKpXe65l+xXYWOwxm8vBrp8FmpwtXAU3uOAkOjqA== X-Received: from kerensun.svl.corp.google.com ([2620:15c:2c5:11:2520:b863:90ba:85bc]) (user=kerensun job=sendgmr) by 2002:a05:6902:1d1:b0:e2e:3031:3f0c with SMTP id 3f1490d57ef6-e30e5b0ee45mr11671276.7.1730759291389; Mon, 04 Nov 2024 14:28:11 -0800 (PST) Date: Mon, 4 Nov 2024 14:27:36 -0800 In-Reply-To: <20241104222737.298130-1-kerensun@google.com> Mime-Version: 1.0 References: <20241104222737.298130-1-kerensun@google.com> X-Mailer: git-send-email 2.47.0.199.ga7371fff76-goog Message-ID: <20241104222737.298130-4-kerensun@google.com> Subject: [PATCH 3/4] mm: Prefer 'unsigned int' to bare use of 'unsigned' From: Keren Sun To: akpm@linux-foundation.org Cc: roman.gushchin@linux.dev, hannes@cmpxchg.org, mhocko@kernel.org, shakeel.butt@linux.dev, muchun.song@linux.dev, cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Keren Sun X-Rspamd-Queue-Id: F1A502001C X-Stat-Signature: 66axqf5f5zqbod3tae69rzb1iq9wkswg X-Rspam-User: X-Rspamd-Server: rspam05 X-HE-Tag: 1730759258-336713 X-HE-Meta: U2FsdGVkX1+/TIUpPlOO1BHUg15PRpLKAmTI9g6i8Js4+F9lQM7B5x5jbwFE67ascH6tDgoRqQeZ4+Z3vdehM8XmhwtSso/aBL3YnFdnln18qPreUHmQEld2jmZTGBd1xWU0uUeLY4icTNLjRn4EyOsav4P4Qh/mhdQAYlYXhm9wbVr5aDm1h2XLWTLr0lJChmGcsel7RZDQZUmLIYuMdTIFftIcHZ7k/DV+o542k1Jxx/478ndwdAdO+GbuEa0p7jW93clxij8lAnd4DbrcOTg2e0S1w9bngaLlff4cglWJijdrmWvfPM8pViGw0P7lDmwVIocj5Pu6e8+Gw8YE8SUID51OtJOTaHo8FSY5cIUqQZUUWbhf0L2FlKsSMvEebApnM6zZbXaIiUAQhJ1cRZCzG1l0KV/GuMpfFbNcekWvz9CZQCCGx0pE1dv9YvtCVBOyuLcDjTk5O88kbcxEShufem0/QRI2SvmYvq96CBi9nb1cRua68FbWYGXMptxdAlYv+mrK44Hs40mL5vyygofsq9cubS9o5EMdJwA5Hv/J2pH0FF/9v/qO3Cuvi/xnU4j0Lgkjb1JKh1fYTYw1gwPY+CIg5iauR6wudJd9GLIrGH/P1Jah/OIZrkgKPxwKddbvKid/wMHbOHj0NjxSEpOjINFNWiC9jiU+nhXzIMyu+w1wMl1l/UkP/kBaHtnt8KYna7otBLqPtw328rLOPVDfIwwdF0hbzQiGt6OhQYYGV7t3e/bDcN6iNdhdBmH/vMLyDb4jjeJKpQXBDZoHU2l1fqqb1X+bIZ9h2ruESgBsIjfrkbqId6peYVK/mNlqmG0qhPjNd0H6PabCQLZq/tYJqU7JE40fBYmgqa50VWM/TY5F4QJjKP7V3H7zki9N5x5slpkmtWC10guSGfrFMvydBYwB+2mp1J0UBMzFhKanCmPvlYyiT3XXa+YhLHcri78FsGYM7ikmWSKjzjH ZXGVhUxp nChk10ZjYDUPgJ+38B6HA9eiC0bne6hhC5Y5cBYn7T0WLvNbLm6yQkymtYEOGpxANQwOgEgcxGF3qNgMCu+uaObI7885LNcPKrJ1XvZIhMAVpKN+T0w+aA3eYOnv4TBHvXl/yM6zdM8JsZtz+sl+jl6YSK1IT2ReDT/VxyuPsJSpLLt/sysHfNOlkMi50/iQW6hzd9n8kEGkGzF0CvpQUcvrAzlHhF/QeYItiLDw/vN1k3xHMUQ05RYU7MZyJCP07jZ2IXvVvQI6ulFygbIROGwtWVPwQVBUDmycOfYMhMBGOG0gXZXJ8h71tUya2/PLltK3yCDZER8+ijNUNp+S+aGwYOzNyeySxo3otzIQI0tPtgB7OWxwzFrd4HZ08Ovm6BLHUZRYSMJy1vJMcW2vOzMW61EzHOBesF2atMI45nCto0Qw3NlJr6GSCaAY2XXU4+qXFSmZKf6t+Mkgb2BD+Zzeg+emL2r89aocqkELRlolTU/Lx0ZYREQmIxo2+5J8yDfTpOiagr/tHnK99pKN8wpWStH/kNeSxjAvSTItS7DmwOqW97u0K0jILvQ== 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: Change the param 'mode' from type 'unsigned' to 'unsigned int' in memcg_event_wake() and memcg_oom_wake_function(), and for the param 'nid' in VM_BUG_ON(). Signed-off-by: Keren Sun Acked-by: Shakeel Butt --- mm/memcontrol-v1.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mm/memcontrol-v1.c b/mm/memcontrol-v1.c index 5f9d3d6d443c..5e1854623824 100644 --- a/mm/memcontrol-v1.c +++ b/mm/memcontrol-v1.c @@ -1851,7 +1851,7 @@ static void memcg_event_remove(struct work_struct *work) * * Called with wqh->lock held and interrupts disabled. */ -static int memcg_event_wake(wait_queue_entry_t *wait, unsigned mode, +static int memcg_event_wake(wait_queue_entry_t *wait, unsigned int mode, int sync, void *key) { struct mem_cgroup_event *event = @@ -2165,7 +2165,7 @@ struct oom_wait_info { }; static int memcg_oom_wake_function(wait_queue_entry_t *wait, - unsigned mode, int sync, void *arg) + unsigned int mode, int sync, void *arg) { struct mem_cgroup *wake_memcg = (struct mem_cgroup *)arg; struct mem_cgroup *oom_wait_memcg; @@ -2598,7 +2598,7 @@ static unsigned long mem_cgroup_node_nr_lru_pages(struct mem_cgroup *memcg, unsigned long nr = 0; enum lru_list lru; - VM_BUG_ON((unsigned)nid >= nr_node_ids); + VM_BUG_ON((unsigned int)nid >= nr_node_ids); for_each_lru(lru) { if (!(BIT(lru) & lru_mask)) From patchwork Mon Nov 4 22:27:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Keren Sun X-Patchwork-Id: 13862183 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 AE329D1CA05 for ; Mon, 4 Nov 2024 22:28:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3A9886B00A3; Mon, 4 Nov 2024 17:28:19 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 332176B00A4; Mon, 4 Nov 2024 17:28:19 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1FB996B00A5; Mon, 4 Nov 2024 17:28:19 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 00F726B00A3 for ; Mon, 4 Nov 2024 17:28:18 -0500 (EST) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 9570FC0BD2 for ; Mon, 4 Nov 2024 22:28:18 +0000 (UTC) X-FDA: 82749850848.19.99FF467 Received: from mail-yw1-f202.google.com (mail-yw1-f202.google.com [209.85.128.202]) by imf06.hostedemail.com (Postfix) with ESMTP id BD1E318000F for ; Mon, 4 Nov 2024 22:27:53 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=I6qLUhg+; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf06.hostedemail.com: domain of 3f0opZwgKCPgpjwjsxzslttlqj.htrqnsz2-rrp0fhp.twl@flex--kerensun.bounces.google.com designates 209.85.128.202 as permitted sender) smtp.mailfrom=3f0opZwgKCPgpjwjsxzslttlqj.htrqnsz2-rrp0fhp.twl@flex--kerensun.bounces.google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1730759213; 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-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Y1YSqDn0sbFO9SXEJcmAUmq+AuYyNB6VQvHAGKw4UO8=; b=WxtiIO+PF/6tZbUJG0vN4smNro1iFaKGFPKj0g84iGf59JOvwJ7Si2NPLAoCE+AAZsTkb7 0cp5ITcox5WwAXt9tZy8iV/P20C36GKUEdMBFwSXRd3vQ0cOzwh/yajDqJ8zUh1dHZv9PL SpXPseAaK68rTat0327VLCrXo2E7gJ4= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=I6qLUhg+; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf06.hostedemail.com: domain of 3f0opZwgKCPgpjwjsxzslttlqj.htrqnsz2-rrp0fhp.twl@flex--kerensun.bounces.google.com designates 209.85.128.202 as permitted sender) smtp.mailfrom=3f0opZwgKCPgpjwjsxzslttlqj.htrqnsz2-rrp0fhp.twl@flex--kerensun.bounces.google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1730759213; a=rsa-sha256; cv=none; b=cefC0QS9bXktYz0l4j1/rV3M251/Yav6qtjg/FF3Q3Yki/3lHajabiLrHh63gPerEc9dJR Ox6iZ77sHhMFHyFIRBA4Pkuxmr0HdX25S+SIZqXJtZyJnyw3imlAaSiR+bBuDi431x8MSf 0a+FIdR5Ycc6cpgHFRF2+/3uXUSixDs= Received: by mail-yw1-f202.google.com with SMTP id 00721157ae682-6ea7c5805ccso42508927b3.0 for ; Mon, 04 Nov 2024 14:28:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1730759296; x=1731364096; darn=kvack.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=Y1YSqDn0sbFO9SXEJcmAUmq+AuYyNB6VQvHAGKw4UO8=; b=I6qLUhg+3xaCC8C+ZrOC06VUV06toJwLoGgwfn7PYj+JBcEtKVhpxs/NR/7FeloDOF PLU7xwOTMqx7r/28jhh0BWuYXevFI2p6jdECmt0mv12eNk7gQJTu/FAKVLtgoMVSnsIg 3e75JS106nvDUXq2M9sXc4vLt313rsico4GO4AxPTRKH0oCXmGh/0mTJxbTGu4OebNKR 24nG4pYdRfnlGZNcRE6XcbiPoQZy9pC0m83kUNPJoOuGPcQQ7R4dQybG648ZegwOXzP+ z1Rnih0EDXJ90pzKuxLGCRdSYEgPo5FET9oyIpXzqAMQlFGsy+OZK3P73DhjLIJUo66v lO5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730759296; x=1731364096; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Y1YSqDn0sbFO9SXEJcmAUmq+AuYyNB6VQvHAGKw4UO8=; b=OUF06oqF/NcJMA8wY5b7txmCdjC/A4bhwskpSJO7Kqm/f7b+JTh/I/2/S6KXzj8Ut7 UZnI56Rm57i6LP21I9/ZX+tpvkMVcs1UVzUfxL1aChVqaq6ul6Q4dd1160LEBgFBKMQU oiXhA35VnFuh3zOWHwyeUgaWZSBr3J7KbC9zFn5rXkgBYg8d/nhAlkPEQWcP2+S6Y0To uYBkAYwUaxGuPoR8snaQ0WX6/1eI9plt4Hr1s0E+nAEciFeJHaz34EAeIG12UKGF94d0 kl8oscaWS1Cv1InUVTSSB99ceq6AZgAD9Ct0YFQXbk+YHvCoc2OlFJmBFFuPSZ5S2FdR 8OMw== X-Forwarded-Encrypted: i=1; AJvYcCXMOMMkWRUW8tI62H+m54FhCu1CH8oNa0glvuLuH0Y+iE0adnEE3XWQlabPtuuihiEIwMJWErHZCg==@kvack.org X-Gm-Message-State: AOJu0Yyyydrieb9kOeJa4CUH1RUSqnXjxAvXZ1xXQ9PDjVIrOQN7nCu1 DURkWeDab9lhLqAuC5w51TMHSCO09WiEEAt+e5G2ZZmGmEIGgKCaWyoWsoMNA4m1/D/uJfpceAC Z2UaO59CA8g== X-Google-Smtp-Source: AGHT+IEwJ6XoH9jYvE9XepfbYW66gSHe6pDYBUEJ6j7mRhsOIIUs4LZTeXXSxAJhVRpRqXv6MfH+lzcIHJo1EQ== X-Received: from kerensun.svl.corp.google.com ([2620:15c:2c5:11:2520:b863:90ba:85bc]) (user=kerensun job=sendgmr) by 2002:a05:690c:802:b0:6ea:1f5b:1f5e with SMTP id 00721157ae682-6ea52518ac3mr273147b3.4.1730759295937; Mon, 04 Nov 2024 14:28:15 -0800 (PST) Date: Mon, 4 Nov 2024 14:27:37 -0800 In-Reply-To: <20241104222737.298130-1-kerensun@google.com> Mime-Version: 1.0 References: <20241104222737.298130-1-kerensun@google.com> X-Mailer: git-send-email 2.47.0.199.ga7371fff76-goog Message-ID: <20241104222737.298130-5-kerensun@google.com> Subject: [PATCH 4/4] mm: Replace simple_strtoul() with kstrtoul() From: Keren Sun To: akpm@linux-foundation.org Cc: roman.gushchin@linux.dev, hannes@cmpxchg.org, mhocko@kernel.org, shakeel.butt@linux.dev, muchun.song@linux.dev, cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Keren Sun X-Rspam-User: X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: BD1E318000F X-Stat-Signature: fibu6dzk4t44ttqp67zjx853gyj6xpzm X-HE-Tag: 1730759273-723339 X-HE-Meta: U2FsdGVkX1/XQGtVpZv76nPt1bux60W+iTX55iqm2mDQ5WzfmXQILjXY50+k5Mhonhm/hNk58wIhRPWmRHvmhYPTDLofI8GtOR24vzpb9yMUHsrTcBLOclnZ2fEDh5OvFkNhHO33x4KqjbcSO+JP9D8vINORpx4u7tem93TFjKrTvlNk6hznkbZODDgmVw594ezPFSyin/LlU7wTlNQkLDvserStnEVR80qMTPBORReG2wvti0Vdm6xcQjSJr/fiClrVmcrAnR+GmFrqw5Vo4mPU/EaGvxwVlaK5IBA74wqXBp+4ck4u4RBu+Xp/o4j9e1yrKSlwUSNTqEUtI1Anwih0xvAVGlIMLU5ilr+A/MfGXEh0IiqzSOY6p5KG6YXiUh8t6SmGxLgf8Gi6ZBVRHmcIYMNsH+/wIvbPk06OXopPvRqELTvlsKDrIcbej6BleZjeSNsHWlGEmYVLPHztyZIIh93nzqr4gJHZe+bfZC9saPe7kDArSveUpQoqgTyHOk73hBymN+wPqCMuLVPxCrLvrNQAkJYE6u01hyubz8HJTdV/kMiVD7lvu7nrWU7BbY0DzkeRZBc6NbYuQtBh2+81NbjM6HGZUxr1fe4ElkOfFMZIQGLvy+ijQh9tj3cS6F3YGoJGg+XjSVezqRsG8V+fUMbfHt+xy20S2qeApnOIOtLky7IEYKLpeWaSyhtCRyauI3EhKAXXE9QWE5lVMJNYtBySaFWHbachVcVQs1nclAQw1tbp6XOCgkuMLgqc5eJ5zYYY4orYJ4AuwCki3wUL8w8ZtSLn4xJ1dEEUTWSlN50VnQRpl6m8QSBSSACSn81txhpgAjoxoJPag0kI2CYYzhAA8Z7pilp295XsIbvDDbDhaykCvyEY2s5ZrrC0tSPWpg4QTHFsqyhEiE4oZ+p76emhqrgSo3Miu49DVxPFFoVEV6r64bqJF7VzyA8JYLaRNXH8Y9kkUwoS8dm 84Miv+cx Jnrxpme9prZrCFDO6Q3Bs1FhXx2ThkVHMPTqM/S45ROS0sedNs72TnLt0Ba23sxpKrN46YGQqbtLNGkmiUO6mynYeHZ4bo9U91miA0T8K/ehmjgMJ5NuuabD0eKH4JhZTa9P/5Ajrn8DURkVEySVyTSRzRgefAMUs0Q9jjO6Hx7NdgJzwVNQb+Qemn1RK+8T4Dr2tnorHlB76EvdyH/MZjRzIZ2D4toWcvJMXfCY13C3WHbBD3IfhYMJ6x+t+myvn0pOh31GYv0XPerKl+GYCucmsny8HOgXFvTo/6mOTygpPuNb37oDLRDe6rf+nyhymi6yiot7KQaff/34s35Cg1zhwQck8xoizlQcMyehNYJZ76t0enYrsidICzQSgcVZ1tjc5VJchjPe6nyIv9RDtAQO5mKT5QKAG4VOFCS94X/JbBMY9L1L9YBJ0Ibbr7W5FBQSZdkqZj80dIXc5lVsn2Bu6smyklU5eOyVp3JjrtZg9a+CzCCiwgGLES0aIk8RrOq6LxQJPy8mk9IWcqZuIo5oxjXHA4+o8hv/DFb16Lg8Y3P5DnGNsB1l/SoVpuXoYjbomEmjgMP8OU5esF7DPcaZv7VKvnKVInWuC2a6+rNNjSVQGWZwe42UrlstEsJfirBQs0OedmM01a84= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000013, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: simple_strtoul() has caveat and is obsolete, use kstrtoul() instead in mmcg. Signed-off-by: Keren Sun --- mm/memcontrol-v1.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/mm/memcontrol-v1.c b/mm/memcontrol-v1.c index 5e1854623824..260b356cea5a 100644 --- a/mm/memcontrol-v1.c +++ b/mm/memcontrol-v1.c @@ -1,5 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-or-later +#include "linux/kstrtox.h" #include #include #include @@ -1922,17 +1923,15 @@ static ssize_t memcg_write_event_control(struct kernfs_open_file *of, buf = strstrip(buf); - efd = simple_strtoul(buf, &endp, 10); - if (*endp != ' ') + kstrtoul(buf, 10, efd); + if (*buf != ' ') return -EINVAL; - buf = endp + 1; + buf++; - cfd = simple_strtoul(buf, &endp, 10); - if (*endp == '\0') - buf = endp; - else if (*endp == ' ') - buf = endp + 1; - else + kstrtoul(buf, 10, cfd); + if (*buf == ' ') + buf++; + else if (*buf != '\0') return -EINVAL; event = kzalloc(sizeof(*event), GFP_KERNEL);