Skip to contentSkip to conversation

remoteproc: qcom: Add missing slab.h

PATCH Applied Kefeng Wang 4 participants 4 messages Jul 13, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/remoteproc/qcom_common.c | 1 +
 1 file changed, 1 insertion(+)
drivers/remoteproc/qcom_common.c +1 -0
index 2f45f0c79914e..085fd73fa23ae 100644
@@ -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"
Signature · 1 line
2.26.2
#1 lore raw
Quoted 20 lines · Kefeng Wang

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.

---
 drivers/remoteproc/qcom_common.c | 1 +
 1 file changed, 1 insertion(+)
drivers/remoteproc/qcom_common.c +0 -0
index 2f45f0c79914e..085fd73fa23ae 100644

drivers/remoteproc/qcom_common.c line 21

Quoted 7 lines
drivers/remoteproc/qcom_common.c +1 -0
@@ -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

#2 lore raw
In reply to Kefeng Wang
Quoted 11 lines · Kefeng Wang

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.

Thank Kefeng, patch applied.

Regards,
Bjorn

Quoted 19 lines
---
 drivers/remoteproc/qcom_common.c | 1 +
 1 file changed, 1 insertion(+)
drivers/remoteproc/qcom_common.c +1 -0
index 2f45f0c79914e..085fd73fa23ae 100644
@@ -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"
Signature · 1 line
2.26.2
#3 lore raw
In reply to Kefeng Wang
This patch was applied to andersson/remoteproc.git (refs/heads/for-next).

Hello:

This patch was applied to andersson/remoteproc.git (refs/heads/for-next).

Quoted 8 lines · On Mon, 13 Jul 2020 10:00:03 +0800 you 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

[...]

Here is a summary with links:
- [-next] remoteproc: qcom: Add missing slab.h

    https://git.kernel.org/andersson/remoteproc/c/0cf17702d872128fc2bec79a9578b5cb00d54a11

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.wiki.kernel.org/userdoc/pwbot