net: if: Mark not used args as unused

If the function parameter is not used, mark it as unused to
avoid compiler warning.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
Jukka Rissanen 2021-03-16 10:49:13 +02:00 committed by Jukka Rissanen
commit f63855c657
2 changed files with 9 additions and 0 deletions

View file

@ -627,6 +627,8 @@ static inline struct net_offload *net_if_offload(struct net_if *iface)
#if defined(CONFIG_NET_OFFLOAD) #if defined(CONFIG_NET_OFFLOAD)
return iface->if_dev->offload; return iface->if_dev->offload;
#else #else
ARG_UNUSED(iface);
return NULL; return NULL;
#endif #endif
} }

View file

@ -400,6 +400,8 @@ void net_if_stats_reset(struct net_if *iface)
return; return;
} }
} }
#else
ARG_UNUSED(iface);
#endif #endif
} }
@ -3801,6 +3803,9 @@ static bool need_calc_checksum(struct net_if *iface, enum ethernet_hw_caps caps)
return !(net_eth_get_hw_capabilities(iface) & caps); return !(net_eth_get_hw_capabilities(iface) & caps);
#else #else
ARG_UNUSED(iface);
ARG_UNUSED(caps);
return true; return true;
#endif #endif
} }
@ -3960,6 +3965,8 @@ static int promisc_mode_set(struct net_if *iface, bool enable)
} }
} }
#else #else
ARG_UNUSED(enable);
return -ENOTSUP; return -ENOTSUP;
#endif #endif