ionic: prefer strscpy over strlcpy
authorShannon Nelson <snelson@pensando.io>
Thu, 17 Feb 2022 22:02:51 +0000 (14:02 -0800)
committerJakub Kicinski <kuba@kernel.org>
Sat, 19 Feb 2022 04:37:14 +0000 (20:37 -0800)
Replace strlcpy with strscpy to clean up a checkpatch complaint.

Signed-off-by: Shannon Nelson <snelson@pensando.io>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/pensando/ionic/ionic_ethtool.c
drivers/net/ethernet/pensando/ionic/ionic_lif.c

index 386a5cf..01c2270 100644 (file)
@@ -74,10 +74,10 @@ static void ionic_get_drvinfo(struct net_device *netdev,
        struct ionic_lif *lif = netdev_priv(netdev);
        struct ionic *ionic = lif->ionic;
 
-       strlcpy(drvinfo->driver, IONIC_DRV_NAME, sizeof(drvinfo->driver));
-       strlcpy(drvinfo->fw_version, ionic->idev.dev_info.fw_version,
+       strscpy(drvinfo->driver, IONIC_DRV_NAME, sizeof(drvinfo->driver));
+       strscpy(drvinfo->fw_version, ionic->idev.dev_info.fw_version,
                sizeof(drvinfo->fw_version));
-       strlcpy(drvinfo->bus_info, ionic_bus_info(ionic),
+       strscpy(drvinfo->bus_info, ionic_bus_info(ionic),
                sizeof(drvinfo->bus_info));
 }
 
index 4101529..d19d977 100644 (file)
@@ -3301,7 +3301,7 @@ static void ionic_lif_set_netdev_info(struct ionic_lif *lif)
                },
        };
 
-       strlcpy(ctx.cmd.lif_setattr.name, lif->netdev->name,
+       strscpy(ctx.cmd.lif_setattr.name, lif->netdev->name,
                sizeof(ctx.cmd.lif_setattr.name));
 
        ionic_adminq_post_wait(lif, &ctx);