Commit a81a4574 authored by Vladimir Oltean's avatar Vladimir Oltean Committed by David S. Miller

net: dsa: tag_8021q: use "err" consistently instead of "rc"

Some of the tag_8021q code has been taken out of sja1105, which uses
"rc" for its return code variables, whereas the DSA core uses "err".
Change tag_8021q for consistency.
Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0fac6aa0
...@@ -259,17 +259,17 @@ static int dsa_8021q_setup_port(struct dsa_8021q_context *ctx, int port, ...@@ -259,17 +259,17 @@ static int dsa_8021q_setup_port(struct dsa_8021q_context *ctx, int port,
int dsa_8021q_setup(struct dsa_8021q_context *ctx, bool enabled) int dsa_8021q_setup(struct dsa_8021q_context *ctx, bool enabled)
{ {
int rc, port; int err, port;
ASSERT_RTNL(); ASSERT_RTNL();
for (port = 0; port < ctx->ds->num_ports; port++) { for (port = 0; port < ctx->ds->num_ports; port++) {
rc = dsa_8021q_setup_port(ctx, port, enabled); err = dsa_8021q_setup_port(ctx, port, enabled);
if (rc < 0) { if (err < 0) {
dev_err(ctx->ds->dev, dev_err(ctx->ds->dev,
"Failed to setup VLAN tagging for port %d: %d\n", "Failed to setup VLAN tagging for port %d: %d\n",
port, rc); port, err);
return rc; return err;
} }
} }
...@@ -357,20 +357,20 @@ int dsa_8021q_crosschip_bridge_join(struct dsa_8021q_context *ctx, int port, ...@@ -357,20 +357,20 @@ int dsa_8021q_crosschip_bridge_join(struct dsa_8021q_context *ctx, int port,
* probably use dsa_towards_port. * probably use dsa_towards_port.
*/ */
int other_upstream = dsa_upstream_port(other_ctx->ds, other_port); int other_upstream = dsa_upstream_port(other_ctx->ds, other_port);
int rc; int err;
rc = dsa_8021q_crosschip_link_add(ctx, port, other_ctx, other_port); err = dsa_8021q_crosschip_link_add(ctx, port, other_ctx, other_port);
if (rc) if (err)
return rc; return err;
rc = dsa_8021q_crosschip_link_apply(ctx, port, other_ctx, err = dsa_8021q_crosschip_link_apply(ctx, port, other_ctx,
other_port, true); other_port, true);
if (rc) if (err)
return rc; return err;
rc = dsa_8021q_crosschip_link_add(ctx, port, other_ctx, other_upstream); err = dsa_8021q_crosschip_link_add(ctx, port, other_ctx, other_upstream);
if (rc) if (err)
return rc; return err;
return dsa_8021q_crosschip_link_apply(ctx, port, other_ctx, return dsa_8021q_crosschip_link_apply(ctx, port, other_ctx,
other_upstream, true); other_upstream, true);
...@@ -391,18 +391,18 @@ int dsa_8021q_crosschip_bridge_leave(struct dsa_8021q_context *ctx, int port, ...@@ -391,18 +391,18 @@ int dsa_8021q_crosschip_bridge_leave(struct dsa_8021q_context *ctx, int port,
struct dsa_8021q_context *other_ctx = c->other_ctx; struct dsa_8021q_context *other_ctx = c->other_ctx;
int other_port = c->other_port; int other_port = c->other_port;
bool keep; bool keep;
int rc; int err;
dsa_8021q_crosschip_link_del(ctx, c, &keep); dsa_8021q_crosschip_link_del(ctx, c, &keep);
if (keep) if (keep)
continue; continue;
rc = dsa_8021q_crosschip_link_apply(ctx, port, err = dsa_8021q_crosschip_link_apply(ctx, port,
other_ctx, other_ctx,
other_port, other_port,
false); false);
if (rc) if (err)
return rc; return err;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment