]> git.baikalelectronics.ru Git - kernel.git/commit
thunderbolt: Use correct type in tb_port_is_clx_enabled() prototype
authorJiri Slaby (SUSE) <jirislaby@kernel.org>
Mon, 12 Dec 2022 10:29:36 +0000 (11:29 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 May 2023 14:03:41 +0000 (23:03 +0900)
commitfdac1d3b103b3208b922f6f96da4faf9a41c668c
tree3f99b622939a36128a86f610abb2a88b2def5f64
parent4c752cf804016e037d1f4b3ba2ac323f4623864a
thunderbolt: Use correct type in tb_port_is_clx_enabled() prototype

commit d31137619776f9c173a46a79bc7733a2b106061f upstream.

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 former as the parameter is in fact a mask of the
enum values.

Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/thunderbolt/tb.h