2020-07-13 01:56:45

by Kefeng Wang

[permalink] [raw]
Subject: [PATCH -next] remoteproc: qcom: Add missing slab.h

drivers/remoteproc/qcom_common.c: In function ‘qcom_ssr_get_subsys’:
drivers/remoteproc/qcom_common.c:210:9: error: implicit declaration of function ‘kzalloc’; did you mean ‘vzalloc’?
[-Werror=implicit-function-declaration]
info = kzalloc(sizeof(*info), GFP_KERNEL);
^~~~~~~
vzalloc

kzalloc() is declared in linux/slab.h, add include to fix build issue.

Reported-by: Hulk Robot <[email protected]>
Signed-off-by: Kefeng Wang <[email protected]>
---
drivers/remoteproc/qcom_common.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/remoteproc/qcom_common.c b/drivers/remoteproc/qcom_common.c
index 2f45f0c79914e..085fd73fa23ae 100644
--- a/drivers/remoteproc/qcom_common.c
+++ b/drivers/remoteproc/qcom_common.c
@@ -15,6 +15,7 @@
#include <linux/remoteproc/qcom_rproc.h>
#include <linux/rpmsg/qcom_glink.h>
#include <linux/rpmsg/qcom_smd.h>
+#include <linux/slab.h>
#include <linux/soc/qcom/mdt_loader.h>

#include "remoteproc_internal.h"
--
2.26.2


2020-07-13 18:56:35

by Alex Elder

[permalink] [raw]
Subject: Re: [PATCH -next] remoteproc: qcom: Add missing slab.h

On 7/12/20 9:00 PM, Kefeng Wang wrote:
> drivers/remoteproc/qcom_common.c: In function ‘qcom_ssr_get_subsys’:
> drivers/remoteproc/qcom_common.c:210:9: error: implicit declaration of function ‘kzalloc’; did you mean ‘vzalloc’?
> [-Werror=implicit-function-declaration]
> info = kzalloc(sizeof(*info), GFP_KERNEL);
> ^~~~~~~
> vzalloc
>
> kzalloc() is declared in linux/slab.h, add include to fix build issue.
>
> Reported-by: Hulk Robot <[email protected]>
> Signed-off-by: Kefeng Wang <[email protected]>
> ---
> drivers/remoteproc/qcom_common.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/remoteproc/qcom_common.c b/drivers/remoteproc/qcom_common.c
> index 2f45f0c79914e..085fd73fa23ae 100644
> --- a/drivers/remoteproc/qcom_common.c
> +++ b/drivers/remoteproc/qcom_common.c
> @@ -15,6 +15,7 @@
> #include <linux/remoteproc/qcom_rproc.h>
> #include <linux/rpmsg/qcom_glink.h>
> #include <linux/rpmsg/qcom_smd.h>
> +#include <linux/slab.h>
> #include <linux/soc/qcom/mdt_loader.h>
>
> #include "remoteproc_internal.h"

You beat me to it. I just build-tested this fix on linux-next/master
and can confirm the build fails without it, succeeds with it.

-Alex

2020-07-13 19:04:09

by Bjorn Andersson

[permalink] [raw]
Subject: Re: [PATCH -next] remoteproc: qcom: Add missing slab.h

On Sun 12 Jul 19:00 PDT 2020, Kefeng Wang wrote:

> drivers/remoteproc/qcom_common.c: In function ?qcom_ssr_get_subsys?:
> drivers/remoteproc/qcom_common.c:210:9: error: implicit declaration of function ?kzalloc?; did you mean ?vzalloc??
> [-Werror=implicit-function-declaration]
> info = kzalloc(sizeof(*info), GFP_KERNEL);
> ^~~~~~~
> vzalloc
>
> kzalloc() is declared in linux/slab.h, add include to fix build issue.
>
> Reported-by: Hulk Robot <[email protected]>
> Signed-off-by: Kefeng Wang <[email protected]>

Thank Kefeng, patch applied.

Regards,
Bjorn

> ---
> drivers/remoteproc/qcom_common.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/remoteproc/qcom_common.c b/drivers/remoteproc/qcom_common.c
> index 2f45f0c79914e..085fd73fa23ae 100644
> --- a/drivers/remoteproc/qcom_common.c
> +++ b/drivers/remoteproc/qcom_common.c
> @@ -15,6 +15,7 @@
> #include <linux/remoteproc/qcom_rproc.h>
> #include <linux/rpmsg/qcom_glink.h>
> #include <linux/rpmsg/qcom_smd.h>
> +#include <linux/slab.h>
> #include <linux/soc/qcom/mdt_loader.h>
>
> #include "remoteproc_internal.h"
> --
> 2.26.2
>