Skip to contentSkip to conversation

net: dsa: make usage of mv88e6xxx common remove function

RFC PATCH Superseded Neil Armstrong 2 participants 2 messages Oct 27, 2015

Subsystems (3)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

RFC PATCH 3/3 net: dsa: make usage of mv88e6xxx common remove function

Make usage of previously introduced mv88e6xxx common remove function in all mv88e6xxx drivers.

---
 drivers/net/dsa/mv88e6123_61_65.c | 1 +
 drivers/net/dsa/mv88e6131.c       | 8 ++++++++
 drivers/net/dsa/mv88e6171.c       | 1 +
 drivers/net/dsa/mv88e6352.c       | 1 +
 4 files changed, 11 insertions(+)
drivers/net/dsa/mv88e6123_61_65.c +1 -0
index 4bcfd68..1773c99 100644
@@ -122,6 +122,7 @@ struct dsa_switch_driver mv88e6123_61_65_switch_driver = {
 	.priv_size		= sizeof(struct mv88e6xxx_priv_state),
 	.probe			= mv88e6123_61_65_probe,
 	.setup			= mv88e6123_61_65_setup,
+	.remove			= mv88e6xxx_remove_common,
 	.set_addr		= mv88e6xxx_set_addr_indirect,
 	.phy_read		= mv88e6xxx_phy_read,
 	.phy_write		= mv88e6xxx_phy_write,
drivers/net/dsa/mv88e6131.c +8 -0
index c73121c..0f559b4 100644
@@ -137,6 +137,13 @@ static int mv88e6131_setup(struct dsa_switch *ds)
 	return mv88e6xxx_setup_ports(ds);
 }
 
+static void mv88e6131_remove(struct dsa_switch *ds)
+{
+	mv88e6xxx_ppu_state_remove(ds);
+
+	mv88e6xxx_remove_common(ds);
+}
+
 static int mv88e6131_port_to_phy_addr(struct dsa_switch *ds, int port)
 {
 	struct mv88e6xxx_priv_state *ps = ds_to_priv(ds);
@@ -175,6 +182,7 @@ struct dsa_switch_driver mv88e6131_switch_driver = {
 	.priv_size		= sizeof(struct mv88e6xxx_priv_state),
 	.probe			= mv88e6131_probe,
 	.setup			= mv88e6131_setup,
+	.remove			= mv88e6131_remove,
 	.set_addr		= mv88e6xxx_set_addr_direct,
 	.phy_read		= mv88e6131_phy_read,
 	.phy_write		= mv88e6131_phy_write,
drivers/net/dsa/mv88e6171.c +1 -0
index 2c8eb6f..382529b 100644
@@ -101,6 +101,7 @@ struct dsa_switch_driver mv88e6171_switch_driver = {
 	.priv_size		= sizeof(struct mv88e6xxx_priv_state),
 	.probe			= mv88e6171_probe,
 	.setup			= mv88e6171_setup,
+	.remove			= mv88e6xxx_remove_common,
 	.set_addr		= mv88e6xxx_set_addr_indirect,
 	.phy_read		= mv88e6xxx_phy_read_indirect,
 	.phy_write		= mv88e6xxx_phy_write_indirect,
drivers/net/dsa/mv88e6352.c +1 -0
index cbf4dd8..7938901 100644
@@ -321,6 +321,7 @@ struct dsa_switch_driver mv88e6352_switch_driver = {
 	.priv_size		= sizeof(struct mv88e6xxx_priv_state),
 	.probe			= mv88e6352_probe,
 	.setup			= mv88e6352_setup,
+	.remove			= mv88e6xxx_remove_common,
 	.set_addr		= mv88e6xxx_set_addr_indirect,
 	.phy_read		= mv88e6xxx_phy_read_indirect,
 	.phy_write		= mv88e6xxx_phy_write_indirect,
Signature · 1 line
1.9.1
#1 lore raw
reproduce:

Hi Neil,

[auto build test ERROR on net/master -- if it's inappropriate base, please suggest rules for selecting the more suitable base]

url:    https://github.com/0day-ci/linux/commits/Neil-Armstrong/net-dsa-cleanup-dsa-driver/20151028-003842
config: x86_64-randconfig-x010-201543 (attached as .config)
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All error/warnings (new ones prefixed by >>):

>> drivers/net/dsa/mv88e6123_61_65.c:125:2: error: unknown field 'remove' specified in initializer
     .remove   = mv88e6xxx_remove_common,
     ^
>> drivers/net/dsa/mv88e6123_61_65.c:125:14: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]

.remove = mv88e6xxx_remove_common,
^
drivers/net/dsa/mv88e6123_61_65.c:125:14: note: (near initialization for 'mv88e6123_61_65_switch_driver.set_addr')
--

>> drivers/net/dsa/mv88e6352.c:324:2: error: unknown field 'remove' specified in initializer
     .remove   = mv88e6xxx_remove_common,
     ^
>> drivers/net/dsa/mv88e6352.c:324:14: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]

.remove = mv88e6xxx_remove_common,
^
drivers/net/dsa/mv88e6352.c:324:14: note: (near initialization for 'mv88e6352_switch_driver.set_addr')

vim +/remove +125 drivers/net/dsa/mv88e6123_61_65.c

119
120 struct dsa_switch_driver mv88e6123_61_65_switch_driver = {
121 .tag_protocol = DSA_TAG_PROTO_EDSA,
122 .priv_size = sizeof(struct mv88e6xxx_priv_state),
123 .probe = mv88e6123_61_65_probe,
124 .setup = mv88e6123_61_65_setup,

 > 125		.remove			= mv88e6xxx_remove_common,

126 .set_addr = mv88e6xxx_set_addr_indirect,
127 .phy_read = mv88e6xxx_phy_read,
128 .phy_write = mv88e6xxx_phy_write,

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation