Skip to content

Commit 799c230

Browse files
emuslnkuba-moo
authored andcommitted
ionic: prefer strscpy over strlcpy
Replace strlcpy with strscpy to clean up a checkpatch complaint. Signed-off-by: Shannon Nelson <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 116dce0 commit 799c230

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

drivers/net/ethernet/pensando/ionic/ionic_ethtool.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ static void ionic_get_drvinfo(struct net_device *netdev,
7474
struct ionic_lif *lif = netdev_priv(netdev);
7575
struct ionic *ionic = lif->ionic;
7676

77-
strlcpy(drvinfo->driver, IONIC_DRV_NAME, sizeof(drvinfo->driver));
78-
strlcpy(drvinfo->fw_version, ionic->idev.dev_info.fw_version,
77+
strscpy(drvinfo->driver, IONIC_DRV_NAME, sizeof(drvinfo->driver));
78+
strscpy(drvinfo->fw_version, ionic->idev.dev_info.fw_version,
7979
sizeof(drvinfo->fw_version));
80-
strlcpy(drvinfo->bus_info, ionic_bus_info(ionic),
80+
strscpy(drvinfo->bus_info, ionic_bus_info(ionic),
8181
sizeof(drvinfo->bus_info));
8282
}
8383

drivers/net/ethernet/pensando/ionic/ionic_lif.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3301,7 +3301,7 @@ static void ionic_lif_set_netdev_info(struct ionic_lif *lif)
33013301
},
33023302
};
33033303

3304-
strlcpy(ctx.cmd.lif_setattr.name, lif->netdev->name,
3304+
strscpy(ctx.cmd.lif_setattr.name, lif->netdev->name,
33053305
sizeof(ctx.cmd.lif_setattr.name));
33063306

33073307
ionic_adminq_post_wait(lif, &ctx);

0 commit comments

Comments
 (0)