Skip to content

Commit 23ac0b4

Browse files
vladimirolteandavem330
authored andcommitted
net: use netdev_info in ndo_dflt_fdb_{add,del}
Use the more modern printk helper for network interfaces, which also contains information about the associated struct device, and results in overall shorter line lengths compared to printing an open-coded dev->name. Signed-off-by: Vladimir Oltean <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 8602e40 commit 23ac0b4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

net/core/rtnetlink.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3947,12 +3947,12 @@ int ndo_dflt_fdb_add(struct ndmsg *ndm,
39473947
* implement its own handler for this.
39483948
*/
39493949
if (ndm->ndm_state && !(ndm->ndm_state & NUD_PERMANENT)) {
3950-
pr_info("%s: FDB only supports static addresses\n", dev->name);
3950+
netdev_info(dev, "FDB only supports static addresses\n");
39513951
return err;
39523952
}
39533953

39543954
if (vid) {
3955-
pr_info("%s: vlans aren't supported yet for dev_uc|mc_add()\n", dev->name);
3955+
netdev_info(dev, "vlans aren't supported yet for dev_uc|mc_add()\n");
39563956
return err;
39573957
}
39583958

@@ -4086,7 +4086,7 @@ int ndo_dflt_fdb_del(struct ndmsg *ndm,
40864086
* implement its own handler for this.
40874087
*/
40884088
if (!(ndm->ndm_state & NUD_PERMANENT)) {
4089-
pr_info("%s: FDB only supports static addresses\n", dev->name);
4089+
netdev_info(dev, "FDB only supports static addresses\n");
40904090
return err;
40914091
}
40924092

0 commit comments

Comments
 (0)