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:
parent
8b38a67ca2
commit
55b88eef22
1 changed files with 2 additions and 3 deletions
|
@ -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)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue