Re: [PATCH] nodemask: Drop duplicate check in for_each_node_mask()

From: Yury Norov
Date: Thu Mar 02 2023 - 02:05:52 EST


On Tue, Jan 24, 2023 at 08:02:43AM +0800, Gavin Shan wrote:
> The return value type is changed from 'int' to 'unsigned int' since
> commit 0dfe54071d7c8 ("nodemask: Fix return values to be unsigned").
> Besides, the conversion between 'int' and 'unsigned int' on the
> parameter @node is guaranteed to be safe due to the limited range of
> MAX_NUMNODES and CONFIG_NODES_SHIFT. By the way, '(node >= 0)' should
> have been '(node) >= 0' actually.
>
> It's unnecessary to check if their return values are greater or equal
> to 0 in for_each_node_mask(). Remove it.
>
> No functional change intended.
>
> Signed-off-by: Gavin Shan <gshan@xxxxxxxxxx>

Applied, thanks.