Message ID | 20241115235744.1419580-4-kerensun@google.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 <linux-mm@archiver.kernel.org>; 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 <linux-mm@kvack.org>; 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 <linux-mm@kvack.org>; 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 <linux-mm@kvack.org>; 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 <linux-mm@kvack.org>; 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 <kerensun@google.com> 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 <kerensun@google.com> Content-Type: text/plain; charset="UTF-8" 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/FXyUg5PB5mVlCMDTae7bfC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d1MPcXR1UmZqGBYtuKUxk+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: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
mm: fix format issues and param types
|
expand
|
On Fri, Nov 15, 2024 at 03:57:44PM -0800, Keren Sun wrote: > 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 <kerensun@google.com> Reviewed-by: Roman Gushchin <roman.gushchin@linux.dev> Thanks!
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) {
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 <kerensun@google.com> --- mm/memcontrol-v1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)