Message ID | 1616658992-135804-2-git-send-email-huangdaode@huawei.com (mailing list archive) |
---|---|
State | Accepted |
Commit | c32773c96131fd5a106993efa0078fbde435b2f6 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | net: gve: make cleanup for gve | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | success | Link |
netdev/fixes_present | success | Link |
netdev/patch_count | success | Link |
netdev/tree_selection | success | Clearly marked for net-next |
netdev/subject_prefix | success | Link |
netdev/cc_maintainers | warning | 1 maintainers not CCed: snelson@pensando.io |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 0 this patch: 0 |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/verify_fixes | success | Link |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 12 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 0 this patch: 0 |
netdev/header_inline | success | Link |
On Thu, Mar 25, 2021 at 1:01 AM Daode Huang <huangdaode@huawei.com> wrote: > > Usage of strlcpy in linux kernel has been recently deprecated[1], so > convert gve driver to strscpy > > [1] https://lore.kernel.org/lkml/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL > =V6A6G1oUZcprmknw@mail.gmail.com/ > > Signed-off-by: Daode Huang <huangdaode@huawei.com> Reviewed-by: Catherine Sullivan <csully@google.com> > --- > drivers/net/ethernet/google/gve/gve_ethtool.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/net/ethernet/google/gve/gve_ethtool.c b/drivers/net/ethernet/google/gve/gve_ethtool.c > index 0901fa6..e40e052 100644 > --- a/drivers/net/ethernet/google/gve/gve_ethtool.c > +++ b/drivers/net/ethernet/google/gve/gve_ethtool.c > @@ -14,9 +14,9 @@ static void gve_get_drvinfo(struct net_device *netdev, > { > struct gve_priv *priv = netdev_priv(netdev); > > - strlcpy(info->driver, "gve", sizeof(info->driver)); > - strlcpy(info->version, gve_version_str, sizeof(info->version)); > - strlcpy(info->bus_info, pci_name(priv->pdev), sizeof(info->bus_info)); > + strscpy(info->driver, "gve", sizeof(info->driver)); > + strscpy(info->version, gve_version_str, sizeof(info->version)); > + strscpy(info->bus_info, pci_name(priv->pdev), sizeof(info->bus_info)); > } > > static void gve_set_msglevel(struct net_device *netdev, u32 value) > -- > 2.8.1 >
diff --git a/drivers/net/ethernet/google/gve/gve_ethtool.c b/drivers/net/ethernet/google/gve/gve_ethtool.c index 0901fa6..e40e052 100644 --- a/drivers/net/ethernet/google/gve/gve_ethtool.c +++ b/drivers/net/ethernet/google/gve/gve_ethtool.c @@ -14,9 +14,9 @@ static void gve_get_drvinfo(struct net_device *netdev, { struct gve_priv *priv = netdev_priv(netdev); - strlcpy(info->driver, "gve", sizeof(info->driver)); - strlcpy(info->version, gve_version_str, sizeof(info->version)); - strlcpy(info->bus_info, pci_name(priv->pdev), sizeof(info->bus_info)); + strscpy(info->driver, "gve", sizeof(info->driver)); + strscpy(info->version, gve_version_str, sizeof(info->version)); + strscpy(info->bus_info, pci_name(priv->pdev), sizeof(info->bus_info)); } static void gve_set_msglevel(struct net_device *netdev, u32 value)
Usage of strlcpy in linux kernel has been recently deprecated[1], so convert gve driver to strscpy [1] https://lore.kernel.org/lkml/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL =V6A6G1oUZcprmknw@mail.gmail.com/ Signed-off-by: Daode Huang <huangdaode@huawei.com> --- drivers/net/ethernet/google/gve/gve_ethtool.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)