eth: mcux: Do not compile phy_state_name() if not used

This is better than declaring it unused.

Signed-off-by: Armand Ciejak <armand@riedonetworks.com>
This commit is contained in:
Armand Ciejak 2020-10-02 10:09:48 +02:00 committed by Carles Cufí
commit 55b88eef22

View file

@ -78,9 +78,7 @@ static const clock_ip_name_t enet_clocks[] = ENET_CLOCKS;
static void eth_mcux_init(const struct device *dev); static void eth_mcux_init(const struct device *dev);
static const char * #ifdef CONFIG_ETH_MCUX_PHY_EXTRA_DEBUG
phy_state_name(enum eth_mcux_phy_state state) __attribute__((unused));
static const char *phy_state_name(enum eth_mcux_phy_state state) static const char *phy_state_name(enum eth_mcux_phy_state state)
{ {
static const char * const name[] = { static const char * const name[] = {
@ -96,6 +94,7 @@ static const char *phy_state_name(enum eth_mcux_phy_state state)
return name[state]; return name[state];
} }
#endif
static const char *eth_name(ENET_Type *base) static const char *eth_name(ENET_Type *base)
{ {