mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
net: dsa: make the VLAN add function return void
The switchdev design implies that a software error should not happen in the commit phase since it must have been previously reported in the prepare phase. If an hardware error occurs during the commit phase, there is nothing switchdev can do about it. The DSA layer separates port_vlan_prepare and port_vlan_add for simplicity and convenience. If an hardware error occurs during the commit phase, there is no need to report it outside the driver itself. Make the DSA port_vlan_add routine return void for explicitness. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
8497aa618d
commit
4d5770b397
4 changed files with 18 additions and 27 deletions
|
@ -310,7 +310,7 @@ struct dsa_switch_driver {
|
|||
int (*port_vlan_prepare)(struct dsa_switch *ds, int port,
|
||||
const struct switchdev_obj_port_vlan *vlan,
|
||||
struct switchdev_trans *trans);
|
||||
int (*port_vlan_add)(struct dsa_switch *ds, int port,
|
||||
void (*port_vlan_add)(struct dsa_switch *ds, int port,
|
||||
const struct switchdev_obj_port_vlan *vlan,
|
||||
struct switchdev_trans *trans);
|
||||
int (*port_vlan_del)(struct dsa_switch *ds, int port,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue