Public bug reported:
After a derivative kernel rebase to resolute generic kernel-7.0.0-44.44,
we got a building failure on test_bitmap.c:
resolute-xuantie/linux-main/lib/test_bitmap.c: In function ‘test_zero_nbits’:
resolute-xuantie/linux-main/lib/test_bitmap.c:1460:15: error: implicit
declaration of function ‘bitmap_weight_from’; did you mean ‘bitmap_weight_and’?
[-Werror=implicit-function-declaration]
1460 | ret = bitmap_weight_from(NULL, 0, 0);
| ^~~~~~~~~~~~~~~~~~
| bitmap_weight_and
Looks like the culprit commit is:
bitmap: add test_zero_nbits()
BugLink: https://bugs.launchpad.net/bugs/2165189
In most real-life cases, 0-length bitmap provided by user is a sign of
an error. The API doesn't provide any guarantees on returned value, and
the bitmap pointers are not dereferenced.
Signed-off-by: Yury Norov <[email protected]>
(cherry picked from commit 95d324fb1b48434f4c659e4c245c3bdeecdff22c)
[cremfuelled: Need __bitmap_weighted_or() to be exported for the
following commit to not cause a build failure.]
Signed-off-by: Alice C. Munduruca <[email protected]>
Signed-off-by: Edoardo Canepa <[email protected]>
The solution is to cherry-pick a prerequisite commit:
commit bf31ddc14f8c6bcd4987c31fe2bc9e93e433b41a
Author: Yury Norov <[email protected]>
Date: Mon Dec 22 14:11:37 2025 -0500
bitmap: add bitmap_weight_from()
The function calculates a Hamming weight of a bitmap starting from an
arbitrary bit.
Signed-off-by: Yury Norov <[email protected]>
** Affects: linux (Ubuntu)
Importance: High
Status: New
** Affects: linux (Ubuntu Resolute)
Importance: High
Status: New
** Also affects: linux (Ubuntu Resolute)
Importance: Undecided
Status: New
** Changed in: linux (Ubuntu)
Importance: Undecided => High
** Changed in: linux (Ubuntu Resolute)
Importance: Undecided => High
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2174555
Title:
resolute generic kernel build failure on lib/test_bitmap.c
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2174555/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs