Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: dsa: delete dsa_port_walk_{fdbs,mdbs}

All the users of these functions are gone, delete them before they gain
new ones.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Vladimir Oltean and committed by
Jakub Kicinski
fe5233b0 28de0f9f

-46
-6
include/net/dsa.h
··· 1239 1239 1240 1240 struct net_device *dsa_dev_to_net_device(struct device *dev); 1241 1241 1242 - typedef int dsa_fdb_walk_cb_t(struct dsa_switch *ds, int port, 1243 - const unsigned char *addr, u16 vid, 1244 - struct dsa_db db); 1245 - 1246 - int dsa_port_walk_fdbs(struct dsa_switch *ds, int port, dsa_fdb_walk_cb_t cb); 1247 - int dsa_port_walk_mdbs(struct dsa_switch *ds, int port, dsa_fdb_walk_cb_t cb); 1248 1242 bool dsa_fdb_present_in_other_db(struct dsa_switch *ds, int port, 1249 1243 const unsigned char *addr, u16 vid, 1250 1244 struct dsa_db db);
-40
net/dsa/dsa.c
··· 458 458 } 459 459 EXPORT_SYMBOL_GPL(dsa_port_from_netdev); 460 460 461 - int dsa_port_walk_fdbs(struct dsa_switch *ds, int port, dsa_fdb_walk_cb_t cb) 462 - { 463 - struct dsa_port *dp = dsa_to_port(ds, port); 464 - struct dsa_mac_addr *a; 465 - int err = 0; 466 - 467 - mutex_lock(&dp->addr_lists_lock); 468 - 469 - list_for_each_entry(a, &dp->fdbs, list) { 470 - err = cb(ds, port, a->addr, a->vid, a->db); 471 - if (err) 472 - break; 473 - } 474 - 475 - mutex_unlock(&dp->addr_lists_lock); 476 - 477 - return err; 478 - } 479 - EXPORT_SYMBOL_GPL(dsa_port_walk_fdbs); 480 - 481 - int dsa_port_walk_mdbs(struct dsa_switch *ds, int port, dsa_fdb_walk_cb_t cb) 482 - { 483 - struct dsa_port *dp = dsa_to_port(ds, port); 484 - struct dsa_mac_addr *a; 485 - int err = 0; 486 - 487 - mutex_lock(&dp->addr_lists_lock); 488 - 489 - list_for_each_entry(a, &dp->mdbs, list) { 490 - err = cb(ds, port, a->addr, a->vid, a->db); 491 - if (err) 492 - break; 493 - } 494 - 495 - mutex_unlock(&dp->addr_lists_lock); 496 - 497 - return err; 498 - } 499 - EXPORT_SYMBOL_GPL(dsa_port_walk_mdbs); 500 - 501 461 bool dsa_db_equal(const struct dsa_db *a, const struct dsa_db *b) 502 462 { 503 463 if (a->type != b->type)