Re: [PATCH v1 6/9] soc: mediatek: mtk-mutex: Replace max handles number with definition

From: Chen-Yu Tsai
Date: Tue Feb 21 2023 - 02:12:50 EST


On Thu, Feb 16, 2023 at 9:02 PM AngeloGioacchino Del Regno
<angelogioacchino.delregno@xxxxxxxxxxxxx> wrote:
>
> Replace the magic number "10", defining the maximum number of supported
> handles with a MTK_MUTEX_MAX_HANDLES definition.
> While at it, also change the type for `id` from a signed integer to
> a unsigned 8 bits integer to save some (small) memory footprint, as
> this number is never higher than 10.

Depending on alignment of bool, we might not get that saving.

> This cleanup brings no functional changes.
>
> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@xxxxxxxxxxxxx>

Reviewed-by: Chen-Yu Tsai <wenst@xxxxxxxxxxxx>