From: kernel test robot <lkp@intel.com>
To: Samuel Wu <wusamuel@google.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Len Brown <lenb@kernel.org>, Pavel Machek <pavel@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Danilo Krummrich <dakr@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev, andrii@kernel.org,
memxor@gmail.com, bpf@vger.kernel.org,
Samuel Wu <wusamuel@google.com>,
kernel-team@android.com, linux-pm@vger.kernel.org,
driver-core@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 1/2] PM: wakeup: Add kfuncs to lock/unlock wakeup_sources
Date: Mon, 23 Mar 2026 20:33:36 +0800 [thread overview]
Message-ID: <202603232018.pdjbZ3eL-lkp@intel.com> (raw)
In-Reply-To: <20260320160055.4114055-2-wusamuel@google.com>
Hi Samuel,
kernel test robot noticed the following build warnings:
[auto build test WARNING on rafael-pm/linux-next]
[also build test WARNING on rafael-pm/bleeding-edge linus/master v7.0-rc5 next-20260320]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Samuel-Wu/PM-wakeup-Add-kfuncs-to-lock-unlock-wakeup_sources/20260323-064540
base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
patch link: https://lore.kernel.org/r/20260320160055.4114055-2-wusamuel%40google.com
patch subject: [PATCH v1 1/2] PM: wakeup: Add kfuncs to lock/unlock wakeup_sources
config: x86_64-randconfig-121-20260323 (https://download.01.org/0day-ci/archive/20260323/202603232018.pdjbZ3eL-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.4.0-5) 12.4.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260323/202603232018.pdjbZ3eL-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
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202603232018.pdjbZ3eL-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/base/power/wakeup.c:1189:32: sparse: sparse: symbol 'bpf_wakeup_sources_read_lock' was not declared. Should it be static?
>> drivers/base/power/wakeup.c:1202:18: sparse: sparse: symbol 'bpf_wakeup_sources_read_unlock' was not declared. Should it be static?
vim +/bpf_wakeup_sources_read_lock +1189 drivers/base/power/wakeup.c
1177
1178 /**
1179 * bpf_wakeup_sources_read_lock - Acquire the SRCU lock for wakeup sources
1180 *
1181 * The underlying SRCU lock returns an integer index. However, the BPF verifier
1182 * requires a pointer (PTR_TO_BTF_ID) to strictly track the state of acquired
1183 * resources using KF_ACQUIRE and KF_RELEASE semantics. We use an opaque
1184 * structure pointer (struct bpf_ws_lock *) to satisfy the verifier while
1185 * safely encoding the integer index within the pointer address itself.
1186 *
1187 * Return: An opaque pointer encoding the SRCU lock index + 1 (to avoid NULL).
1188 */
> 1189 __bpf_kfunc struct bpf_ws_lock *bpf_wakeup_sources_read_lock(void)
1190 {
1191 return (struct bpf_ws_lock *)(long)(wakeup_sources_read_lock() + 1);
1192 }
1193
1194 /**
1195 * bpf_wakeup_sources_read_unlock - Release the SRCU lock for wakeup sources
1196 * @lock: The opaque pointer returned by bpf_wakeup_sources_read_lock()
1197 *
1198 * The BPF verifier guarantees that @lock is a valid, unreleased pointer from
1199 * the acquire function. We decode the pointer back into the integer SRCU index
1200 * by subtracting 1 and release the lock.
1201 */
> 1202 __bpf_kfunc void bpf_wakeup_sources_read_unlock(struct bpf_ws_lock *lock)
1203 {
1204 wakeup_sources_read_unlock((int)(long)lock - 1);
1205 }
1206
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2026-03-23 12:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-20 16:00 [PATCH v1 0/2] *** Support BPF traversal of wakeup sources *** Samuel Wu
2026-03-20 16:00 ` [PATCH v1 1/2] PM: wakeup: Add kfuncs to lock/unlock wakeup_sources Samuel Wu
2026-03-23 12:33 ` kernel test robot [this message]
2026-03-20 16:00 ` [PATCH v1 2/2] PM: Add config flag to gate sysfs wakeup_sources Samuel Wu
2026-03-20 16:09 ` Rafael J. Wysocki
2026-03-21 0:46 ` Samuel Wu
2026-03-21 17:51 ` [PATCH v1 0/2] *** Support BPF traversal of wakeup sources *** Kumar Kartikeya Dwivedi
2026-03-23 16:20 ` Samuel Wu
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=202603232018.pdjbZ3eL-lkp@intel.com \
--to=lkp@intel.com \
--cc=andrii@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=dakr@kernel.org \
--cc=driver-core@lists.linux.dev \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-team@android.com \
--cc=lenb@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=memxor@gmail.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=pavel@kernel.org \
--cc=rafael@kernel.org \
--cc=wusamuel@google.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox