mirror of
https://github.com/torvalds/linux.git
synced 2026-06-02 19:43:40 +02:00
net: enetc: remove unnecessary CONFIG_FSL_ENETC_PTP_CLOCK check
The ENETC_F_RX_TSTAMP flag of priv->active_offloads can only be set when CONFIG_FSL_ENETC_PTP_CLOCK is enabled. Similarly, rx_ring->ext_en can only be set when CONFIG_FSL_ENETC_PTP_CLOCK is enabled as well. So it is safe to remove unnecessary CONFIG_FSL_ENETC_PTP_CLOCK check. Signed-off-by: Wei Fang <wei.fang@nxp.com> Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev> Reviewed-by: Frank Li <Frank.Li@nxp.com> Link: https://patch.msgid.link/20250829050615.1247468-12-wei.fang@nxp.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
parent
27dd0eca93
commit
d889abaac2
|
|
@ -1411,8 +1411,7 @@ static void enetc_get_offloads(struct enetc_bdr *rx_ring,
|
|||
__vlan_hwaccel_put_tag(skb, tpid, le16_to_cpu(rxbd->r.vlan_opt));
|
||||
}
|
||||
|
||||
if (IS_ENABLED(CONFIG_FSL_ENETC_PTP_CLOCK) &&
|
||||
(priv->active_offloads & ENETC_F_RX_TSTAMP))
|
||||
if (priv->active_offloads & ENETC_F_RX_TSTAMP)
|
||||
enetc_get_rx_tstamp(rx_ring->ndev, rxbd, skb);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -226,7 +226,7 @@ static inline union enetc_rx_bd *enetc_rxbd(struct enetc_bdr *rx_ring, int i)
|
|||
{
|
||||
int hw_idx = i;
|
||||
|
||||
if (IS_ENABLED(CONFIG_FSL_ENETC_PTP_CLOCK) && rx_ring->ext_en)
|
||||
if (rx_ring->ext_en)
|
||||
hw_idx = 2 * i;
|
||||
|
||||
return &(((union enetc_rx_bd *)rx_ring->bd_base)[hw_idx]);
|
||||
|
|
@ -240,7 +240,7 @@ static inline void enetc_rxbd_next(struct enetc_bdr *rx_ring,
|
|||
|
||||
new_rxbd++;
|
||||
|
||||
if (IS_ENABLED(CONFIG_FSL_ENETC_PTP_CLOCK) && rx_ring->ext_en)
|
||||
if (rx_ring->ext_en)
|
||||
new_rxbd++;
|
||||
|
||||
if (unlikely(++new_index == rx_ring->bd_count)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user