提交 438ff537 编写于 作者: V Vivien Didelot 提交者: David S. Miller

net: dsa: use switchdev_obj_dump_cb_t everywhere

Now that the DSA public header includes switchdev.h, use the provided
switchdev_obj_dump_cb_t typedef for the object dump callback.
Signed-off-by: NVivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 f0c24ccf
...@@ -1055,7 +1055,7 @@ EXPORT_SYMBOL(b53_vlan_del); ...@@ -1055,7 +1055,7 @@ EXPORT_SYMBOL(b53_vlan_del);
int b53_vlan_dump(struct dsa_switch *ds, int port, int b53_vlan_dump(struct dsa_switch *ds, int port,
struct switchdev_obj_port_vlan *vlan, struct switchdev_obj_port_vlan *vlan,
int (*cb)(struct switchdev_obj *obj)) switchdev_obj_dump_cb_t *cb)
{ {
struct b53_device *dev = ds->priv; struct b53_device *dev = ds->priv;
u16 vid, vid_start = 0, pvid; u16 vid, vid_start = 0, pvid;
...@@ -1284,7 +1284,7 @@ static void b53_arl_search_rd(struct b53_device *dev, u8 idx, ...@@ -1284,7 +1284,7 @@ static void b53_arl_search_rd(struct b53_device *dev, u8 idx,
static int b53_fdb_copy(struct net_device *dev, int port, static int b53_fdb_copy(struct net_device *dev, int port,
const struct b53_arl_entry *ent, const struct b53_arl_entry *ent,
struct switchdev_obj_port_fdb *fdb, struct switchdev_obj_port_fdb *fdb,
int (*cb)(struct switchdev_obj *obj)) switchdev_obj_dump_cb_t *cb)
{ {
if (!ent->is_valid) if (!ent->is_valid)
return 0; return 0;
...@@ -1301,7 +1301,7 @@ static int b53_fdb_copy(struct net_device *dev, int port, ...@@ -1301,7 +1301,7 @@ static int b53_fdb_copy(struct net_device *dev, int port,
int b53_fdb_dump(struct dsa_switch *ds, int port, int b53_fdb_dump(struct dsa_switch *ds, int port,
struct switchdev_obj_port_fdb *fdb, struct switchdev_obj_port_fdb *fdb,
int (*cb)(struct switchdev_obj *obj)) switchdev_obj_dump_cb_t *cb)
{ {
struct b53_device *priv = ds->priv; struct b53_device *priv = ds->priv;
struct net_device *dev = ds->ports[port].netdev; struct net_device *dev = ds->ports[port].netdev;
......
...@@ -395,7 +395,7 @@ int b53_vlan_del(struct dsa_switch *ds, int port, ...@@ -395,7 +395,7 @@ int b53_vlan_del(struct dsa_switch *ds, int port,
const struct switchdev_obj_port_vlan *vlan); const struct switchdev_obj_port_vlan *vlan);
int b53_vlan_dump(struct dsa_switch *ds, int port, int b53_vlan_dump(struct dsa_switch *ds, int port,
struct switchdev_obj_port_vlan *vlan, struct switchdev_obj_port_vlan *vlan,
int (*cb)(struct switchdev_obj *obj)); switchdev_obj_dump_cb_t *cb);
int b53_fdb_prepare(struct dsa_switch *ds, int port, int b53_fdb_prepare(struct dsa_switch *ds, int port,
const struct switchdev_obj_port_fdb *fdb, const struct switchdev_obj_port_fdb *fdb,
struct switchdev_trans *trans); struct switchdev_trans *trans);
...@@ -406,7 +406,7 @@ int b53_fdb_del(struct dsa_switch *ds, int port, ...@@ -406,7 +406,7 @@ int b53_fdb_del(struct dsa_switch *ds, int port,
const struct switchdev_obj_port_fdb *fdb); const struct switchdev_obj_port_fdb *fdb);
int b53_fdb_dump(struct dsa_switch *ds, int port, int b53_fdb_dump(struct dsa_switch *ds, int port,
struct switchdev_obj_port_fdb *fdb, struct switchdev_obj_port_fdb *fdb,
int (*cb)(struct switchdev_obj *obj)); switchdev_obj_dump_cb_t *cb);
int b53_mirror_add(struct dsa_switch *ds, int port, int b53_mirror_add(struct dsa_switch *ds, int port,
struct dsa_mall_mirror_tc_entry *mirror, bool ingress); struct dsa_mall_mirror_tc_entry *mirror, bool ingress);
void b53_mirror_del(struct dsa_switch *ds, int port, void b53_mirror_del(struct dsa_switch *ds, int port,
......
...@@ -187,7 +187,7 @@ static int dsa_loop_port_vlan_del(struct dsa_switch *ds, int port, ...@@ -187,7 +187,7 @@ static int dsa_loop_port_vlan_del(struct dsa_switch *ds, int port,
static int dsa_loop_port_vlan_dump(struct dsa_switch *ds, int port, static int dsa_loop_port_vlan_dump(struct dsa_switch *ds, int port,
struct switchdev_obj_port_vlan *vlan, struct switchdev_obj_port_vlan *vlan,
int (*cb)(struct switchdev_obj *obj)) switchdev_obj_dump_cb_t *cb)
{ {
struct dsa_loop_priv *ps = ds->priv; struct dsa_loop_priv *ps = ds->priv;
struct mii_bus *bus = ps->bus; struct mii_bus *bus = ps->bus;
......
...@@ -853,7 +853,7 @@ mt7530_port_fdb_del(struct dsa_switch *ds, int port, ...@@ -853,7 +853,7 @@ mt7530_port_fdb_del(struct dsa_switch *ds, int port,
static int static int
mt7530_port_fdb_dump(struct dsa_switch *ds, int port, mt7530_port_fdb_dump(struct dsa_switch *ds, int port,
struct switchdev_obj_port_fdb *fdb, struct switchdev_obj_port_fdb *fdb,
int (*cb)(struct switchdev_obj *obj)) switchdev_obj_dump_cb_t *cb)
{ {
struct mt7530_priv *priv = ds->priv; struct mt7530_priv *priv = ds->priv;
struct mt7530_fdb _fdb = { 0 }; struct mt7530_fdb _fdb = { 0 };
......
...@@ -1268,7 +1268,7 @@ static int mv88e6xxx_vtu_loadpurge(struct mv88e6xxx_chip *chip, ...@@ -1268,7 +1268,7 @@ static int mv88e6xxx_vtu_loadpurge(struct mv88e6xxx_chip *chip,
static int mv88e6xxx_port_vlan_dump(struct dsa_switch *ds, int port, static int mv88e6xxx_port_vlan_dump(struct dsa_switch *ds, int port,
struct switchdev_obj_port_vlan *vlan, struct switchdev_obj_port_vlan *vlan,
int (*cb)(struct switchdev_obj *obj)) switchdev_obj_dump_cb_t *cb)
{ {
struct mv88e6xxx_chip *chip = ds->priv; struct mv88e6xxx_chip *chip = ds->priv;
struct mv88e6xxx_vtu_entry next = { struct mv88e6xxx_vtu_entry next = {
...@@ -1699,7 +1699,7 @@ static int mv88e6xxx_port_fdb_del(struct dsa_switch *ds, int port, ...@@ -1699,7 +1699,7 @@ static int mv88e6xxx_port_fdb_del(struct dsa_switch *ds, int port,
static int mv88e6xxx_port_db_dump_fid(struct mv88e6xxx_chip *chip, static int mv88e6xxx_port_db_dump_fid(struct mv88e6xxx_chip *chip,
u16 fid, u16 vid, int port, u16 fid, u16 vid, int port,
struct switchdev_obj *obj, struct switchdev_obj *obj,
int (*cb)(struct switchdev_obj *obj)) switchdev_obj_dump_cb_t *cb)
{ {
struct mv88e6xxx_atu_entry addr; struct mv88e6xxx_atu_entry addr;
int err; int err;
...@@ -1754,7 +1754,7 @@ static int mv88e6xxx_port_db_dump_fid(struct mv88e6xxx_chip *chip, ...@@ -1754,7 +1754,7 @@ static int mv88e6xxx_port_db_dump_fid(struct mv88e6xxx_chip *chip,
static int mv88e6xxx_port_db_dump(struct mv88e6xxx_chip *chip, int port, static int mv88e6xxx_port_db_dump(struct mv88e6xxx_chip *chip, int port,
struct switchdev_obj *obj, struct switchdev_obj *obj,
int (*cb)(struct switchdev_obj *obj)) switchdev_obj_dump_cb_t *cb)
{ {
struct mv88e6xxx_vtu_entry vlan = { struct mv88e6xxx_vtu_entry vlan = {
.vid = chip->info->max_vid, .vid = chip->info->max_vid,
...@@ -1791,7 +1791,7 @@ static int mv88e6xxx_port_db_dump(struct mv88e6xxx_chip *chip, int port, ...@@ -1791,7 +1791,7 @@ static int mv88e6xxx_port_db_dump(struct mv88e6xxx_chip *chip, int port,
static int mv88e6xxx_port_fdb_dump(struct dsa_switch *ds, int port, static int mv88e6xxx_port_fdb_dump(struct dsa_switch *ds, int port,
struct switchdev_obj_port_fdb *fdb, struct switchdev_obj_port_fdb *fdb,
int (*cb)(struct switchdev_obj *obj)) switchdev_obj_dump_cb_t *cb)
{ {
struct mv88e6xxx_chip *chip = ds->priv; struct mv88e6xxx_chip *chip = ds->priv;
int err; int err;
...@@ -4037,7 +4037,7 @@ static int mv88e6xxx_port_mdb_del(struct dsa_switch *ds, int port, ...@@ -4037,7 +4037,7 @@ static int mv88e6xxx_port_mdb_del(struct dsa_switch *ds, int port,
static int mv88e6xxx_port_mdb_dump(struct dsa_switch *ds, int port, static int mv88e6xxx_port_mdb_dump(struct dsa_switch *ds, int port,
struct switchdev_obj_port_mdb *mdb, struct switchdev_obj_port_mdb *mdb,
int (*cb)(struct switchdev_obj *obj)) switchdev_obj_dump_cb_t *cb)
{ {
struct mv88e6xxx_chip *chip = ds->priv; struct mv88e6xxx_chip *chip = ds->priv;
int err; int err;
......
...@@ -872,7 +872,7 @@ qca8k_port_fdb_del(struct dsa_switch *ds, int port, ...@@ -872,7 +872,7 @@ qca8k_port_fdb_del(struct dsa_switch *ds, int port,
static int static int
qca8k_port_fdb_dump(struct dsa_switch *ds, int port, qca8k_port_fdb_dump(struct dsa_switch *ds, int port,
struct switchdev_obj_port_fdb *fdb, struct switchdev_obj_port_fdb *fdb,
int (*cb)(struct switchdev_obj *obj)) switchdev_obj_dump_cb_t *cb)
{ {
struct qca8k_priv *priv = (struct qca8k_priv *)ds->priv; struct qca8k_priv *priv = (struct qca8k_priv *)ds->priv;
struct qca8k_fdb _fdb = { 0 }; struct qca8k_fdb _fdb = { 0 };
......
...@@ -404,7 +404,7 @@ struct dsa_switch_ops { ...@@ -404,7 +404,7 @@ struct dsa_switch_ops {
const struct switchdev_obj_port_vlan *vlan); const struct switchdev_obj_port_vlan *vlan);
int (*port_vlan_dump)(struct dsa_switch *ds, int port, int (*port_vlan_dump)(struct dsa_switch *ds, int port,
struct switchdev_obj_port_vlan *vlan, struct switchdev_obj_port_vlan *vlan,
int (*cb)(struct switchdev_obj *obj)); switchdev_obj_dump_cb_t *cb);
/* /*
* Forwarding database * Forwarding database
...@@ -419,7 +419,7 @@ struct dsa_switch_ops { ...@@ -419,7 +419,7 @@ struct dsa_switch_ops {
const struct switchdev_obj_port_fdb *fdb); const struct switchdev_obj_port_fdb *fdb);
int (*port_fdb_dump)(struct dsa_switch *ds, int port, int (*port_fdb_dump)(struct dsa_switch *ds, int port,
struct switchdev_obj_port_fdb *fdb, struct switchdev_obj_port_fdb *fdb,
int (*cb)(struct switchdev_obj *obj)); switchdev_obj_dump_cb_t *cb);
/* /*
* Multicast database * Multicast database
...@@ -434,7 +434,7 @@ struct dsa_switch_ops { ...@@ -434,7 +434,7 @@ struct dsa_switch_ops {
const struct switchdev_obj_port_mdb *mdb); const struct switchdev_obj_port_mdb *mdb);
int (*port_mdb_dump)(struct dsa_switch *ds, int port, int (*port_mdb_dump)(struct dsa_switch *ds, int port,
struct switchdev_obj_port_mdb *mdb, struct switchdev_obj_port_mdb *mdb,
int (*cb)(struct switchdev_obj *obj)); switchdev_obj_dump_cb_t *cb);
/* /*
* RXNFC * RXNFC
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册