mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-04-02 04:24:05 +00:00
net: dsa: remove trans argument from mdb ops
The DSA switch MDB ops pass the switchdev_trans structure down to the drivers, but no one is using them and they aren't supposed to anyway. Remove the trans argument from MDB prepare and add operations. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
80e0236079
commit
3709aadc83
5 changed files with 12 additions and 20 deletions
|
@ -1217,8 +1217,7 @@ static int lan9303_port_fdb_dump(struct dsa_switch *ds, int port,
|
||||||
}
|
}
|
||||||
|
|
||||||
static int lan9303_port_mdb_prepare(struct dsa_switch *ds, int port,
|
static int lan9303_port_mdb_prepare(struct dsa_switch *ds, int port,
|
||||||
const struct switchdev_obj_port_mdb *mdb,
|
const struct switchdev_obj_port_mdb *mdb)
|
||||||
struct switchdev_trans *trans)
|
|
||||||
{
|
{
|
||||||
struct lan9303 *chip = ds->priv;
|
struct lan9303 *chip = ds->priv;
|
||||||
|
|
||||||
|
@ -1235,8 +1234,7 @@ static int lan9303_port_mdb_prepare(struct dsa_switch *ds, int port,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void lan9303_port_mdb_add(struct dsa_switch *ds, int port,
|
static void lan9303_port_mdb_add(struct dsa_switch *ds, int port,
|
||||||
const struct switchdev_obj_port_mdb *mdb,
|
const struct switchdev_obj_port_mdb *mdb)
|
||||||
struct switchdev_trans *trans)
|
|
||||||
{
|
{
|
||||||
struct lan9303 *chip = ds->priv;
|
struct lan9303 *chip = ds->priv;
|
||||||
|
|
||||||
|
|
|
@ -856,16 +856,14 @@ exit:
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ksz_port_mdb_prepare(struct dsa_switch *ds, int port,
|
static int ksz_port_mdb_prepare(struct dsa_switch *ds, int port,
|
||||||
const struct switchdev_obj_port_mdb *mdb,
|
const struct switchdev_obj_port_mdb *mdb)
|
||||||
struct switchdev_trans *trans)
|
|
||||||
{
|
{
|
||||||
/* nothing to do */
|
/* nothing to do */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ksz_port_mdb_add(struct dsa_switch *ds, int port,
|
static void ksz_port_mdb_add(struct dsa_switch *ds, int port,
|
||||||
const struct switchdev_obj_port_mdb *mdb,
|
const struct switchdev_obj_port_mdb *mdb)
|
||||||
struct switchdev_trans *trans)
|
|
||||||
{
|
{
|
||||||
struct ksz_device *dev = ds->priv;
|
struct ksz_device *dev = ds->priv;
|
||||||
u32 static_table[4];
|
u32 static_table[4];
|
||||||
|
|
|
@ -3786,8 +3786,7 @@ free:
|
||||||
}
|
}
|
||||||
|
|
||||||
static int mv88e6xxx_port_mdb_prepare(struct dsa_switch *ds, int port,
|
static int mv88e6xxx_port_mdb_prepare(struct dsa_switch *ds, int port,
|
||||||
const struct switchdev_obj_port_mdb *mdb,
|
const struct switchdev_obj_port_mdb *mdb)
|
||||||
struct switchdev_trans *trans)
|
|
||||||
{
|
{
|
||||||
/* We don't need any dynamic resource from the kernel (yet),
|
/* We don't need any dynamic resource from the kernel (yet),
|
||||||
* so skip the prepare phase.
|
* so skip the prepare phase.
|
||||||
|
@ -3797,8 +3796,7 @@ static int mv88e6xxx_port_mdb_prepare(struct dsa_switch *ds, int port,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void mv88e6xxx_port_mdb_add(struct dsa_switch *ds, int port,
|
static void mv88e6xxx_port_mdb_add(struct dsa_switch *ds, int port,
|
||||||
const struct switchdev_obj_port_mdb *mdb,
|
const struct switchdev_obj_port_mdb *mdb)
|
||||||
struct switchdev_trans *trans)
|
|
||||||
{
|
{
|
||||||
struct mv88e6xxx_chip *chip = ds->priv;
|
struct mv88e6xxx_chip *chip = ds->priv;
|
||||||
|
|
||||||
|
|
|
@ -431,12 +431,10 @@ struct dsa_switch_ops {
|
||||||
/*
|
/*
|
||||||
* Multicast database
|
* Multicast database
|
||||||
*/
|
*/
|
||||||
int (*port_mdb_prepare)(struct dsa_switch *ds, int port,
|
int (*port_mdb_prepare)(struct dsa_switch *ds, int port,
|
||||||
const struct switchdev_obj_port_mdb *mdb,
|
const struct switchdev_obj_port_mdb *mdb);
|
||||||
struct switchdev_trans *trans);
|
void (*port_mdb_add)(struct dsa_switch *ds, int port,
|
||||||
void (*port_mdb_add)(struct dsa_switch *ds, int port,
|
const struct switchdev_obj_port_mdb *mdb);
|
||||||
const struct switchdev_obj_port_mdb *mdb,
|
|
||||||
struct switchdev_trans *trans);
|
|
||||||
int (*port_mdb_del)(struct dsa_switch *ds, int port,
|
int (*port_mdb_del)(struct dsa_switch *ds, int port,
|
||||||
const struct switchdev_obj_port_mdb *mdb);
|
const struct switchdev_obj_port_mdb *mdb);
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -129,7 +129,7 @@ static int dsa_switch_mdb_add(struct dsa_switch *ds,
|
||||||
return -EOPNOTSUPP;
|
return -EOPNOTSUPP;
|
||||||
|
|
||||||
for_each_set_bit(port, group, ds->num_ports) {
|
for_each_set_bit(port, group, ds->num_ports) {
|
||||||
err = ds->ops->port_mdb_prepare(ds, port, mdb, trans);
|
err = ds->ops->port_mdb_prepare(ds, port, mdb);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
@ -138,7 +138,7 @@ static int dsa_switch_mdb_add(struct dsa_switch *ds,
|
||||||
}
|
}
|
||||||
|
|
||||||
for_each_set_bit(port, group, ds->num_ports)
|
for_each_set_bit(port, group, ds->num_ports)
|
||||||
ds->ops->port_mdb_add(ds, port, mdb, trans);
|
ds->ops->port_mdb_add(ds, port, mdb);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue