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/mhdQAYlYXhm9wbVr5aDm1h2XLWTLr0lJChmGcsel7R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fYMhMBGOG0gXZXJ8h71tUya2/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))