All of lore.kernel.org
 help / color / mirror / Atom feed
From: JP Kobryn <jp.kobryn@linux.dev>
To: Roman Gushchin <roman.gushchin@linux.dev>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	Alexei Starovoitov <ast@kernel.org>,
	kernel test robot <lkp@intel.com>
Subject: Re: mm/bpf_memcontrol.c:125:27: sparse: sparse: symbol 'bpf_mem_cgroup_memory_events' was not declared. Should it be static?
Date: Wed, 17 Jun 2026 11:06:55 -0700	[thread overview]
Message-ID: <b3729b0b-6809-4712-9bc1-1655906aa100@linux.dev> (raw)
In-Reply-To: <202606150332.Xy4Egd9s-lkp@intel.com>

On 6/14/26 12:07 PM, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   8cd9520d35a6c38db6567e97dd93b1f11f185dc6
> commit: 99430ab8b804c26b8a0dec93fcbfe75469f3edc7 mm: introduce BPF kfuncs to access memcg statistics and events
> date:   6 months ago
> config: powerpc-randconfig-r134-20260614 (https://download.01.org/0day-ci/archive/20260615/202606150332.Xy4Egd9s-lkp@intel.com/config)
> compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 305faf498a4e0b52b40742c927af63ab2082e1a9)
> sparse: v0.6.5-rc1
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260615/202606150332.Xy4Egd9s-lkp@intel.com/reproduce)
> 
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Fixes: 99430ab8b804 ("mm: introduce BPF kfuncs to access memcg statistics and events")
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202606150332.Xy4Egd9s-lkp@intel.com/
> 
> sparse warnings: (new ones prefixed by >>)
>>> mm/bpf_memcontrol.c:125:27: sparse: sparse: symbol 'bpf_mem_cgroup_memory_events' was not declared. Should it be static?
>    mm/bpf_memcontrol.c:68:9: sparse: sparse: context imbalance in 'bpf_get_mem_cgroup' - different lock contexts for basic block
> 
> vim +/bpf_mem_cgroup_memory_events +125 mm/bpf_memcontrol.c
> 
>    117	
>    118	/**
>    119	 * bpf_mem_cgroup_memory_events - Read memory cgroup's memory event value
>    120	 * @memcg: memory cgroup
>    121	 * @event: memory event id
>    122	 *
>    123	 * Return: The current value of the memory event counter.
>    124	 */
>  > 125	__bpf_kfunc unsigned long bpf_mem_cgroup_memory_events(struct mem_cgroup *memcg,
>    126							       enum memcg_memory_event event)

Roman, it looks like the kfuncs added for bpfoom can safely be made
static since they get resolved through BTF. I'll send a patch to update
where applicable.

      reply	other threads:[~2026-06-17 18:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-14 19:07 mm/bpf_memcontrol.c:125:27: sparse: sparse: symbol 'bpf_mem_cgroup_memory_events' was not declared. Should it be static? kernel test robot
2026-06-17 18:06 ` JP Kobryn [this message]

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=b3729b0b-6809-4712-9bc1-1655906aa100@linux.dev \
    --to=jp.kobryn@linux.dev \
    --cc=ast@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=roman.gushchin@linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.