From patchwork Sat Nov 16 01:48:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yang X-Patchwork-Id: 13877449 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 EE07ED68BDD for ; Sat, 16 Nov 2024 01:48:24 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3FCC69C001C; Fri, 15 Nov 2024 20:48:24 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 3AD5D9C0018; Fri, 15 Nov 2024 20:48:24 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 24F4D9C001C; Fri, 15 Nov 2024 20:48:24 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 0690E9C0018 for ; Fri, 15 Nov 2024 20:48:24 -0500 (EST) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 6E0F61A0BF1 for ; Sat, 16 Nov 2024 01:48:23 +0000 (UTC) X-FDA: 82790272824.28.F8DE7E5 Received: from mail-ej1-f54.google.com (mail-ej1-f54.google.com [209.85.218.54]) by imf28.hostedemail.com (Postfix) with ESMTP id DB231C0002 for ; Sat, 16 Nov 2024 01:47:29 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=YEg2jX47; spf=pass (imf28.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.218.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=1731721551; 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:references:dkim-signature; bh=UKzRaz83ygTxR9YtoST4vGGVNKkCVhcJX7awF2wIfKM=; b=yWD9olDS0ciKWdqppXUWPnTMSR2U1jRPAuBC9EYGuI8Oo7yeyRsubXBxjIJ2mGXM/I/gjZ qmGhieFEBZp9U4rROcS/mAY3az0iQ3kexmcuu0EPOz4LZ3adD3LSUuqo/sc9KJUTJd0Ico tf071MkzJYJUjM5UnhGXfw0x0cYYvBk= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1731721551; a=rsa-sha256; cv=none; b=Uz7TjXKBG75CO2aZeTribR3FkWfbcJd4Xer0+YZBApe1KidDJPJ4rIg/4Hrq+y34zQLS5f awjZYez8Sc17OSnrC7ye3eeTFHUJQCgJ+toiIzAq17G9KG+mUGJv0WjgB47fvuY8i/Mwso +9AEOaNvR93eBpHEy9oK4NH/kyFurkI= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=YEg2jX47; spf=pass (imf28.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.218.54 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-ej1-f54.google.com with SMTP id a640c23a62f3a-a9a4031f69fso365571266b.0 for ; Fri, 15 Nov 2024 17:48:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1731721695; x=1732326495; darn=kvack.org; h=message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=UKzRaz83ygTxR9YtoST4vGGVNKkCVhcJX7awF2wIfKM=; b=YEg2jX47NBt+yZSDAUy4iWrmnIEk1qyqHoTRXcYrmAjD+cJIoGokMqAGayC+eRzmrr xzjk5IRhz1OQVaV/5EWu7pZOSG2ZqIXwSpwUV9KvocFicl4INeAs1jSevoIJOmnmckQF B4WNmNlvCVfy5S1K6KQuwxKifUjiwyparRyEj9dIc90SRMzc7GUgKhAwJxFwdCORNJNr pOVGU1SmPG6f34sCJVTR6sHqaUn8JFz+l8AfaFNlBfxPgWxOvXDqE3y3uFtOeq6jro5K ++viEdQxlyrLJUrDI+nUUPnKVoHT4VnPKlwFbTf5w1IAo24P7mrPm0W5JjSpgOxYyljO rGaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731721695; x=1732326495; h=message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UKzRaz83ygTxR9YtoST4vGGVNKkCVhcJX7awF2wIfKM=; b=dsRO+i4e4egFP2ltsks/Au1dTh32+0Aoz2+RIcpWBknPrTi9YCH9WznR60C11CBpl5 1h16MXmuwD+Yp5jWIvMI3joFHdnrYebh7GTElq+/N0N9Kba9PehLZ+mS90WApq2sph+t g1cZsxYchZV0k8obOWJ2+jg4uEj6sXWWE5WHpd1Qi+kmwKzVW8/KvcsLBwkecqrRHLIo N3dfu0QSfRJGoWh8T50SaT09TAyKn1IDcd/ceg8qKLEEZ7sZnW8Lm1vwBgLXT5v0oU2V gPk+Unah1e66shfcj/ifYa+DP0c8jZ5xr3DTakyYNq3W+jBkCbojVDTSI5vTWZ5Jigg7 WSOg== X-Forwarded-Encrypted: i=1; AJvYcCU+Q3qn4Z3NIdCcMzJZaAYOjPXW901fhW5Aha8UJE6YDNLrg/oPPFc403vsedbYbKEtO/WJ9DuajQ==@kvack.org X-Gm-Message-State: AOJu0YwdItmM7WKXFQUgouGke31oXaUcM7YkoDjHPCBWtJGncVnb9BtL J3//3RPB2/NuwGt1KX3eG2jGhRjV2RcWEGfWxXjqil/jAKu80wCu X-Google-Smtp-Source: AGHT+IG2vBgjEbY0igWoz9RnZ4Pf0L0aEH34FN7MbwA7onaq1dTE/1M8K3Il404o1qjjSa3SaZ/Qbw== X-Received: by 2002:a17:907:846:b0:a99:f56e:ce40 with SMTP id a640c23a62f3a-aa48352c0e9mr437587466b.47.1731721695212; Fri, 15 Nov 2024 17:48:15 -0800 (PST) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aa20dffd736sm239440266b.118.2024.11.15.17.48.12 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Nov 2024 17:48:13 -0800 (PST) From: Wei Yang To: akpm@linux-foundation.org, Liam.Howlett@oracle.com Cc: maple-tree@lists.infradead.org, linux-mm@kvack.org, Wei Yang Subject: [PATCH 0/3] mas_anode_descend() related cleanup Date: Sat, 16 Nov 2024 01:48:02 +0000 Message-Id: <20241116014805.11547-1-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: DB231C0002 X-Stat-Signature: q38yadq8nkfgfmohqq5e1xc14j4ftahi X-HE-Tag: 1731721649-515906 X-HE-Meta: U2FsdGVkX1807cxNkja2YBbMwPZIRfex3qKvuPpqDnhMqd4suL0MekkyW+ZYqPM6gLDmocxmIzrlGi8QXv/tJfsuu4uzNkMBQh4csjnTfQPSVZfjZPsL9At4fre98fWqrrl1Z9hD5BT45CLM06MBxtM9RGDBX6tBRVBn9LWW81bOfkKcWtRcQvbXDxLoseiB6I4R8kOENqUxst6EUwUoPpaNNhkz63DP5ZbpIkMSgYbNo2PMEgrXnmGGoWbudNrnDiceSpIwR4NNloZnXQOhRte18ox/IjtdMCo6rX0dgoBEfI2eKqaLnpV/fNMCkYZVfr9mxa+gi6CyYEIK8PygO2x+IewgsQ+xZuT0SQLmEOs3PIo9Km8tXWQ28AqFbWhl5a6moSbkeFrNlMJnmMZnq1O1N8ljEdHBaW/87cZCcpSfYjODxszD/uX/6gk24myR/v9oCW39MtZCO3C+Vj5wheV3B9eMI4BDC7zZEOEvKpmoqd4MCa9TDfp+sWmomydYdSHKnHzPzpt8fk6kO35kHEzQINtaY24OqxJlZo8Vat7CJH5Q9fRqJHBaPlULG+UXrmPj+GfeTJmbrCgbfuFofv35ThdnpytSm2lj+ziNHX7JdxpBxzpbIPIfVPd4U0QrekmK9pLMstYi8fYL4vioCm9q/lS417j4TVnvrblrvDildIcCv9UO+lLhzf+i1Tt2iw1TWMNCu4tPe83w2UpwXETXPxS/gU/zVg558dVc118nluVwXybMCMYnSZKzB6I0S7PP76xd0IcHWU4gJH0STf1IndHAhuyv80UozzP3bGu58K0qws6Nms0H1gRUihFRpOOgdsK9ELvrMFU3ZOuJK1fCh02UqucGfPwow/gCtfISzYGcUjJbjJO3C1+xNouYmv5R11EDT9QfcNEBLtBjTopU22H5IZ9CT6w6jEFLm3opESK75c8FTUKrcbSNHrqQ9gx6YiPLIo2Hpr+aLDr mym/jlAL 5OZrDLQ7OE6tiEQym35G/fEYkOwCudKGjnIl7sXhKZYGb2RUBK5pHTHU2siO6RhPz5LUh8etBMm6bu0qWFIkhgnqsU/X/DsG0cKfvRgQvUqc2L1Zh18/x6jtKsDoMAZgXjaRBUTG+tnqKAeNBn20cLN9xvrZFVV/DFt9COMar0fdn6deo6M3lUiOwkKLCsuvtN1srXYbhF6CZTJYKhivzKn+kq8UEDpETsf2OmxjjH9QI2iAaYEz2fnyesr+OcoZtA1zLtavJRLfLTprZYPo6GdS8VwCYBMLSOnaessbs3QL8favytPRJqbSYhhTqEARFeZYgHRYCLIpT95uF5r5wngxf9YWXBowF6cWfhxGq/OZ6Xfct4gpj110iXsI6ztj5IxbrunEG3JUFiZj2foF+dxBdNs2gtbEVibufVpSsA4F4kVHqwws39mdlZmyPTEhLiQyRNm0LQOkpVsw= X-Bogosity: Ham, tests=bogofilter, spamicity=0.013160, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Some cleanup related to mas_anode_descend(). Patch 1: remove an unnecessary check Patch 2: won't hit root node Patch 3: on error we don't set offset to MAPLE_NODE_SLOTS Wei Yang (3): maple_tree: index has been checked to be smaller than pivot maple_tree: not possible to be a root node after loop maple_tree: we don't set offset to MAPLE_NODE_SLOTS on error lib/maple_tree.c | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-)