Thread (8 messages) flat view 8 messages, 2 authors, 2021-09-25

Re: [PATCH net-next 3/6 v5] net: dsa: rtl8366rb: Rewrite weird VLAN filering enablement

From: Jakub Kicinski <kuba@kernel.org>
Date: 2021-09-25 00:08:03

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);
+}
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help