* [PATCH] char: xillybus: Use to_delayed_work()
@ 2025-04-14 7:45 Chen Ni
2025-04-15 9:46 ` Eli Billauer
0 siblings, 1 reply; 2+ messages in thread
From: Chen Ni @ 2025-04-14 7:45 UTC (permalink / raw)
To: eli.billauer, arnd, gregkh; +Cc: linux-kernel, Chen Ni
Use to_delayed_work() instead of open-coding it.
Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
---
drivers/char/xillybus/xillybus_core.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/char/xillybus/xillybus_core.c b/drivers/char/xillybus/xillybus_core.c
index 11b7c4749274..efb1ae834265 100644
--- a/drivers/char/xillybus/xillybus_core.c
+++ b/drivers/char/xillybus/xillybus_core.c
@@ -1184,8 +1184,7 @@ static int xillybus_flush(struct file *filp, fl_owner_t id)
static void xillybus_autoflush(struct work_struct *work)
{
- struct delayed_work *workitem = container_of(
- work, struct delayed_work, work);
+ struct delayed_work *workitem = to_delayed_work(work);
struct xilly_channel *channel = container_of(
workitem, struct xilly_channel, rd_workitem);
int rc;
--
2.25.1
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] char: xillybus: Use to_delayed_work()
2025-04-14 7:45 [PATCH] char: xillybus: Use to_delayed_work() Chen Ni
@ 2025-04-15 9:46 ` Eli Billauer
0 siblings, 0 replies; 2+ messages in thread
From: Eli Billauer @ 2025-04-15 9:46 UTC (permalink / raw)
To: Chen Ni, arnd, gregkh; +Cc: linux-kernel
Yes, I suppose this is the right way to do it.
Thanks,
Eli
Acked-by: Eli Billauer <eli.billauer@gmail.com>
On 14/04/2025 10:45, Chen Ni wrote:
> Use to_delayed_work() instead of open-coding it.
>
> Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
> ---
> drivers/char/xillybus/xillybus_core.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/char/xillybus/xillybus_core.c b/drivers/char/xillybus/xillybus_core.c
> index 11b7c4749274..efb1ae834265 100644
> --- a/drivers/char/xillybus/xillybus_core.c
> +++ b/drivers/char/xillybus/xillybus_core.c
> @@ -1184,8 +1184,7 @@ static int xillybus_flush(struct file *filp, fl_owner_t id)
>
> static void xillybus_autoflush(struct work_struct *work)
> {
> - struct delayed_work *workitem = container_of(
> - work, struct delayed_work, work);
> + struct delayed_work *workitem = to_delayed_work(work);
> struct xilly_channel *channel = container_of(
> workitem, struct xilly_channel, rd_workitem);
> int rc;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-04-15 9:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-14 7:45 [PATCH] char: xillybus: Use to_delayed_work() Chen Ni
2025-04-15 9:46 ` Eli Billauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®