Re: linux-next: build failure after merge of the bitmap tree

Yury Norov
2024-05-08T22:18:50Z

On Wed, May 08, 2024 at 09:24:41PM +0800, Kuan-Wei Chiu wrote:
> On Wed, May 08, 2024 at 04:27:55PM +1000, Stephen Rothwell wrote:
> > Hi all,
> >
> > After merging the bitmap tree, today's linux-next build (powerpc
> > ppc64_defconfig) failed like this:
> >
> > lib/test_bitops.c: In function 'test_fns':
> > lib/test_bitops.c:56:9: error: cleanup argument not a function
> > 56 | unsigned long *buf __free(kfree) = NULL;
> > | ^~~~~~~~
> > lib/test_bitops.c:60:15: error: implicit declaration of function 'kmalloc_array' [-Werror=implicit-function-declaration]
> > 60 | buf = kmalloc_array(10000, sizeof(unsigned long), GFP_KERNEL);
> > | ^~~~~~~~~~~~~
> > lib/test_bitops.c:60:13: error: assignment to 'long unsigned int *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion]
> > 60 | buf = kmalloc_array(10000, sizeof(unsigned long), GFP_KERNEL);
> > | ^
> > cc1: all warnings being treated as errors
> >
> > Caused by commit
> >
> > 777c893e12fa ("lib/test_bitops: Add benchmark test for fns()")
> >
> > I have used the bitmap tree from next-20240507 for today.
> >
> > --
> > Cheers,
> > Stephen Rothwell
>
> Hi Yury,
>
> I believe the following patch can resolve this issue. If you agree that
> this patch is correct, could you help me fold it into the commit that
> caused the error mentioned above?
>
> Regards,
> Kuan-Wei

Updated, thanks