Skip to contentSkip to conversation

linux-next: build failure after merge of the rdma tree

PATCH Stephen Rothwell 3 participants 3 messages Feb 26, 2020

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

Hi all,

After merging the rdma tree, today's linux-next build (powerpc allyesconfig) failed like this:

drivers/infiniband/hw/bnxt_re/qplib_res.c: In function '__free_pbl':
drivers/infiniband/hw/bnxt_re/qplib_res.c:78:2: error: implicit declaration of function 'vfree'; did you mean 'kfree'? [-Werror=implicit-function-declaration]

   78 |  vfree(pbl->pg_arr);
      |  ^~~~~
      |  kfree
drivers/infiniband/hw/bnxt_re/qplib_res.c: In function '__alloc_pbl':
drivers/infiniband/hw/bnxt_re/qplib_res.c:117:16: error: implicit declaration of function 'vmalloc'; did you mean 'kmalloc'? [-Werror=implicit-function-declaration]
  117 |  pbl->pg_arr = vmalloc(pages * sizeof(void *));
      |                ^~~~~~~
      |                kmalloc

drivers/infiniband/hw/bnxt_re/qplib_res.c:117:14: warning: assignment to 'void **' from 'int' makes pointer from integer without a cast [-Wint-conversion]
117 | pbl->pg_arr = vmalloc(pages * sizeof(void *));
| ^
drivers/infiniband/hw/bnxt_re/qplib_res.c:121:18: warning: assignment to 'dma_addr_t *' {aka 'long long unsigned int *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
121 | pbl->pg_map_arr = vmalloc(pages * sizeof(dma_addr_t));
| ^

Caused by commit

0c4dcd602817 ("RDMA/bnxt_re: Refactor hardware queue memory allocation")

I added the following fix for today:

From: Stephen Rothwell <[email protected]>
Date: Wed, 26 Feb 2020 13:46:02 +1100
Subject: [PATCH] RDMA/bnxt_re: using vmalloc requires including vmalloc.h

Fixes 0c4dcd602817 ("RDMA/bnxt_re: Refactor hardware queue memory allocation")
---
 drivers/infiniband/hw/bnxt_re/qplib_res.c | 1 +
 1 file changed, 1 insertion(+)
drivers/infiniband/hw/bnxt_re/qplib_res.c +1 -0
index 4346b95963cf..fc5909c7f2e0 100644
@@ -44,6 +44,7 @@
 #include <linux/inetdevice.h>
 #include <linux/dma-mapping.h>
 #include <linux/if_vlan.h>
+#include <linux/vmalloc.h>
 #include "roce_hsi.h"
 #include "qplib_res.h"
 #include "qplib_sp.h"
Signature · 5 lines
2.25.0

-- 
Cheers,
Stephen Rothwell
Acked-by
#1 lore raw
Quoted 54 lines · Stephen Rothwell

Hi all,

After merging the rdma tree, today's linux-next build (powerpc allyesconfig) failed like this:

drivers/infiniband/hw/bnxt_re/qplib_res.c: In function '__free_pbl':
drivers/infiniband/hw/bnxt_re/qplib_res.c:78:2: error: implicit declaration of function 'vfree'; did you mean 'kfree'? [-Werror=implicit-function-declaration]

   78 |  vfree(pbl->pg_arr);
      |  ^~~~~
      |  kfree
drivers/infiniband/hw/bnxt_re/qplib_res.c: In function '__alloc_pbl':
drivers/infiniband/hw/bnxt_re/qplib_res.c:117:16: error: implicit declaration of function 'vmalloc'; did you mean 'kmalloc'? [-Werror=implicit-function-declaration]
  117 |  pbl->pg_arr = vmalloc(pages * sizeof(void *));
      |                ^~~~~~~
      |                kmalloc

drivers/infiniband/hw/bnxt_re/qplib_res.c:117:14: warning: assignment to 'void **' from 'int' makes pointer from integer without a cast [-Wint-conversion]
117 | pbl->pg_arr = vmalloc(pages * sizeof(void *));
| ^
drivers/infiniband/hw/bnxt_re/qplib_res.c:121:18: warning: assignment to 'dma_addr_t *' {aka 'long long unsigned int *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
121 | pbl->pg_map_arr = vmalloc(pages * sizeof(dma_addr_t));
| ^

Caused by commit

0c4dcd602817 ("RDMA/bnxt_re: Refactor hardware queue memory allocation")

I added the following fix for today:

From: Stephen Rothwell <[email protected]>
Date: Wed, 26 Feb 2020 13:46:02 +1100
Subject: [PATCH] RDMA/bnxt_re: using vmalloc requires including vmalloc.h

Fixes 0c4dcd602817 ("RDMA/bnxt_re: Refactor hardware queue memory allocation")
---
 drivers/infiniband/hw/bnxt_re/qplib_res.c | 1 +
 1 file changed, 1 insertion(+)
drivers/infiniband/hw/bnxt_re/qplib_res.c +1 -1
index 4346b95963cf..fc5909c7f2e0 100644
@@ -44,6 +44,7 @@
 #include <linux/inetdevice.h>
 #include <linux/dma-mapping.h>
 #include <linux/if_vlan.h>
+#include <linux/vmalloc.h>
 #include "roce_hsi.h"
 #include "qplib_res.h"
 #include "qplib_sp.h"
--

2.25.0

Quoted 3 lines

--
Cheers,
Stephen Rothwell

Thanks!

#2 lore raw
In reply to Stephen Rothwell
Quoted 28 lines · Stephen Rothwell

Hi all,

After merging the rdma tree, today's linux-next build (powerpc allyesconfig) failed like this:

drivers/infiniband/hw/bnxt_re/qplib_res.c: In function '__free_pbl':
drivers/infiniband/hw/bnxt_re/qplib_res.c:78:2: error: implicit declaration of function 'vfree'; did you mean 'kfree'? [-Werror=implicit-function-declaration]

   78 |  vfree(pbl->pg_arr);
      |  ^~~~~
      |  kfree
drivers/infiniband/hw/bnxt_re/qplib_res.c: In function '__alloc_pbl':
drivers/infiniband/hw/bnxt_re/qplib_res.c:117:16: error: implicit declaration of function 'vmalloc'; did you mean 'kmalloc'? [-Werror=implicit-function-declaration]
  117 |  pbl->pg_arr = vmalloc(pages * sizeof(void *));
      |                ^~~~~~~
      |                kmalloc

drivers/infiniband/hw/bnxt_re/qplib_res.c:117:14: warning: assignment to 'void **' from 'int' makes pointer from integer without a cast [-Wint-conversion]
117 | pbl->pg_arr = vmalloc(pages * sizeof(void *));
| ^
drivers/infiniband/hw/bnxt_re/qplib_res.c:121:18: warning: assignment to 'dma_addr_t *' {aka 'long long unsigned int *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
121 | pbl->pg_map_arr = vmalloc(pages * sizeof(dma_addr_t));
| ^

Caused by commit

0c4dcd602817 ("RDMA/bnxt_re: Refactor hardware queue memory allocation")

I added the following fix for today:

Quoted 8 lines

From: Stephen Rothwell <[email protected]>
Date: Wed, 26 Feb 2020 13:46:02 +1100
Subject: [PATCH] RDMA/bnxt_re: using vmalloc requires including vmalloc.h

Fixes 0c4dcd602817 ("RDMA/bnxt_re: Refactor hardware queue memory allocation")
 drivers/infiniband/hw/bnxt_re/qplib_res.c | 1 +
 1 file changed, 1 insertion(+)

Okay applied, thanks

Jason