Message ID | 20240425071929.18004-7-richard.weiyang@gmail.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 93D0EC10F15 for <linux-mm@archiver.kernel.org>; Thu, 25 Apr 2024 07:20:11 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1C24C6B009B; Thu, 25 Apr 2024 03:20:09 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 125E56B009C; Thu, 25 Apr 2024 03:20:09 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EB88C6B009D; Thu, 25 Apr 2024 03:20:08 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id C5DE76B009B for <linux-mm@kvack.org>; Thu, 25 Apr 2024 03:20:08 -0400 (EDT) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 7050A411CA for <linux-mm@kvack.org>; Thu, 25 Apr 2024 07:20:08 +0000 (UTC) X-FDA: 82047205296.22.6C2BA51 Received: from mail-ed1-f54.google.com (mail-ed1-f54.google.com [209.85.208.54]) by imf10.hostedemail.com (Postfix) with ESMTP id B5F4BC000B for <linux-mm@kvack.org>; Thu, 25 Apr 2024 07:20:06 +0000 (UTC) Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=nioaf0Xz; spf=pass (imf10.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.208.54 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1714029606; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references:dkim-signature; bh=2EdLBH5AimODvZjB2/ARQXxleA2ZhKpCNLWbEJSJDI4=; b=1XkEimERWjoRv9KmENnM4Cm51aUaqUMp9rHmJ/cbruGf6h8GcDERbWh+UYCZ6mM0g6nAno yPwM/dYV2PIbYIG5Pg1nvNfxK7jogbV4GUhhq6v+TXgi/tVHv0svPIeLhmW0A6p4dWB/Xp oVWZhzaO3X2qNqmqAK7YuxvcXcnQMXQ= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1714029606; a=rsa-sha256; cv=none; b=a/Z6S4gxIcdiFRfbhb8Nc+Tq6NTSnzw24Bgl+k6y2iBBu2oThuuAslsMhEWDB1MwO27gtL 8TyLOzXDdWnyOpe80GUWDfqDbseKdv2Vl9o4tzidaNWIX/zxg0TrY3UqAYhzLsNlw0rNgH S9+I8ExDUwNRvbfylA5tH7MSQL+bnBg= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=nioaf0Xz; spf=pass (imf10.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.208.54 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-ed1-f54.google.com with SMTP id 4fb4d7f45d1cf-5723b4eab48so481233a12.0 for <linux-mm@kvack.org>; Thu, 25 Apr 2024 00:20:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714029605; x=1714634405; darn=kvack.org; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=2EdLBH5AimODvZjB2/ARQXxleA2ZhKpCNLWbEJSJDI4=; b=nioaf0XzWdqc06quIZU2inU3oU6EigW1D/H+YNb2EZR+nZLeUl0+35evDISjFDwdMd iBRXvHfsRlh9LML9FHU6CXl9EpGovgDGWvu/QdH//1gEBgQkltAKTCJ92Q2eXE7cfTik L0or160iuupEE9ZaR7EB7DjyZ/tX2b//F6cX3jy8zcCay7drSUJ+NLzphE2EDDIcmEe3 TQXv73G9Zw9Qb1AgQ8bQYj5EFaUylFI7kkAnOFlDiw17dZfPz2yUv3q23MDEEHCfTn+P 9vFMv8VcimqUHToKeRyXiy/QJJMgTQ4rHYc1wgHrLd4eNVUzubTD0U6UI+ClAJleoxW2 LXXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714029605; x=1714634405; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=2EdLBH5AimODvZjB2/ARQXxleA2ZhKpCNLWbEJSJDI4=; b=k4Vfkx3qCRtLmi+oOmmldkqbw9/uYSMkD5yF2yFdjkw+mPRl9oS1DzEsqDoVLj3M3K C0A4WKLPTL29O1Ep0cOaScKijM/GzkgjKc82aZbG4UjtdhxDjM8VxGg7CjcomAPpIkUh J9daa+oaD+bdHyCcDFiEeE95/LCDFFJR2g8O15iVioYvkSWzO7CMLMYX4crEnsl4PjpD PkdamrVKh84qdhcX0+wyGSJK3vZEWQKmamjHJckXYYRbhCXYE4OCG0EtcMVdsllNGi+m R4PnPrYmILakefmyGk4eY9GyPwQctqbO1iCzCNfjbKbSZ+kXkDJWN8vdqEG09/GklaTb ZsHg== X-Gm-Message-State: AOJu0YzyKCT1dgwKv9FHTxW/O9k/mGo6H17cgq1UXGGckVDVuHUsV6Ky rvGTJUl8PxYHhvVJvnBgoyqfLQ8mYAiNC/cZ9p6yN9qa+B+gRsW+kNtJ3wVm X-Google-Smtp-Source: AGHT+IFS/K2gwnITTc6i0LSRJc6wpdQn1YIK+miHy+3ipKic8uYXj5HNMZ4aSddUQUreazhiM6+T7Q== X-Received: by 2002:a17:906:c49:b0:a55:bee5:52bb with SMTP id t9-20020a1709060c4900b00a55bee552bbmr2940481ejf.3.1714029605286; Thu, 25 Apr 2024 00:20:05 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id s17-20020a170906bc5100b00a4660b63502sm9397300ejv.12.2024.04.25.00.20.04 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 25 Apr 2024 00:20:04 -0700 (PDT) From: Wei Yang <richard.weiyang@gmail.com> To: rppt@kernel.org, akpm@linux-foundation.org Cc: linux-mm@kvack.org, Wei Yang <richard.weiyang@gmail.com> Subject: [Patch v2 6/8] mm/memblock: return true directly on finding overlap region Date: Thu, 25 Apr 2024 07:19:27 +0000 Message-Id: <20240425071929.18004-7-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20240425071929.18004-1-richard.weiyang@gmail.com> References: <20240425071929.18004-1-richard.weiyang@gmail.com> X-Stat-Signature: ije58k1511fp9djs7a1uquahsr85g94o X-Rspamd-Queue-Id: B5F4BC000B X-Rspamd-Server: rspam06 X-Rspam-User: X-HE-Tag: 1714029606-311586 X-HE-Meta: U2FsdGVkX1+WMa6Y6DN9XXzc7QV+U5fKpZbyKhaiXdXnhFPvKzzkaH1Bz1ekcB5dy+3VICckjzlhCiqDCmo2rT1+WR86rWCU1eyY69CvZ4ERc639A8MPiktt9dxYhhuqQA8QJMSLeG5am2fFt4S4P/3kYC+kNguRUhcC6NyEqcXd5/7QbwhS0iXkgQDdj95AUZw+Fuv9gmBmk8Rs0pu4klG0fAyjLExfGPFlV2mEV44/PF/hJqrf2EWr6xWb/2FAZCrd8rIZXbI0VB1YY8e+ramieV4WTRmcszIRYq9N/YCph+QGh3KN3XAtynHJmuV2jPallSQnF1fl/AwhCrNg0cq87QCFAifylSU97Ux1kgtpD68HhmhSLg+zOmbUgOiEh2W7GCR/0qF8QoF/yp/x1wzOYsmhVXXE4Ah/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cOkB X-Bogosity: Ham, tests=bogofilter, spamicity=0.146131, 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 |
memblock: clenup
|
expand
|
diff --git a/mm/memblock.c b/mm/memblock.c index 53e3aa2cd9a2..4125506d8af9 100644 --- a/mm/memblock.c +++ b/mm/memblock.c @@ -194,8 +194,8 @@ bool __init_memblock memblock_overlaps_region(struct memblock_type *type, for (i = 0; i < type->cnt; i++) if (memblock_addrs_overlap(base, size, type->regions[i].base, type->regions[i].size)) - break; - return i < type->cnt; + return true; + return false; } /**
Not necessary to break and check i against type->cnt again. Signed-off-by: Wei Yang <richard.weiyang@gmail.com> --- mm/memblock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)