From patchwork Fri Jun 14 09:24:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: JaeJoon Jung X-Patchwork-Id: 13698242 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 41221C27C79 for ; Fri, 14 Jun 2024 09:29:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 40A516B00FC; Fri, 14 Jun 2024 05:25:03 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3B9378D0005; Fri, 14 Jun 2024 05:25:03 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 281696B011E; Fri, 14 Jun 2024 05:25:03 -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 D85266B00FC for ; Fri, 14 Jun 2024 05:25:02 -0400 (EDT) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 881811A05AB for ; Fri, 14 Jun 2024 09:25:02 +0000 (UTC) X-FDA: 82228960044.02.C757383 Received: from mail-pg1-f170.google.com (mail-pg1-f170.google.com [209.85.215.170]) by imf29.hostedemail.com (Postfix) with ESMTP id ED230120011 for ; Fri, 14 Jun 2024 09:25:00 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=guXfPfbv; spf=pass (imf29.hostedemail.com: domain of rgbi3307@gmail.com designates 209.85.215.170 as permitted sender) smtp.mailfrom=rgbi3307@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=1718357098; 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=SGigGFS7JoII0JOouFlQKMXgDZ1z5wjwFvfN+o3HCRQ=; b=7LO3rVwXAEDGfrU2QA9pq+Yp0LdYOXqhpcfYc+5n7sEie/7kUqo6dVU0VKuFb6iVXXH1WP ADelPMXlOgbHQkdcJvfP9UBj8/tHUBB922S/b0W0hkRb6IeM8rauIaDga5BfH9DztZJ4e8 HEnf1vQKysu/OC2zpgsXt67MEOz6QjM= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=guXfPfbv; spf=pass (imf29.hostedemail.com: domain of rgbi3307@gmail.com designates 209.85.215.170 as permitted sender) smtp.mailfrom=rgbi3307@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1718357098; a=rsa-sha256; cv=none; b=vOveByNRkPOAZrWTpdYC68TDRZTsKB38oKm97apnzAB1OwjMejb/Y1GQByN3WGAI4cqDon 6y+1SuThL5rRiDEvDWcieaaj8Q75GtjgcKA5Jqtx40RSYbn+X9gGaL3F32uGdcpV340ZOo iBIHVI8wAjINyz/qEuyOXrGJJJmvvzg= Received: by mail-pg1-f170.google.com with SMTP id 41be03b00d2f7-6818eea9c3aso1558055a12.1 for ; Fri, 14 Jun 2024 02:25:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718357100; x=1718961900; darn=kvack.org; h=message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=SGigGFS7JoII0JOouFlQKMXgDZ1z5wjwFvfN+o3HCRQ=; b=guXfPfbvkWtgH7yykXKAkdlwvgT3gGhfbHX4S0j4xgeYSiIYOeLwJTz4Xy4UtN3gKJ ihUAB+z8HFCl9LF1GtM2rNVCPFks+YtXhTAHrtte1ndQDwq4jN3lj7MqNmfdYPKwY3g3 ozOSCQa+vq9j5Iy8viuS9xt99VUwd6FY3dKAEAPIuFy0N9SqQMb1q6EM2mcG4ndyeLnf Nuz7lilQIO3BOTGVCk01HgR86wsQf+37tA6sXV5NUbU/mbM4GqnvwO2ainiSPXYEBveR Qpo6dTRTZM56OpIdubTql2LM+blarFDQXGTHSshozlTNTAimkF5Algf55ppdbhtREEOL a22g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718357100; x=1718961900; h=message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SGigGFS7JoII0JOouFlQKMXgDZ1z5wjwFvfN+o3HCRQ=; b=JZYA/YNqSZTLyVYQMdiF/77H5z2jsblCKlYInwL8UgsZayTTNJR/dybF2lByWArOU+ FoNZJkjLeAUlRJeqW5w3kohVouq3utgZZV7Vam8JMo5zLAIdj+tzBk3Il5iMvF0N8NTa Bcfqj48K+u1GMUPzNHxMR2arRgjBK9mHgE/wfdBgK2bzbz4R3CjJubKefYKMYQ7n5PxP 1RFRtP8mNRkVbN3k4FfaCnf/s9CcUICImOBCzogomzS8URtTW4vaQWxWPvYnOz3HVzHr PyS623C/iJc/IcHuVlc87kEJkePe49xSCPF5NVNHjmLfvddVUJ8/gxSmR4zRM8STQIhv dLlA== X-Forwarded-Encrypted: i=1; AJvYcCUt3Z5sLBxkUb3oXh75/AELEVLDf0oPs+pY92oQX+U0LFGMTzIDlvjkay5jE3GLFvAC3WtAG21rwGeOHa7vEAArgXA= X-Gm-Message-State: AOJu0Ywxr7gHJv7x8lQKaSB1FK+tu20sYq42N3QS49bR+8WeDku6E4av LIWAp+A2JexsF72AGRrHmybTfH7c+i5Yn5378+GvIT8TOYtfBbxP X-Google-Smtp-Source: AGHT+IFSA4N7tpOYJXsM/k7aczTA2dZZ9nLaQdNsrgXCpb8pkXFDVXfxwgGSfBeZQ27W5YvaMOZK3g== X-Received: by 2002:a05:6a20:914b:b0:1b2:a94d:4eca with SMTP id adf61e73a8af0-1bae823dc94mr2526921637.41.1718357099706; Fri, 14 Jun 2024 02:24:59 -0700 (PDT) Received: from localhost.localdomain ([180.69.210.41]) by smtp.googlemail.com with ESMTPSA id 98e67ed59e1d1-2c4a76ab1c8sm5646383a91.52.2024.06.14.02.24.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jun 2024 02:24:58 -0700 (PDT) From: JaeJoon Jung To: "Liam R. Howlett" Cc: JaeJoon Jung , maple-tree@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH v4] maple_tree: modified return type of mas_wr_store_entry() Date: Fri, 14 Jun 2024 18:24:28 +0900 Message-Id: <20240614092428.29491-1-rgbi3307@gmail.com> X-Mailer: git-send-email 2.17.1 X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: ED230120011 X-Stat-Signature: mxhyrtmax6swz9mnp69nfo5qwz8ns876 X-Rspam-User: X-HE-Tag: 1718357100-720617 X-HE-Meta: U2FsdGVkX1/J8JFxN0aVc/gWpWk/R0WuqbWVNa9TeBqt3xNDNr7VkvUyCNiFODPiLxcsVaAT4Ec2zb0G2Td5iHsLtRldPLOEpMqd6j+D34mGzjWfRW0jAnO5yCB9+vPmwyNyPau1ISDAwXUOymJi109tzDTmSAzWWcZUDbAGRr9nvm+w+YZr5mSRQbJSBefvJgG2MrH6AZjOZIPneMXLHhz4zRya5Jf+D5gXkDYTsJnkxcMx/MBGN6lwtJh/Y0IgWh1oVruTjU8dZrBxDDp7qEs9LXqNCtJH4EryKIuVi0+9oeM3O2qRJYequwvXPANvZeZ5nx6gnBwvS5+wvGBhcGSOmw/LJgwiCRYJuIgwLAGgXEQKjY8n/7gCFp8r9uqamr5SIdiVsrqEdW7VXgZko/OE5RZm3PmlAeAooSyZOQAqykSl5xYohCyKDG0tMERQlQshu4rFgYXFdtbWSmWp6fpx5I/GXBhcjqcVkuJCZSrT1woWV/eiSMH9JYNHGDUBtZbvXCaZpq+ktI1vLmZPs59r9AnV5H0EZ5UmGPuEoyXHNuVWvTyxVEyDRj5RAAt9RDxyf/MqL2PBIPLsCsb9HHWoeuwPs5HnRUlIziZHyVUfOPJVUPn+x4t1OwcVRpdQXYMsE/6H9mlw6SPblvyUXl8yvrJYWRTH56Pam6l3oAYrAfIPLZvz0zlQOrKz+zdaY5kJdLM5Bnygv59Vv3q+DUOPYqCfAsBIYcciBzYwQxctHXRweHBduz9CRIj1z7gpWl2B1wkaTthtM9+Ht3vWnWNJHjEXMWiTbkJrAdqlQuJq6G90duvW1EZ5GyDhbaraCPr7tNukG64rQ7SYw4njkLniKWDqDQ0KuApvYHZrrHHiPAQJ1pEDKM0u/4SP+6KweyKD+9+4lt/YG2yg39WWZVQN2kCHVXgED2rNNeSiO824kGnEszBwBLSnclPYWL2sqBpfBi30P2PU2Xpsdxg erDHdeo1 coK0JX3fFk2V1AJQUkMcWyDkzxNrhNID4o5h1D1gOdAOp1BDNWvOEd4/XuQDauwuXCjlqlC20taROQmLKjcv5tOCYwKD97R8USQg6x9jOCQL5+d5TZuLdPEMv/4lwDmtNxnMU6sfW+umt38XPtq3z6Ihb4eCS7YzxgXLCVLGL3oiQVFNVLAa4JwXF4tZw+h673BXhhO62yq2aRidgef8la5oa9hsNKi+rqg0xVjlwVAMmvJVDRpvvwGz3dxs9l69IyMRz69nwBQaXj3Sw/ODelMwRxjyqT/oPApT8V/WQWSE/e7vmAbK/QOqFUIA/RW25+cOHinckvYr1eMszs5nCywzFkTiCxdNM9V/DEmKWBZSVqgUcreLkIYF6/uVXHT2dDyQx 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: Since the return value of mas_wr_store_entry() is not used, the return type can be changed to void. Signed-off-by: JaeJoon Jung Reviewed-by: Liam R. Howlett --- lib/maple_tree.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/lib/maple_tree.c b/lib/maple_tree.c index 2d7d27e6ae3c..aa3a5df15b8e 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -4203,31 +4203,28 @@ static inline void mas_wr_modify(struct ma_wr_state *wr_mas) * * Return: The contents that was stored at the index. */ -static inline void *mas_wr_store_entry(struct ma_wr_state *wr_mas) +static inline void mas_wr_store_entry(struct ma_wr_state *wr_mas) { struct ma_state *mas = wr_mas->mas; wr_mas->content = mas_start(mas); if (mas_is_none(mas) || mas_is_ptr(mas)) { mas_store_root(mas, wr_mas->entry); - return wr_mas->content; + return; } if (unlikely(!mas_wr_walk(wr_mas))) { mas_wr_spanning_store(wr_mas); - return wr_mas->content; + return; } /* At this point, we are at the leaf node that needs to be altered. */ mas_wr_end_piv(wr_mas); /* New root for a single pointer */ - if (unlikely(!mas->index && mas->last == ULONG_MAX)) { + if (unlikely(!mas->index && mas->last == ULONG_MAX)) mas_new_root(mas, wr_mas->entry); - return wr_mas->content; - } - - mas_wr_modify(wr_mas); - return wr_mas->content; + else + mas_wr_modify(wr_mas); } /**