net: prestera: Use to_delayed_work()
authorChen Ni <nichen@iscas.ac.cn>
Wed, 14 May 2025 06:40:53 +0000 (14:40 +0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 15 May 2025 14:41:58 +0000 (07:41 -0700)
Use to_delayed_work() instead of open-coding it.

Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Link: https://patch.msgid.link/20250514064053.2513921-1-nichen@iscas.ac.cn
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/marvell/prestera/prestera_counter.c

index 4cd53a2dae464cc61e877c846089aaebdf8939e9..634f4543c1d7014da8f92af32e25165329c0f8a4 100644 (file)
@@ -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;