diff mbox series

[net-next,v2,5/7] ionic: Use netdev_name() function instead of netdev->name

Message ID 20240529000259.25775-6-shannon.nelson@amd.com (mailing list archive)
State Accepted
Commit fc53d46524480a732a233bc9d6cdf6155205d9eb
Delegated to: Netdev Maintainers
Headers show
Series ionic: updates for v6.11 | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 8 this patch: 8
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 7 of 7 maintainers
netdev/build_clang success Errors and warnings before: 906 this patch: 906
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 906 this patch: 906
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 24 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-05-30--06-00 (tests: 1042)

Commit Message

Nelson, Shannon May 29, 2024, 12:02 a.m. UTC
From: Brett Creeley <brett.creeley@amd.com>

There is no reason not to use netdev_name() in these places, so do just
as the title states.

Signed-off-by: Brett Creeley <brett.creeley@amd.com>
Signed-off-by: Shannon Nelson <shannon.nelson@amd.com>
---
 drivers/net/ethernet/pensando/ionic/ionic_debugfs.c | 2 +-
 drivers/net/ethernet/pensando/ionic/ionic_lif.c     | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

Comments

Kalesh Anakkur Purayil May 29, 2024, 5:30 a.m. UTC | #1
On Wed, May 29, 2024 at 5:34 AM Shannon Nelson <shannon.nelson@amd.com> wrote:
>
> From: Brett Creeley <brett.creeley@amd.com>
>
> There is no reason not to use netdev_name() in these places, so do just
> as the title states.
>
> Signed-off-by: Brett Creeley <brett.creeley@amd.com>
> Signed-off-by: Shannon Nelson <shannon.nelson@amd.com>

Looks good to me.

Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
> ---
>  drivers/net/ethernet/pensando/ionic/ionic_debugfs.c | 2 +-
>  drivers/net/ethernet/pensando/ionic/ionic_lif.c     | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/pensando/ionic/ionic_debugfs.c b/drivers/net/ethernet/pensando/ionic/ionic_debugfs.c
> index c3ae11a48024..59e5a9f21105 100644
> --- a/drivers/net/ethernet/pensando/ionic/ionic_debugfs.c
> +++ b/drivers/net/ethernet/pensando/ionic/ionic_debugfs.c
> @@ -220,7 +220,7 @@ static int netdev_show(struct seq_file *seq, void *v)
>  {
>         struct net_device *netdev = seq->private;
>
> -       seq_printf(seq, "%s\n", netdev->name);
> +       seq_printf(seq, "%s\n", netdev_name(netdev));
>
>         return 0;
>  }
> diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
> index 101cbc088853..23e1f6638b38 100644
> --- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c
> +++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
> @@ -237,7 +237,7 @@ static int ionic_request_irq(struct ionic_lif *lif, struct ionic_qcq *qcq)
>         const char *name;
>
>         if (lif->registered)
> -               name = lif->netdev->name;
> +               name = netdev_name(lif->netdev);
>         else
>                 name = dev_name(dev);
>
> @@ -3732,7 +3732,7 @@ static void ionic_lif_set_netdev_info(struct ionic_lif *lif)
>                 },
>         };
>
> -       strscpy(ctx.cmd.lif_setattr.name, lif->netdev->name,
> +       strscpy(ctx.cmd.lif_setattr.name, netdev_name(lif->netdev),
>                 sizeof(ctx.cmd.lif_setattr.name));
>
>         ionic_adminq_post_wait(lif, &ctx);
> --
> 2.17.1
>
>
diff mbox series

Patch

diff --git a/drivers/net/ethernet/pensando/ionic/ionic_debugfs.c b/drivers/net/ethernet/pensando/ionic/ionic_debugfs.c
index c3ae11a48024..59e5a9f21105 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_debugfs.c
+++ b/drivers/net/ethernet/pensando/ionic/ionic_debugfs.c
@@ -220,7 +220,7 @@  static int netdev_show(struct seq_file *seq, void *v)
 {
 	struct net_device *netdev = seq->private;
 
-	seq_printf(seq, "%s\n", netdev->name);
+	seq_printf(seq, "%s\n", netdev_name(netdev));
 
 	return 0;
 }
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
index 101cbc088853..23e1f6638b38 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c
+++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
@@ -237,7 +237,7 @@  static int ionic_request_irq(struct ionic_lif *lif, struct ionic_qcq *qcq)
 	const char *name;
 
 	if (lif->registered)
-		name = lif->netdev->name;
+		name = netdev_name(lif->netdev);
 	else
 		name = dev_name(dev);
 
@@ -3732,7 +3732,7 @@  static void ionic_lif_set_netdev_info(struct ionic_lif *lif)
 		},
 	};
 
-	strscpy(ctx.cmd.lif_setattr.name, lif->netdev->name,
+	strscpy(ctx.cmd.lif_setattr.name, netdev_name(lif->netdev),
 		sizeof(ctx.cmd.lif_setattr.name));
 
 	ionic_adminq_post_wait(lif, &ctx);