Skip to contentSkip to conversation

net: prestera: Use to_delayed_work()

PATCH Applied Chen Ni 2 participants 2 messages May 14, 2025 – May 15, 2025

Subsystems (3)

v1 of 2 Applied 1/1 Latest is v2 →

lore
Share & tools
lore

Chen Ni

author
#0 lore raw

PATCH 1/1 net: prestera: Use to_delayed_work()

Use to_delayed_work() instead of open-coding it.

---
 drivers/net/ethernet/marvell/prestera/prestera_counter.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/ethernet/marvell/prestera/prestera_counter.c +1 -2
index 4cd53a2dae46..634f4543c1d7 100644
@@ -336,8 +336,7 @@ prestera_counter_block_get_by_idx(struct prestera_counter *counter, u32 idx)
 
 static void prestera_counter_stats_work(struct work_struct *work)
 {
-	struct delayed_work *dl_work =
-		container_of(work, struct delayed_work, work);
+	struct delayed_work *dl_work = to_delayed_work(work);
 	struct prestera_counter *counter =
 		container_of(dl_work, struct prestera_counter, stats_dw);
 	struct prestera_counter_block *block;
Signature · 1 line
2.25.1
#1 lore raw
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 6 lines · On Wed, 14 May 2025 14:40:53 +0800 you wrote:

Use to_delayed_work() instead of open-coding it.

---
 drivers/net/ethernet/marvell/prestera/prestera_counter.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Here is the summary with links:
- [net-next] net: prestera: Use to_delayed_work()

    https://git.kernel.org/netdev/net-next/c/21c608a88f4f

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html