From patchwork Fri Nov 15 23:57:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Keren Sun X-Patchwork-Id: 13877412 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 81E1CD68BDD for ; Fri, 15 Nov 2024 23:58:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id ECACF9C0019; Fri, 15 Nov 2024 18:57:59 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E53CD9C0018; Fri, 15 Nov 2024 18:57:59 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CCE5E9C0019; Fri, 15 Nov 2024 18:57:59 -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 AA81A9C0018 for ; Fri, 15 Nov 2024 18:57:59 -0500 (EST) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 5564EA0937 for ; Fri, 15 Nov 2024 23:57:59 +0000 (UTC) X-FDA: 82789994658.29.0B34EF2 Received: from mail-yb1-f202.google.com (mail-yb1-f202.google.com [209.85.219.202]) by imf11.hostedemail.com (Postfix) with ESMTP id 8F0C840002 for ; Fri, 15 Nov 2024 23:57:00 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=d2SAft2j; spf=pass (imf11.hostedemail.com: domain of 3BOA3ZwgKCOMPJWJSXZSLTTLQJ.HTRQNSZc-RRPaFHP.TWL@flex--kerensun.bounces.google.com designates 209.85.219.202 as permitted sender) smtp.mailfrom=3BOA3ZwgKCOMPJWJSXZSLTTLQJ.HTRQNSZc-RRPaFHP.TWL@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=1731714988; 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=8v8w47B/bBInLDR9iMbQaYJ5893IHUb3TRGhZ/es2aI=; b=JL8TBm009aFgxrLtikd0+cgF2/7pwo0h3HzkQfLUZELBi9IzdCOGGdvQP/CEizUn1jxG0X OG0epTTVdLulhkcU+2lUTifusKwEnqhRbBxQ/VV6dCF1f4jOinYDhvoBJA/r223Yb9V2ya 0FQnfT9ir18f8t88dOV4KxbYtk/rb30= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1731714988; a=rsa-sha256; cv=none; b=dFGR6V8gubDstT3lnjcyA04uNl4XJrfuZ4OXl/gGDVXBmd9esQ/8G6Tz/8wMnkRfeSMpVn qoPm2hMpJpLWDvd/2bTLv8aH/wtzYtjK6F31EuCTPzv1egv8FBfxbyedvjq5Q4ytnegqce bE8rKYvLmyXwdkH0iRMpTWDYaVGfDF4= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=d2SAft2j; spf=pass (imf11.hostedemail.com: domain of 3BOA3ZwgKCOMPJWJSXZSLTTLQJ.HTRQNSZc-RRPaFHP.TWL@flex--kerensun.bounces.google.com designates 209.85.219.202 as permitted sender) smtp.mailfrom=3BOA3ZwgKCOMPJWJSXZSLTTLQJ.HTRQNSZc-RRPaFHP.TWL@flex--kerensun.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com Received: by mail-yb1-f202.google.com with SMTP id 3f1490d57ef6-e30b8fd4ca1so3281272276.3 for ; Fri, 15 Nov 2024 15:57:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1731715076; x=1732319876; 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=8v8w47B/bBInLDR9iMbQaYJ5893IHUb3TRGhZ/es2aI=; b=d2SAft2jBlHM7xlzWJW0LqFwog9WzzLuwi/BRftXtGzYPR+MsTIGMxGUzSHswvVnLg xYlzHLz9UcXQH9hOOb0gwJGratzzXHb4jOnNJocTAe3xTjBh40B/YDn1mv1iLn+0aU9x Ib3YFD61f/Fj2BDcOlVkqC9tY4dO+PN3uBJPwV8EnaOVIZSKcofTz6VLJILFLPyp/290 nDlngA2wDb6iM3ka/+9D9ogUaXbRh8eUpMIgTMcBMogJK5ytqfF8/dJUQKbXveeOxz4A kxcmQFJIgg0L9+JKAD/YTM4EIJ7wgBj9tKIesYHNE8ltxD17XSVuqpvKqIKEwU5yEzs9 EuUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731715076; x=1732319876; 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=8v8w47B/bBInLDR9iMbQaYJ5893IHUb3TRGhZ/es2aI=; b=SffkNHhylzoFnzpPoEtCMG7LrVHWLHD67vl3fjQRmFSV5nFG5crFNFWBGmEa6mfd2Q D/Aij+tZxT3gW5+dIk7YX7kdNIAJEmuBtFuOFjlXbF/hbv9BzkXbUyRraNoeKowKVyR0 YAql1OsK0Gfocz+nXr6EnyQmRg4J7oggaZnCKp+YjTqUpwUNZ8vnRhVnZ/90DSKiOd6t zxeX9a+ek27F/tWZWkKj7LPMQkGXSVuftGAFfCB2Y345Ta6YtUgUr9/Vmz3I7ZZfQEE+ rT2HOsxMX970qJViu7++MVpbtZz7UtZAk29W+zK+AfCvWae9/MTes6AFi/jkNoQXEK+k cg+w== X-Forwarded-Encrypted: i=1; AJvYcCXz3nJsnnEs5afPUqWd3cDmVqn+YoGdxBLjftrDz8gxVCY13020EX9H6ze9NhjlgmUtOokNn7Ot7A==@kvack.org X-Gm-Message-State: AOJu0YzFmyQI5yUulRClLkEg0zdBw8iNA09xeF2GzC82azzhYeADA8jg Exo2aEfgxoWFL1MSPEEnZXqNDgGEtwJr5hbnsqPFDmzVcuzQHtBhCSqcynCauf27FDGnTabzqed qA/6JsNzGUw== X-Google-Smtp-Source: AGHT+IH4TgoU+sKXZ0e1vdMN9iVrwBlb5RZLub5gn85SQYiErjlQ2PRdfhYiBYV7ArscR5hQT2dD43dztdIdSA== X-Received: from kerensun.svl.corp.google.com ([2620:15c:2c5:11:f2d6:8e6c:5a90:ef1e]) (user=kerensun job=sendgmr) by 2002:a25:bb0e:0:b0:e38:2136:9482 with SMTP id 3f1490d57ef6-e3826614e75mr3788276.10.1731715076563; Fri, 15 Nov 2024 15:57:56 -0800 (PST) Date: Fri, 15 Nov 2024 15:57:42 -0800 In-Reply-To: <20241115235744.1419580-1-kerensun@google.com> Mime-Version: 1.0 References: <20241115235744.1419580-1-kerensun@google.com> X-Mailer: git-send-email 2.47.0.338.g60cca15819-goog Message-ID: <20241115235744.1419580-2-kerensun@google.com> Subject: [PATCH 1/3] 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-Server: rspam10 X-Stat-Signature: jmo7dc6sx6dbpzd4sb3wjttd5ksc8xed X-Rspamd-Queue-Id: 8F0C840002 X-Rspam-User: X-HE-Tag: 1731715020-180875 X-HE-Meta: U2FsdGVkX197YYjU/KgjGwFzMb9IlmA66dfbfxCfH4lq21mNAW7UU0G7Ix3kqYBCFnRcH6hxBjF3iztYpL3xjCI5y409HOkE8HAtXD+82VkXPRJq0ttafc9VZv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+eIZZuYdHJLM71T3whtUPzfvqg1dlM9q9NDSTrSNrf/yyLj6DlLDjdpLlAu6r+MFKKU11/N+t/aLSoFau2qmdp4Rh6Guwa7o7bYK1mDKsDF79AEDEMx7j3rkzMPZWjmjlA6IrBnCNL2/jepk4EO3tMXnCfY7v12qc7cOHQYUkALf/Be7Q32q6AovbEWxRsWHfGrtEf2E9PC53unTZWlrJWus8KOC6AfGvqYrfWSdGwiFdr4H5FfEjh0F2lWjJnxrMbwATjvmp/1q6f+pYVHYUDgwDIg2a2/e64rGxq/ksUz3y70b/A6zi1n+8wJxVWfRxuF9JRoeTmYl/SrwSTKDsSHCThyHxp9vZodSmNOLzZUMJfdaQQw== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000078, 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(). Acked-by: Shakeel Butt Signed-off-by: Keren Sun Reviewed-by: Roman Gushchin --- 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 539ceefa9d2d..465201ef40b7 100644 --- a/mm/memcontrol-v1.c +++ b/mm/memcontrol-v1.c @@ -899,7 +899,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 = @@ -1216,7 +1216,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; @@ -1658,7 +1658,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 Fri Nov 15 23:57:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Keren Sun X-Patchwork-Id: 13877413 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 1DC4BD68BDA for ; Fri, 15 Nov 2024 23:58:06 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 83C2F9C001C; Fri, 15 Nov 2024 18:58:05 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 7EC4E9C0018; Fri, 15 Nov 2024 18:58:05 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 666009C001C; Fri, 15 Nov 2024 18:58:05 -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 41F779C0018 for ; Fri, 15 Nov 2024 18:58:05 -0500 (EST) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id B7F84140A0D for ; Fri, 15 Nov 2024 23:58:04 +0000 (UTC) X-FDA: 82789992936.13.8EC3F27 Received: from mail-yb1-f201.google.com (mail-yb1-f201.google.com [209.85.219.201]) by imf25.hostedemail.com (Postfix) with ESMTP id C2DF8A0008 for ; Fri, 15 Nov 2024 23:57:29 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=op9Cv3fn; spf=pass (imf25.hostedemail.com: domain of 3CuA3ZwgKCOkVPcPYdfYRZZRWP.NZXWTYfi-XXVgLNV.ZcR@flex--kerensun.bounces.google.com designates 209.85.219.201 as permitted sender) smtp.mailfrom=3CuA3ZwgKCOkVPcPYdfYRZZRWP.NZXWTYfi-XXVgLNV.ZcR@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=1731715025; 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=LrEBNSRkiEojOqX+4gfP8RZsafc+q1NaKoMa79m2RXU=; b=vlWls//E0eBqkRx4NHOKCzhDAXn2ISVJcUGVS+kwp06yQPCypNio+ELgRvIE2Q/NU/DtZW PnqZKwOI84TS2H17C9v3WOITMERIubUMU3Jq7fxwL6aK8rl2Y0OXnH/xB7SMh/kyTaiyqt bs6SNytO2kG37qEBOlgxWUOFWA26AOA= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1731715025; a=rsa-sha256; cv=none; b=6+N0rspx2NHGLyGCNTLUEj/HuAqgj5Q3Jqzyw1ixtdMicu8qN4qzHEW2+4QyyvGtcJsVHl qIDvivaQQCFNDX7928TczKFlCIbt/s54J9vOfd8fZHffy6R7A58SvdnbC1TuGIVSlfBKS1 ow7PFwQ2bTeMa4d7cFK8Pb5Ew1sYgdo= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=op9Cv3fn; spf=pass (imf25.hostedemail.com: domain of 3CuA3ZwgKCOkVPcPYdfYRZZRWP.NZXWTYfi-XXVgLNV.ZcR@flex--kerensun.bounces.google.com designates 209.85.219.201 as permitted sender) smtp.mailfrom=3CuA3ZwgKCOkVPcPYdfYRZZRWP.NZXWTYfi-XXVgLNV.ZcR@flex--kerensun.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com Received: by mail-yb1-f201.google.com with SMTP id 3f1490d57ef6-e381d025d4aso2212265276.2 for ; Fri, 15 Nov 2024 15:58:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1731715082; x=1732319882; 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=LrEBNSRkiEojOqX+4gfP8RZsafc+q1NaKoMa79m2RXU=; b=op9Cv3fn9dzpBpb5ZbOUa1jzgiFxY2Zzz3Yj6pL2moLXrnkzbERekuyUVlpKif6Vcg OVY/nKDJV29b4JwcJq7rTu3kwPJ4Ie4TODaNfbmXUWEtJogfgod/YU/w4FzQ415AgPss c/lsbNtAZmnnwb/R9U7/xqqqpqAImnoB/MgNqShxNrtGtFc6X4z2F6CMFbyA3cwq2L/G JyN5ujOyyMmtibnd6Py59kdiafyl0NN6UKBQyxBa/Wt+Ao5LT3MdShGm3BRyVDmx+pAC uzk8nEQ5wBmNE+oypp5uhL0uOsotHfsStpcy6HF+6dknOdEDDShrjypwIsINxPEY6Iex fbwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731715082; x=1732319882; 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=LrEBNSRkiEojOqX+4gfP8RZsafc+q1NaKoMa79m2RXU=; b=mOcWXs6ltrHUK8OyUfa431xlbddMQkg2/WNM15WfCBmg2T7EQNeaJqC/nc1T11ioEC 013w5dhgBQayay/tyqFZ+35h3aVDq3UlKKR8h3PxrsTcs4MdBoxT9yolT/0bjlkXbT/5 eSvFjOrqEpGq5oefuctI2ds+Kv6nIKbf/93YLo11It8fMQHeV8Td2TfAxPhNoFuWN6L3 vKdjUfzmpDY9m6il4Ch1a7hmhXU3mpNkwSosBP/iPrfpsw89umT1gkdqEFoIVAYedUZb GJKDQJZ/cXpOsAbbW+CZ2qGkRp9hTmwhaqS3bW2QvsD3bWw29spCzy2ojDNJsPs/PlZW lCmg== X-Forwarded-Encrypted: i=1; AJvYcCW2pOhCjM8bil4IbTDWCkmY+7larbU0jebVTeEzh5acVAfCp8VmPjoBffthRGDWMXemQmm7yU/wjA==@kvack.org X-Gm-Message-State: AOJu0YwF642YqcrG1hXlv1TwDdnXWblC25YHUwBhDXUyKJPCMvRFgzQn 8fKpYpAlGUHdZhC6iHvvYPovju763tTZysblAMDrJ2BsNv07tUq3Z6YWZf04FB+ke1nG+ugqgOx Uf/YMwZx8Tg== X-Google-Smtp-Source: AGHT+IEj4KClsgSqXktbEj+ARf/VjHaKN8ZOK6NA9iO0b53n0H+SstnU5eqFIIEUIzmZZO9P0LaXRT13p0uoWw== X-Received: from kerensun.svl.corp.google.com ([2620:15c:2c5:11:f2d6:8e6c:5a90:ef1e]) (user=kerensun job=sendgmr) by 2002:a25:b001:0:b0:e33:104c:fac8 with SMTP id 3f1490d57ef6-e38263b7b7emr3194276.7.1731715082063; Fri, 15 Nov 2024 15:58:02 -0800 (PST) Date: Fri, 15 Nov 2024 15:57:43 -0800 In-Reply-To: <20241115235744.1419580-1-kerensun@google.com> Mime-Version: 1.0 References: <20241115235744.1419580-1-kerensun@google.com> X-Mailer: git-send-email 2.47.0.338.g60cca15819-goog Message-ID: <20241115235744.1419580-3-kerensun@google.com> Subject: [PATCH 2/3] mm: remove unnecessary whitespace before a quoted newline 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-Stat-Signature: g661jhifz98y4h3p7ufgt4a7soaaso3h X-Rspam-User: X-Rspamd-Queue-Id: C2DF8A0008 X-Rspamd-Server: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w5VVIJHjDBh1CXqEe87i0TJuCUa6R89Et6eu+63ARNHFAPeYv/X+KFfgfRLyyelr4K1v5BLI2Nl+wzIoRc1qZKrQslfTpkkrRIetVfhGtIZdvEFLqpmrNvcPfy0NXVove0ZlhWJUGiP9ht9E5Z34e5lU89tEo1wNLYxdZ5yr4ZW4MRjwJy28ubjNFZ0lI0JOgo6sw/qAs5gHTRaIqejA/X50/5uS4jCdwT0NOcX9RwA4Yn0sjrDjA08zIs1KCH7v7Rc6a0iGOJmQOsIr5Qpvjbv4Z4I4efsem6bvZQSCsBej+odQbfexSJKTsnaltQMZob/CTVvuBrU15lmii9cou3AV/5MRevRNGbyk/ZGVkivsGGFn1GfY0KpiLM6zjQV6ibf/+Hxu8iZKXEAfQ/H/TtsowpLOXx7dbxgHiNLY+TRo0RbpKcekeWmtF7Fs45s/FisAlpAUsnVxZLw1+nY8NtNUB5olLrJP8B7o52/pFveK37Nkcbg0zcH80E/YnUUF9AWn4Z1iChEYWw3evh1qFS1ZaMQ1rgCYqNFbXaY1c0= X-Bogosity: Ham, tests=bogofilter, spamicity=0.007074, 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 whitespaces before newlines for strings in pr_warn_once() Signed-off-by: Keren Sun Reviewed-by: Roman Gushchin --- 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 465201ef40b7..4cbbced0c8a1 100644 --- a/mm/memcontrol-v1.c +++ b/mm/memcontrol-v1.c @@ -1043,13 +1043,13 @@ static ssize_t memcg_write_event_control(struct kernfs_open_file *of, } 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"); + " 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"); + "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")) { @@ -1895,7 +1895,7 @@ static int mem_cgroup_oom_control_write(struct cgroup_subsys_state *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"); + "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 Fri Nov 15 23:57:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Keren Sun X-Patchwork-Id: 13877414 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 3579BD68BDA for ; Fri, 15 Nov 2024 23:58:11 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AD3CC9C001D; Fri, 15 Nov 2024 18:58:10 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A5BC09C0018; Fri, 15 Nov 2024 18:58:10 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8FD8E9C001D; Fri, 15 Nov 2024 18:58:10 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 6E2D69C0018 for ; Fri, 15 Nov 2024 18:58:10 -0500 (EST) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id DBF40C09C8 for ; Fri, 15 Nov 2024 23:58:09 +0000 (UTC) X-FDA: 82789992306.20.3E2B44C Received: from mail-yb1-f201.google.com (mail-yb1-f201.google.com [209.85.219.201]) by imf27.hostedemail.com (Postfix) with ESMTP id 39B1340009 for ; Fri, 15 Nov 2024 23:57:21 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=QZbOXLsB; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf27.hostedemail.com: domain of 3D-A3ZwgKCO4aUhUdikdWeeWbU.SecbYdkn-ccalQSa.ehW@flex--kerensun.bounces.google.com designates 209.85.219.201 as permitted sender) smtp.mailfrom=3D-A3ZwgKCO4aUhUdikdWeeWbU.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=1731714908; 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=o1RIpUDtZXSgBRqjmugzkaN5U5eWQ9w7S4LovaiX8vs=; b=5k7X+3RUTeiGu/7RtQVcGk4FMgb4FFUFv4fJQnJjs0QnOgoybYR6ZF3t2Q8Gp1s4zSN5ME EGd/CabKDyo7pl9DZTxMga86To6AHvnR0YNTcdFzyr1XeTIvAJBa8VakrNmlmG+YhGv/L8 kaVzyj6m6Ua5XP9LTZt3GSPb8xJttRY= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=QZbOXLsB; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf27.hostedemail.com: domain of 3D-A3ZwgKCO4aUhUdikdWeeWbU.SecbYdkn-ccalQSa.ehW@flex--kerensun.bounces.google.com designates 209.85.219.201 as permitted sender) smtp.mailfrom=3D-A3ZwgKCO4aUhUdikdWeeWbU.SecbYdkn-ccalQSa.ehW@flex--kerensun.bounces.google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1731714908; a=rsa-sha256; cv=none; b=O8nA4GRrkZciJHnQNfFdwSuugck2A2P629bDLPU53MsaLMT8FKvziTi1N1GfnLlKLTyd9/ +NSnnQRJE7lKIMNfydsFqEhanfTSJHiXCjau7cmcbRLOq2F2sHB9qmsANgIbiD1x9MrHO1 Engh1FTFWsuVeT2UqkvfkbQZjr+l5k0= Received: by mail-yb1-f201.google.com with SMTP id 3f1490d57ef6-e30b8fd4ca1so3281441276.3 for ; Fri, 15 Nov 2024 15:58:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1731715087; x=1732319887; 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=o1RIpUDtZXSgBRqjmugzkaN5U5eWQ9w7S4LovaiX8vs=; b=QZbOXLsBYkX4oOap6bHm2qBGlP7MgBT+ITJOEQR7ui1SChrvqt5wc7TUMB2NK6nrOH KwvIyLTQxSQkgA4V6nxszRSbZDKhsxPQ0FKyOIXfbvWU2JRuNAYIfvYpyVuVUw3vIqpM d8bF0ma3BPyXsbx4V4IT6xvdc3Zo0Gx076TINaeEcib83I3a7v9kR9toE+VHxjDxfocQ Gn90YJETD/Z/dOiTK25Xtj2Z9vY0SwqblqPhW3goZWP05YMRUK3d1jGeBVUzHPoHMR5a COFMd+nDxrIHil4OfAwsndVAsiVEcdgB4T+Ws7ccDDX1lKIWuhfUDTP5ZJPvYinL9PkK ehlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731715087; x=1732319887; 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=o1RIpUDtZXSgBRqjmugzkaN5U5eWQ9w7S4LovaiX8vs=; b=M097Ozcpwv3s40+DGYakiTU7qkaOivg62REkRsID7kUA6tfFvbBnlzWLAq8HVx6++s ZGqHrfNhNnT+G1YzvhOSklXhASzccr1xKF742bqO4tAa0BSDUH0K08NXEmECL8BZDcpg FhBvPEIvMVB9QmFL4pGiFhD/beoB2diHMiv5QhbnYA8UvQADBdpLb56hB9plbnotVbNy WIsTYIlRnkomkQYAQNHLDCRmKgnsfPZqB58eulgeZ8HwEhYGWlCsLZWTv2JYQOg4YUP0 nGNpi9S3Ztp9traNukaM6ZxecQIZAoiNklxQUz6VnaNo+795UX5LGRbvMvCvhs49bGR+ qUWw== X-Forwarded-Encrypted: i=1; AJvYcCWQbXcE8C2Gnf85uKSBh74s95C/0AMl4IW/e0d1DTXslPyCJPDgPiISeDAAwjFfHHMqg/EOYS+ncg==@kvack.org X-Gm-Message-State: AOJu0Ywe40guf/jOrxP6Wgq7t6ddVkeEM0SC6jfPfUYnnMmPXRlKPvhC o0gJS0vVnLiutOhrf/qQZ39lHJMqOZY1+hXsh6LoavqS0JntnWhDvExkRxjz5CzgBhqfWCb0n38 Ty+jIBPV10w== X-Google-Smtp-Source: AGHT+IFHD4awoAKkBJnBwCEuXy6ozkFUMt2EYzDoJvjoWIITqKtBMoKHRd36j2A63QZEq6HL+REkETq/YEWdvA== X-Received: from kerensun.svl.corp.google.com ([2620:15c:2c5:11:f2d6:8e6c:5a90:ef1e]) (user=kerensun job=sendgmr) by 2002:a25:bb0e:0:b0:e38:2136:9482 with SMTP id 3f1490d57ef6-e3826614e75mr3790276.10.1731715087375; Fri, 15 Nov 2024 15:58:07 -0800 (PST) Date: Fri, 15 Nov 2024 15:57:44 -0800 In-Reply-To: <20241115235744.1419580-1-kerensun@google.com> Mime-Version: 1.0 References: <20241115235744.1419580-1-kerensun@google.com> X-Mailer: git-send-email 2.47.0.338.g60cca15819-goog Message-ID: <20241115235744.1419580-4-kerensun@google.com> Subject: [PATCH 3/3] mm: remove the non-useful else after a break in a if statement 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: rspam04 X-Rspamd-Queue-Id: 39B1340009 X-Stat-Signature: rty6y8fp1p6kcmy81rjgbwwm644386oy X-Rspam-User: X-HE-Tag: 1731715041-726046 X-HE-Meta: U2FsdGVkX1+4boRD+JaoWOVAh97jt16d8Ana671/743wQeeex2kjI8/FXyUg5PB5mVlCMDTae7bfCBnUzaCsNZdGPoXpiUafigxAQ7548Tg1+M+T0TASfNUU4Q+REJrdXqm7R135bANf8N3elrUpbBTsZEc4ngU34S6ip8dcJGRhVx/TZPZ8J69xwKG8xDlXj1Imng+8EfmjjfjPqvsgLy7o52v1bSgLaFxvz4GQrwE1LNppThRpvHDlC7LjADQLMfyvQQbAaY4bRgdzgvkkDlH0fd8Y37fiOJQTjeKjo3xsuHCsMgI7ffOmUvy26LvuVqWepi6QqA/2MY9f943PGUqdFuHvgUwICc1kwAJ9VVyTAM+OlnTpZOrxXUyipiZObRNhNUPiICuk6tLEsKBTq2hQg628fjHazY/i44cJYtXb7BhMHCyDuj1Rd2mD8sP+fc/MlE+6pmEol9v98rYVkWDzhBflvsN/gb4wKxjX3J8iVL55bqGcZ6sQUuUif8lhnYC5ZbxDD9N2CqDlYJ21RbnjVeNUCLyJuBpmAe1v9bwrIbyaUB1chcsQhoORiyK1Es+Jfk0+PiSlr/od31WISRT2fHoO1upgRkU40/DmMlUzwMq5rgaJiakNAAlNhhC6qcjdMWA9UWOKAlN4MVxDt1Ylio+oQW4BXMD/b7TLqAO+A6uB+dhyfASzgF+Vkh1fX0wZwPhLYSQbyRLc+MssP9ULNu49tkhAMKxOW8v5GCcgaGg35Ej6+9/kx2a844iiIsk7RbpRrptglAYZC6FLIdqmph/wPBpFevOjbKMek0nrxPm5eOMfJRafd8rK6NSLlRSyLu9x5hRxVj5dkK+SG+70Msd3kujtoOumoXI+y5Tykmgh7z+YsO7BukSZgkhd5bdZ4Wxow1cZK7rD4PQSXFYsq8Yb6/IrJdETnaioTWb41YPubwr3BVKAgnrTQm9D/WbuqpqnnXYrYUhRlDV DXy5NLk/ NAq7wjYEuzT5ppsnd4HrbYMUlxxUssyB9IBs5psnbnJ0Ff97dCq3ipF1M3Err9YEW54wrFfMT+ziSNJs06/9j8eLhCZ5ps+ul7U6yh1W+P2hs8bFre42+iU6B9CsB15Ij2Uipu/0H2gnD0GoG/Fihh9uoOiFKNamgtZzqFWKd1MPcXR1UmZqGBYtuKUxk+p+OP9XyCfzkxhATUxddWFnv4X+dZMODXZlTdjq+h4M9WTA9Y2Qn0yY8D7BGLqTZoPDgU5BZImeZdNcCjbF1FXePHE9KomdcRne/O0rXZhlA9ca5uUmnVLRfd226bVQzRUcH1TJvF/Tlh4nzrdWRYBL3Nzdi+MM1jeQwZap2xZsXrOBsh1ZoDfi8mq5mrX6It8TZ1tPvB2ibN8SFhiAFsMmIQrh4Ctt2DQDBxQk4m+BBjvLKOYl/h+HDBHGtd4Z072pedjU5ud5HULuz1dRGc1eWys3EVsSbgtFP5iqWNn/CRX0lk1IFWUqy6rqFQ6mwcEkTpwqc90V8IdzO/J3XWvcwjhxf+PHokutioMCBly7u3X/SfbkOh9zy+Fysbg== X-Bogosity: Ham, tests=bogofilter, spamicity=0.007195, 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 the else block since there is already a break in the statement of if (iter->oom_lock), just set iter->oom_lock true after the if block ends. Signed-off-by: Keren Sun Reviewed-by: Roman Gushchin --- mm/memcontrol-v1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/memcontrol-v1.c b/mm/memcontrol-v1.c index 4cbbced0c8a1..423c861acdd8 100644 --- a/mm/memcontrol-v1.c +++ b/mm/memcontrol-v1.c @@ -1148,8 +1148,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) {