netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Petr Pavlu <petr.pavlu@suse.com>
To: tariqt@nvidia.com, yishaih@nvidia.com, leon@kernel.org
Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, jgg@ziepe.ca, netdev@vger.kernel.org,
	linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org,
	Petr Pavlu <petr.pavlu@suse.com>,
	Leon Romanovsky <leonro@nvidia.com>
Subject: [PATCH net-next v3 02/11] mlx4: Rename member mlx4_en_dev.nb to netdev_nb
Date: Mon, 21 Aug 2023 15:12:16 +0200	[thread overview]
Message-ID: <20230821131225.11290-3-petr.pavlu@suse.com> (raw)
In-Reply-To: <20230821131225.11290-1-petr.pavlu@suse.com>

Rename the mlx4_en_dev.nb notifier_block member to netdev_nb in
preparation to add a mlx4 core notifier_block.

Signed-off-by: Petr Pavlu <petr.pavlu@suse.com>
Tested-by: Leon Romanovsky <leonro@nvidia.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Acked-by: Tariq Toukan <tariqt@nvidia.com>
---
 drivers/net/ethernet/mellanox/mlx4/en_main.c   | 14 +++++++-------
 drivers/net/ethernet/mellanox/mlx4/en_netdev.c |  2 +-
 drivers/net/ethernet/mellanox/mlx4/mlx4_en.h   |  2 +-
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx4/en_main.c b/drivers/net/ethernet/mellanox/mlx4/en_main.c
index 6a42bec6bd85..be8ba34c9025 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_main.c
@@ -235,8 +235,8 @@ static void mlx4_en_remove(struct mlx4_dev *dev, void *endev_ptr)
 	iounmap(mdev->uar_map);
 	mlx4_uar_free(dev, &mdev->priv_uar);
 	mlx4_pd_free(dev, mdev->priv_pdn);
-	if (mdev->nb.notifier_call)
-		unregister_netdevice_notifier(&mdev->nb);
+	if (mdev->netdev_nb.notifier_call)
+		unregister_netdevice_notifier(&mdev->netdev_nb);
 	kfree(mdev);
 }
 
@@ -252,11 +252,11 @@ static void mlx4_en_activate(struct mlx4_dev *dev, void *ctx)
 			mdev->pndev[i] = NULL;
 	}
 
-	/* register notifier */
-	mdev->nb.notifier_call = mlx4_en_netdev_event;
-	if (register_netdevice_notifier(&mdev->nb)) {
-		mdev->nb.notifier_call = NULL;
-		mlx4_err(mdev, "Failed to create notifier\n");
+	/* register netdev notifier */
+	mdev->netdev_nb.notifier_call = mlx4_en_netdev_event;
+	if (register_netdevice_notifier(&mdev->netdev_nb)) {
+		mdev->netdev_nb.notifier_call = NULL;
+		mlx4_err(mdev, "Failed to create netdev notifier\n");
 	}
 }
 
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
index 403604ceebc8..7066c426b95c 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
@@ -2967,7 +2967,7 @@ int mlx4_en_netdev_event(struct notifier_block *this,
 	if (!net_eq(dev_net(ndev), &init_net))
 		return NOTIFY_DONE;
 
-	mdev = container_of(this, struct mlx4_en_dev, nb);
+	mdev = container_of(this, struct mlx4_en_dev, netdev_nb);
 	dev = mdev->dev;
 
 	/* Go into this mode only when two network devices set on two ports
diff --git a/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h b/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
index 321f801c1d7c..72a3fea36702 100644
--- a/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
+++ b/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
@@ -432,7 +432,7 @@ struct mlx4_en_dev {
 	unsigned long		last_overflow_check;
 	struct ptp_clock	*ptp_clock;
 	struct ptp_clock_info	ptp_clock_info;
-	struct notifier_block	nb;
+	struct notifier_block	netdev_nb;
 };
 
 
-- 
2.35.3


  parent reply	other threads:[~2023-08-21 13:12 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-21 13:12 [PATCH net-next v3 00/11] Convert mlx4 to use auxiliary bus Petr Pavlu
2023-08-21 13:12 ` [PATCH net-next v3 01/11] mlx4: Get rid of the mlx4_interface.get_dev callback Petr Pavlu
2023-08-21 13:12 ` Petr Pavlu [this message]
2023-08-21 13:12 ` [PATCH net-next v3 03/11] mlx4: Use 'void *' as the event param of mlx4_dispatch_event() Petr Pavlu
2023-08-22 14:03   ` Leon Romanovsky
2023-08-21 13:12 ` [PATCH net-next v3 04/11] mlx4: Replace the mlx4_interface.event callback with a notifier Petr Pavlu
2023-08-22 14:04   ` Leon Romanovsky
2023-08-21 13:12 ` [PATCH net-next v3 05/11] mlx4: Get rid of the mlx4_interface.activate callback Petr Pavlu
2023-08-21 13:12 ` [PATCH net-next v3 06/11] mlx4: Move the bond work to the core driver Petr Pavlu
2023-08-21 13:12 ` [PATCH net-next v3 07/11] mlx4: Avoid resetting MLX4_INTFF_BONDING per driver Petr Pavlu
2023-08-21 13:12 ` [PATCH net-next v3 08/11] mlx4: Register mlx4 devices to an auxiliary virtual bus Petr Pavlu
2023-08-21 13:12 ` [PATCH net-next v3 09/11] mlx4: Connect the ethernet part to the auxiliary bus Petr Pavlu
2023-08-21 13:12 ` [PATCH net-next v3 10/11] mlx4: Connect the infiniband " Petr Pavlu
2023-08-21 13:12 ` [PATCH net-next v3 11/11] mlx4: Delete custom device management logic Petr Pavlu
2023-08-23  7:30 ` [PATCH net-next v3 00/11] Convert mlx4 to use auxiliary bus patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230821131225.11290-3-petr.pavlu@suse.com \
    --to=petr.pavlu@suse.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jgg@ziepe.ca \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=leonro@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=tariqt@nvidia.com \
    --cc=yishaih@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).