From patchwork Thu Mar 14 00:54:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 13592017 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 F101CC54E66 for ; Thu, 14 Mar 2024 00:54:47 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 04ECF80071; Wed, 13 Mar 2024 20:54:44 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BF0318D006D; Wed, 13 Mar 2024 20:54:43 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 77BD180071; Wed, 13 Mar 2024 20:54:43 -0400 (EDT) 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 4B2DC80071 for ; Wed, 13 Mar 2024 20:54:43 -0400 (EDT) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 102F9A157E for ; Thu, 14 Mar 2024 00:54:43 +0000 (UTC) X-FDA: 81893824446.28.296E1EB Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf02.hostedemail.com (Postfix) with ESMTP id 569FF8000A for ; Thu, 14 Mar 2024 00:54:41 +0000 (UTC) Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=r0hduQlU; dmarc=fail reason="No valid SPF, DKIM not aligned (relaxed)" header.from=kernel.org (policy=none); spf=none (imf02.hostedemail.com: domain of mcgrof@infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=mcgrof@infradead.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1710377681; h=from:from:sender: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:in-reply-to:references:references:dkim-signature; bh=7afOyl7nv+Mi2FyolEBEsVPtXVCWDMinpJ3b7YCSncQ=; b=w+CyJm0REfK0ZMWW9iJRSv/rkSX/wvdYTPKivBDgV9Q7wtRuFkRqDtAtSh3T7Mrxaq8m2y 7wIz4GpuajtDJnYYRqKNy7RBHBL9CQyyyav5x3Cn2jYDZAp3MrAJLB+wHlbYyAJW4Owr3/ H6FRuzYZNcW1Ms89valXLfovKL715gM= ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=r0hduQlU; dmarc=fail reason="No valid SPF, DKIM not aligned (relaxed)" header.from=kernel.org (policy=none); spf=none (imf02.hostedemail.com: domain of mcgrof@infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=mcgrof@infradead.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1710377681; a=rsa-sha256; cv=none; b=or9txwHFTvTLCFC8x9GR4WBTY4dmgFhCXgS12+gMmKfX+K13c5e6cXeTFecBgfilA+tSTm WHll+mIJt6qoIpMPCrG5icgjx9IoOhxkw/sLd2n2oIZCkZIoPjDj8GEJFgJ5K6Y1G+IYHt 7wWa2VzaxD+m+3W1ZGkHkMddk9lLzjs= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=7afOyl7nv+Mi2FyolEBEsVPtXVCWDMinpJ3b7YCSncQ=; b=r0hduQlUY10mSUkoM9CAoK9lkY yTEkaLMR27xDBoYJKGbslC7WZIvQXb4tlMjx+hEm/VkTWjjgeaw6Dh4AS48tbKqqNwv/oVRFt/2ta 8dWEbIaV4Z4BQuqcN1A+OoK/m5xwTbjJ5iqq9SObSEGbyZo4zlqplKXYlWI1k6bUDwY273nsRqykB 7RehX2u5lZDO1JbzAel4LeqG3LjmL07vw/Wv0/tZJt/8kzLfBjKJ/LMnqg01l8UKJ6T+0I9TshIxN A/66N/n4PAoQQw/KTp/hDAZ79HtS9FuEf/NDkv/loDe+kcCcTMjQU8I492IF9burTzY94jLRQMWPH XhLuJErQ==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rkZMj-0000000CQo2-0f9b; Thu, 14 Mar 2024 00:54:37 +0000 From: Luis Chamberlain To: akpm@linux-foundation.org, jhubbard@nvidia.com, vbabka@suse.cz, mgorman@suse.de, linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org, dave@stgolabs.net, p.raghav@samsung.com, da.gomez@samsung.com, mcgrof@kernel.org Subject: [PATCH 1/3] mm/show_mem: simplify ifdef on si_meminfo_node() Date: Wed, 13 Mar 2024 17:54:33 -0700 Message-ID: <20240314005436.2962962-2-mcgrof@kernel.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240314005436.2962962-1-mcgrof@kernel.org> References: <20240314005436.2962962-1-mcgrof@kernel.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: 569FF8000A X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: 3pzdgqui66jwmesfncdc4utokkeqskd1 X-HE-Tag: 1710377681-193791 X-HE-Meta: U2FsdGVkX1/sLvvNVCmHltnmYMt/ZFcQ3e7+0gdu/YRRtToX3i6S325K6SDP8r6ABZIrBeWHkfOFGbjFGMm6w1ZVdYxQf3vSn4FIV/dwRWvFEQ01aymW3X+EDwcRjLRcHZ95dInTTTYN1MGYl75nRJlr0IFwdwSbTVk8lgcq6j7UwRNrrrxQKQI3V1vjp0B8g7AlsNv30joE/Gn1lTDELPnYqmbt7aL16lg/NXu1w9Xrb04he2DwtyHztOWvAEwsMR4bAvgZpNzdVIHfTnO02IaN1r7l/VIzoDVR2ehOdBDFBykWd//DsGK3F52SvnishicnKcq3UhWPJ1RyoX0WLCPR2y0bYvsokZZ1GqrzEXqiNIcUIpZ8SACepSQwHxEmOdNqoxEWNiP8xFlxwA23o28MuzbyjpiMPoJYkh/MnoLjDPgj0rL17yh3abk0yG+jdQYgPQlLao873uvG27vHe/hOOW6NuDz8r4np4r70QXzUQSxVkVn/yFarSnZbN4lhLIpUdhvLttHYhnJ6LZZz5+2m18Cz0zeXjrDJqtcfeL0NTq8IPX7CCyrmYhxf/88ZPwO/lC5IBkj0yDxbybwaxT+a71R5wthUFeNKVBkNF6CXpmPdCAZPV220Yi8RCU7cXW0BDhtOaABr1VwL36pP5GO/1e7mOjZDK6MF3SwNWUQEaQcu2i9UbkzpyRXW+Gx+ERqjnyXGNqbcGjW5civBqxMeW6xDecM+tD9SglLmIs6vXIKIRgyn3YYrIXUPKoSeGSIAKUsnmUoJ3o7iemfwCuqHfwxaiVN9uHT6NibwCzJzGKLBe9ih1aS1dWXKOF7Y0lF1OVijM/l9bvi0Bwy82vfkK5WY0mQlcanRZZM10Sm1rKK7VuhFpaQsnq3riNVZ0HBkaropm65l5h2u0oAXvkkcDGFfdqwAZLsrwf9Uyk3WcytAcahINuQUZ/O6J+G4obWZg77YXJZmTYL5iiU fZo5Kt1C Dblzjbp/4jrkh+mKeRVzudprBLF6IflJoz3G+lfu3Df0Whr5sEoeRUnAZh4/QgreSiUNkKgtaPWjofPiIcmoQznEvYkm7RStZzFskBaiQ3/rw6HvIyl2IIf9zKCt1u5biyWYj0f5evkCj2J9+IEksKj+Yn1r8AJKIS1xS 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: There is an ifdef where the same exact values are used at the end, so remove the else and keep the same values for both conditions. Signed-off-by: Luis Chamberlain --- mm/show_mem.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/mm/show_mem.c b/mm/show_mem.c index 8dcfafbd283c..529d2f9b6410 100644 --- a/mm/show_mem.c +++ b/mm/show_mem.c @@ -108,12 +108,9 @@ void si_meminfo_node(struct sysinfo *val, int nid) free_highpages += zone_page_state(zone, NR_FREE_PAGES); } } +#endif val->totalhigh = managed_highpages; val->freehigh = free_highpages; -#else - val->totalhigh = managed_highpages; - val->freehigh = free_highpages; -#endif val->mem_unit = PAGE_SIZE; } #endif