Re: [PATCH] phy: intel: fix enum type mismatch warning

From: Vinod Koul
Date: Wed Jun 24 2020 - 08:11:57 EST


On 27-05-20, 15:45, Arnd Bergmann wrote:
> clang points out that a local variable is initialized with
> an enum value of the wrong type:
>
> drivers/phy/intel/phy-intel-combo.c:202:34: error: implicit conversion from enumeration type 'enum intel_phy_mode' to different enumeration type 'enum intel_combo_mode' [-Werror,-Wenum-conversion]
> enum intel_combo_mode cb_mode = PHY_PCIE_MODE;
> ~~~~~~~ ^~~~~~~~~~~~~
>
> >From reading the code, it seems that this was not only the
> wrong type, but not even supposed to be a code path that can
> happen in practice.
>
> Change the code to have no default phy mode but instead return an
> error for invalid input.

Applied, thanks

--
~Vinod