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

Joel Stanley
2021-10-25T05:58:51Z

On Fri, 22 Oct 2021 at 08:39, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Hi all,
>
> After merging the akpm-current tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
>
> drivers/hwmon/occ/p9_sbe.c: In function 'p9_sbe_occ_save_ffdc':
> drivers/hwmon/occ/p9_sbe.c:58:5: error: implicit declaration of function 'kvfree' [-Werror=implicit-function-declaration]
> 58 | kvfree(ctx->ffdc);
> | ^~~~~~
> drivers/hwmon/occ/p9_sbe.c:59:16: error: implicit declaration of function 'kvmalloc'; did you mean 'key_alloc'? [-Werror=implicit-function-declaration]
> 59 | ctx->ffdc = kvmalloc(resp_len, GFP_KERNEL);
> | ^~~~~~~~
> | key_alloc
> drivers/hwmon/occ/p9_sbe.c:59:14: error: assignment to 'void *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion]
> 59 | ctx->ffdc = kvmalloc(resp_len, GFP_KERNEL);
> | ^
> cc1: all warnings being treated as errors
>
> Caused by commit
>
> 5027a34a575e ("hwmon: (occ) Provide the SBEFIFO FFDC in binary sysfs")
>
> from the fsi tree interacting with commit
>
> 9192e3be4cc2 ("mm: move kvmalloc-related functions to slab.h")
>
> from the akpm-current tree.

If I apply this patch then the build fails in a tree that doesn't have
Willy's patch.

Unless someone has a better suggestion I'll send a patch that includes
both headers for now, and make a note to remove the mm.h include down
the track.

Cheers,

Joel

>
> I have applied the following merge fix patch for today.
>
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Fri, 22 Oct 2021 19:32:54 +1100
> Subject: [PATCH] kvmalloc etc moved to slab.h
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
> drivers/hwmon/occ/p9_sbe.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/hwmon/occ/p9_sbe.c b/drivers/hwmon/occ/p9_sbe.c
> index e50243580269..bb082eb52243 100644
> --- a/drivers/hwmon/occ/p9_sbe.c
> +++ b/drivers/hwmon/occ/p9_sbe.c
> @@ -4,10 +4,10 @@
> #include <linux/device.h>
> #include <linux/errno.h>
> #include <linux/fsi-occ.h>
> -#include <linux/mm.h>
> #include <linux/module.h>
> #include <linux/mutex.h>
> #include <linux/platform_device.h>
> +#include <linux/slab.h>
> #include <linux/string.h>
> #include <linux/sysfs.h>
>
> --
> 2.33.0
>
> --
> Cheers,
> Stephen Rothwell