mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
net: dsa: tag_8021q: use symbolic error names
Use %pe to give the user a string holding the error code instead of just a number. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
a81a45744b
commit
69ebb37064
1 changed files with 10 additions and 10 deletions
|
@ -214,8 +214,8 @@ static int dsa_8021q_setup_port(struct dsa_8021q_context *ctx, int port,
|
||||||
err = dsa_8021q_vid_apply(ctx, i, rx_vid, flags, enabled);
|
err = dsa_8021q_vid_apply(ctx, i, rx_vid, flags, enabled);
|
||||||
if (err) {
|
if (err) {
|
||||||
dev_err(ctx->ds->dev,
|
dev_err(ctx->ds->dev,
|
||||||
"Failed to apply RX VID %d to port %d: %d\n",
|
"Failed to apply RX VID %d to port %d: %pe\n",
|
||||||
rx_vid, port, err);
|
rx_vid, port, ERR_PTR(err));
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -226,8 +226,8 @@ static int dsa_8021q_setup_port(struct dsa_8021q_context *ctx, int port,
|
||||||
err = dsa_8021q_vid_apply(ctx, upstream, rx_vid, 0, enabled);
|
err = dsa_8021q_vid_apply(ctx, upstream, rx_vid, 0, enabled);
|
||||||
if (err) {
|
if (err) {
|
||||||
dev_err(ctx->ds->dev,
|
dev_err(ctx->ds->dev,
|
||||||
"Failed to apply RX VID %d to port %d: %d\n",
|
"Failed to apply RX VID %d to port %d: %pe\n",
|
||||||
rx_vid, port, err);
|
rx_vid, port, ERR_PTR(err));
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -242,15 +242,15 @@ static int dsa_8021q_setup_port(struct dsa_8021q_context *ctx, int port,
|
||||||
enabled);
|
enabled);
|
||||||
if (err) {
|
if (err) {
|
||||||
dev_err(ctx->ds->dev,
|
dev_err(ctx->ds->dev,
|
||||||
"Failed to apply TX VID %d on port %d: %d\n",
|
"Failed to apply TX VID %d on port %d: %pe\n",
|
||||||
tx_vid, port, err);
|
tx_vid, port, ERR_PTR(err));
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
err = dsa_8021q_vid_apply(ctx, upstream, tx_vid, 0, enabled);
|
err = dsa_8021q_vid_apply(ctx, upstream, tx_vid, 0, enabled);
|
||||||
if (err) {
|
if (err) {
|
||||||
dev_err(ctx->ds->dev,
|
dev_err(ctx->ds->dev,
|
||||||
"Failed to apply TX VID %d on port %d: %d\n",
|
"Failed to apply TX VID %d on port %d: %pe\n",
|
||||||
tx_vid, upstream, err);
|
tx_vid, upstream, ERR_PTR(err));
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -267,8 +267,8 @@ int dsa_8021q_setup(struct dsa_8021q_context *ctx, bool enabled)
|
||||||
err = dsa_8021q_setup_port(ctx, port, enabled);
|
err = dsa_8021q_setup_port(ctx, port, enabled);
|
||||||
if (err < 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: %pe\n",
|
||||||
port, err);
|
port, ERR_PTR(err));
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue