net: dsa: felix: drop the ptp_type argument from felix_check_xtr_pkt()
authorVladimir Oltean <vladimir.oltean@nxp.com>
Thu, 3 Mar 2022 14:01:23 +0000 (16:01 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 4 Mar 2022 09:21:23 +0000 (09:21 +0000)
The DSA ->port_rxtstamp() function is never called for PTP_CLASS_NONE:

dsa_skb_defer_rx_timestamp:

if (type == PTP_CLASS_NONE)
return false;

if (likely(ds->ops->port_rxtstamp))
return ds->ops->port_rxtstamp(ds, p->dp->index, skb, type);

So practically, the argument is unused, so remove it.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/ocelot/felix.c

index 7db1169a418bbcfe426e5d6466243ca5c5c442e5..38ce0a487b8fb103262973f4d62e2950a7186842 100644 (file)
@@ -1466,7 +1466,7 @@ static int felix_hwtstamp_set(struct dsa_switch *ds, int port,
        return felix_update_trapping_destinations(ds, using_tag_8021q);
 }
 
-static bool felix_check_xtr_pkt(struct ocelot *ocelot, unsigned int ptp_type)
+static bool felix_check_xtr_pkt(struct ocelot *ocelot)
 {
        struct felix *felix = ocelot_to_felix(ocelot);
        int err, grp = 0;
@@ -1477,9 +1477,6 @@ static bool felix_check_xtr_pkt(struct ocelot *ocelot, unsigned int ptp_type)
        if (!felix->info->quirk_no_xtr_irq)
                return false;
 
-       if (ptp_type == PTP_CLASS_NONE)
-               return false;
-
        while (ocelot_read(ocelot, QS_XTR_DATA_PRESENT) & BIT(grp)) {
                struct sk_buff *skb;
                unsigned int type;
@@ -1530,7 +1527,7 @@ static bool felix_rxtstamp(struct dsa_switch *ds, int port,
         * MMIO in the CPU port module, and inject that into the stack from
         * ocelot_xtr_poll().
         */
-       if (felix_check_xtr_pkt(ocelot, type)) {
+       if (felix_check_xtr_pkt(ocelot)) {
                kfree_skb(skb);
                return true;
        }