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

Chen-Yu Tsai wenst at chromium.org
Mon Feb 20 23:12:34 PST 2023


On Thu, Feb 16, 2023 at 9:02 PM AngeloGioacchino Del Regno
<angelogioacchino.delregno at collabora.com> 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 at collabora.com>

Reviewed-by: Chen-Yu Tsai <wenst at chromium.org>



More information about the Linux-mediatek mailing list