mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] mm: memcontrol: fix compilation
@ 2026-09-07 14:14 Bert Karwatzki
       [not found] ` <20260907141808.3F4581F00A3A@smtp.kernel.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Bert Karwatzki @ 2026-09-07 14:14 UTC (permalink / raw)
  To: linux-kernel
  Cc: Bert Karwatzki, Johannes Weiner, Michal Hocko, Roman Gushchin,
	Shakeel Butt, Muchun Song, cgroups, linux-mm, linux-next

Signed-off-by: Bert Karwatzki <spasswolf@web.de>
---
 mm/memcontrol.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 5b9e0ebd42ae..e50135df6e82 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -71,6 +71,7 @@
 #include "memcontrol-v1.h"
 
 #include <linux/uaccess.h>
+#include <linux/irq_work.h>
 
 #define CREATE_TRACE_POINTS
 #include <trace/events/memcg.h>
-- 
2.55.0

In next-20260904 compilation fails with this error:

mm/memcontrol.c: In function ‘try_charge_memcg’:
mm/memcontrol.c:2859:41: error: implicit declaration of function ‘irq_work_queue’; did you mean ‘drain_workqueue’? [-Wimplicit-function-declaration]
 2859 |                                         irq_work_queue(&memcg->high_irq_work);
      |                                         ^~~~~~~~~~~~~~
      |                                         drain_workqueue
  CC [M]  drivers/usb/typec/ucsi/ucsi.o
  CC [M]  drivers/usb/typec/tipd/core.o
mm/memcontrol.c: In function ‘mem_cgroup_alloc’:
mm/memcontrol.c:4234:9: error: implicit declaration of function ‘init_irq_work’; did you mean ‘init_irq_proc’? [-Wimplicit-function-declaration]
 4234 |         init_irq_work(&memcg->high_irq_work, high_irq_work_func);
      |         ^~~~~~~~~~~~~
      |         init_irq_proc
  CC [M]  drivers/net/wireless/mediatek/mt76/mt792x_acpi_sar.o
mm/memcontrol.c: In function ‘mem_cgroup_css_free’:
mm/memcontrol.c:4443:9: error: implicit declaration of function ‘irq_work_sync’ [-Wimplicit-function-declaration]
 4443 |         irq_work_sync(&memcg->high_irq_work);
      |         ^~~~~~~~~~~~~

explicitly including include/linux/irq_work.h fixes the issue.

Bert Karwatzki

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] mm: memcontrol: fix compilation
       [not found] ` <20260907141808.3F4581F00A3A@smtp.kernel.org>
@ 2026-09-07 17:29   ` Bert Karwatzki
  0 siblings, 0 replies; 2+ messages in thread
From: Bert Karwatzki @ 2026-09-07 17:29 UTC (permalink / raw)
  To: sashiko-reviews; +Cc: mkoutny, tj, hannes, spasswolf, linux-next, linux-kernel

Am Montag, dem 07.09.2026 um 14:18 +0000 schrieb sashiko-bot@kernel.org:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [Low] Redundant include of <linux/irq_work.h>
> --
> 
> commit e46ef07a908650625b6fdf687c2624752ae3ff9c
> Author: Bert Karwatzki <spasswolf@web.de>
> 
> mm: memcontrol: fix compilation
> 
> This commit attempts to fix a compilation issue by including
> <linux/irq_work.h> in mm/memcontrol.c.
> 
> > diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> > index 307203301a2a5..4740f519883a3 100644
> > --- a/mm/memcontrol.c
> > +++ b/mm/memcontrol.c
> > @@ -72,6 +72,7 @@
> >  #include "memcontrol-v1.h"
> >  
> >  #include <linux/uaccess.h>
> > +#include <linux/irq_work.h>
> 
> [Severity: Low]
> Is this additional include necessary? I noticed that <linux/irq_work.h> is
> already unconditionally included slightly earlier in this same file:
> 
> mm/memcontrol.c:
> #include <linux/kmemleak.h>
> #include <linux/irq_work.h>
> #include "internal.h"

Yes, the include is neccessary because irq_work.h is not already include
in next-20260904.

In next-20260907 it's not included, either, but it is no longer necessary,
as mm/memcontrol.c no longer use struct irq_work_queue.



Bert Karwatzki

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-09-07 17:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-07 14:14 [PATCH] mm: memcontrol: fix compilation Bert Karwatzki
     [not found] ` <20260907141808.3F4581F00A3A@smtp.kernel.org>
2026-09-07 17:29   ` Bert Karwatzki

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®