Vladimir Oltean 716a30a97a net: switchdev: merge switchdev_handle_fdb_{add,del}_to_device
To reduce code churn, the same patch makes multiple changes, since they
all touch the same lines:

1. The implementations for these two are identical, just with different
   function pointers. Reduce duplications and name the function pointers
   "mod_cb" instead of "add_cb" and "del_cb". Pass the event as argument.

2. Drop the "const" attribute from "orig_dev". If the driver needs to
   check whether orig_dev belongs to itself and then
   call_switchdev_notifiers(orig_dev, SWITCHDEV_FDB_OFFLOADED), it
   can't, because call_switchdev_notifiers takes a non-const struct
   net_device *.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-10-27 14:54:02 +01:00
..
2021-09-05 08:36:44 +09:00
2021-10-13 09:40:46 -07:00
2021-10-24 13:59:45 +01:00
2021-10-13 09:40:45 -07:00
2021-10-25 11:01:29 -07:00
2021-10-24 16:24:28 +02:00
2021-06-30 15:51:09 -07:00
2021-10-25 18:02:14 -07:00
2021-06-29 11:28:21 -07:00
2021-05-26 07:03:39 +02:00
2021-10-13 09:40:46 -07:00
2021-10-22 10:20:56 -07:00
2021-10-26 14:58:45 +01:00
2021-10-13 09:40:45 -07:00
2021-10-14 23:06:44 +02:00
2021-10-13 09:40:45 -07:00
2021-10-13 09:40:46 -07:00
2021-06-03 15:13:56 -07:00
2021-07-29 15:06:49 +01:00
2021-08-31 16:43:06 -07:00