Skip to content

Commit

Permalink
net: use netdev_info in ndo_dflt_fdb_{add,del}
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
vladimiroltean authored and davem330 committed Jun 29, 2021
1 parent 8602e40 commit 23ac0b4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions net/core/rtnetlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -3947,12 +3947,12 @@ int ndo_dflt_fdb_add(struct ndmsg *ndm,
* implement its own handler for this.
*/
if (ndm->ndm_state && !(ndm->ndm_state & NUD_PERMANENT)) {
pr_info("%s: FDB only supports static addresses\n", dev->name);
netdev_info(dev, "FDB only supports static addresses\n");
return err;
}

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

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

Expand Down

0 comments on commit 23ac0b4

Please sign in to comment.