Re: [PATCH] thunderbolt (gcc13): synchronize tb_port_is_clx_enabled()'s 2nd param

From: Mika Westerberg
Date: Mon Oct 31 2022 - 08:20:22 EST


Hi,

On Mon, Oct 31, 2022 at 12:43:23PM +0100, Jiri Slaby (SUSE) wrote:
> tb_port_is_clx_enabled() generates a valid warning with gcc-13:
> drivers/thunderbolt/switch.c:1286:6: error: conflicting types for 'tb_port_is_clx_enabled' due to enum/integer mismatch; have 'bool(struct tb_port *, unsigned int)' ...
> drivers/thunderbolt/tb.h:1050:6: note: previous declaration of 'tb_port_is_clx_enabled' with type 'bool(struct tb_port *, enum tb_clx)' ...
>
> I.e. the type of the 2nd parameter of tb_port_is_clx_enabled() in the
> declaration is unsigned int, while the definition spells enum tb_clx.
> Synchronize them to the latter. And do the same for
> tb_port_clx_supported() where the enum is propagated.

Actually in both places we want to have bitmask of possible states so I
think unsigned int is the right one here.