On Sat, 25 Sep 2021 01:36:25 +0200 Linus Walleij wrote:
+static int rtl8366rb_vlan_filtering(struct dsa_switch *ds, int port,
+ bool vlan_filtering,
+ struct netlink_ext_ack *extack)
+{
+ struct realtek_smi *smi = ds->priv;
+ int ret;
drivers/net/dsa/rtl8366rb.c: In function ‘rtl8366rb_vlan_filtering’:
drivers/net/dsa/rtl8366rb.c:1221:6: warning: unused variable ‘ret’ [-Wunused-variable]
1221 | int ret;
| ^~~
+ dev_dbg(smi->dev, "port %d: %s VLAN filtering\n", port,
+ vlan_filtering ? "enable" : "disable");
+
+ /* If the port is not in the member set, the frame will be dropped */
+ return regmap_update_bits(smi->map, RTL8366RB_VLAN_INGRESS_CTRL2_REG,
+ BIT(port), vlan_filtering ? BIT(port) : 0);
+}