[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241012033141.3p2ieftywbkmlw4k@master>
Date: Sat, 12 Oct 2024 03:31:41 +0000
From: Wei Yang <richard.weiyang@...il.com>
To: Sidhartha Kumar <sidhartha.kumar@...cle.com>
Cc: linux-kernel@...r.kernel.org, maple-tree@...ts.infradead.org,
linux-mm@...ck.org, akpm@...ux-foundation.org,
liam.howlett@...cle.com, willy@...radead.org,
richard.weiyang@...il.com
Subject: Re: [PATCH 2/2] maple_tree: refactor mas_wr_store_type()
On Fri, Oct 11, 2024 at 05:44:51PM -0400, Sidhartha Kumar wrote:
>In mas_wr_store_type(), we check if new_end < mt_slots[wr_mas->type]. If
>this check fails, we know that ,after this, new_end is >= mt_min_slots.
>Checking this again when we detect a wr_node_store later in the function
>is reduntant. Because this check is part of an OR statement, the statement
>will always evaluate to true, therefore we can just get rid of it.
>
>We also refactor mas_wr_store_type() to return the store type rather
>than set it directly as it greatly cleans up the function.
>
>Suggested-by: Liam Howlett <liam.howlett@...cle.com>
>Suggested-by: Wei Yang <richard.weiyang@...il.com>
>Signed-off-by: Sidhartha <sidhartha.kumar@...cle.com>
Reviewed-by: Wei Yang <richard.weiyang@...il.com>
--
Wei Yang
Help you, Help me
Powered by blists - more mailing lists