Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1486167 > unrolled thread
| Started by | Stephen Rothwell <sfr@canb.auug.org.au> |
|---|---|
| First post | 2016-09-19 08:20 +0200 |
| Last post | 2016-09-19 16:30 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
linux-next: build failure after merge of the block tree Stephen Rothwell <sfr@canb.auug.org.au> - 2016-09-19 08:20 +0200
Re: linux-next: build failure after merge of the block tree Christoph Hellwig <hch@lst.de> - 2016-09-19 15:50 +0200
Re: linux-next: build failure after merge of the block tree Jens Axboe <axboe@kernel.dk> - 2016-09-19 16:30 +0200
| From | Stephen Rothwell <sfr@canb.auug.org.au> |
|---|---|
| Date | 2016-09-19 08:20 +0200 |
| Subject | linux-next: build failure after merge of the block tree |
| Message-ID | <sj05Q-1Oq-1@gated-at.bofh.it> |
Hi Jens,
After merging the block tree, today's linux-next build (powerpc
allnoconfig) failed like this:
In file included from block/blk-mq-pci.c:13:0:
include/linux/blk-mq.h:57:18: error: field 'kobj' has incomplete type
struct kobject kobj;
^
include/linux/blk-mq.h:121:2: error: unknown type name 'softirq_done_fn'
softirq_done_fn *complete;
^
include/linux/blk-mq.h: In function 'blk_mq_rq_from_pdu':
include/linux/blk-mq.h:253:22: error: invalid application of 'sizeof' to incomplete type 'struct request'
return pdu - sizeof(struct request);
^
include/linux/blk-mq.h: In function 'blk_mq_rq_to_pdu':
include/linux/blk-mq.h:257:2: error: invalid use of undefined type 'struct request'
return rq + 1;
^
Caused by commit
973c4e372c8f ("blk-mq: provide a default queue mapping for PCI device")
include/linux/blk-mq.h does not include all the headers files that it
depends on, and building block/blk-mq-pci.c should depend on CONFIG_BLOCK.
I applied this fix patch (the block/blk-mq-pci.c may not be becessary):
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 19 Sep 2016 15:50:16 +1000
Subject: [PATCH] blk_mq: linux/blk-mq.h does not include all the headers it
depends on
and building block/blk-mq-pci.o should depend on CONFIG_BLOCK
Fixes: 973c4e372c8f ("blk-mq: provide a default queue mapping for PCI device")
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
block/Kconfig | 5 +++++
block/Makefile | 2 +-
block/blk-mq-pci.c | 2 ++
3 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/block/Kconfig b/block/Kconfig
index 5136ad4bb6d5..1d4d624492fc 100644
--- a/block/Kconfig
+++ b/block/Kconfig
@@ -125,4 +125,9 @@ config BLOCK_COMPAT
depends on BLOCK && COMPAT
default y
+config BLK_MQ_PCI
+ bool
+ depends on BLOCK && PCI
+ default y
+
source block/Kconfig.iosched
diff --git a/block/Makefile b/block/Makefile
index 2447a0b1ef9c..37a0d93f97bb 100644
--- a/block/Makefile
+++ b/block/Makefile
@@ -22,4 +22,4 @@ obj-$(CONFIG_IOSCHED_CFQ) += cfq-iosched.o
obj-$(CONFIG_BLOCK_COMPAT) += compat_ioctl.o
obj-$(CONFIG_BLK_CMDLINE_PARSER) += cmdline-parser.o
obj-$(CONFIG_BLK_DEV_INTEGRITY) += bio-integrity.o blk-integrity.o t10-pi.o
-obj-$(CONFIG_PCI) += blk-mq-pci.o
+obj-$(CONFIG_BLK_MQ_PCI) += blk-mq-pci.o
diff --git a/block/blk-mq-pci.c b/block/blk-mq-pci.c
index 33c7bd743c63..966c2169762e 100644
--- a/block/blk-mq-pci.c
+++ b/block/blk-mq-pci.c
@@ -10,6 +10,8 @@
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*/
+#include <linux/kobject.h>
+#include <linux/blkdev.h>
#include <linux/blk-mq.h>
#include <linux/blk-mq-pci.h>
#include <linux/pci.h>
--
2.8.1
--
Cheers,
Stephen Rothwell
[toc] | [next] | [standalone]
| From | Christoph Hellwig <hch@lst.de> |
|---|---|
| Date | 2016-09-19 15:50 +0200 |
| Message-ID | <sj77j-65S-21@gated-at.bofh.it> |
| In reply to | #1486167 |
Thanks Stephen, the fix looks good to me: Reviewed-by: Christoph Hellwig <hch@lst.de> I had actually seen the error earlier, but for the setups I got builbot results moving the code to this new pci-dependent file fixed it. I guess that didn't went far enough.
[toc] | [prev] | [next] | [standalone]
| From | Jens Axboe <axboe@kernel.dk> |
|---|---|
| Date | 2016-09-19 16:30 +0200 |
| Message-ID | <sj7K2-6ya-17@gated-at.bofh.it> |
| In reply to | #1486167 |
On 09/19/2016 12:18 AM, Stephen Rothwell wrote:
> Hi Jens,
>
> After merging the block tree, today's linux-next build (powerpc
> allnoconfig) failed like this:
>
> In file included from block/blk-mq-pci.c:13:0:
> include/linux/blk-mq.h:57:18: error: field 'kobj' has incomplete type
> struct kobject kobj;
> ^
> include/linux/blk-mq.h:121:2: error: unknown type name 'softirq_done_fn'
> softirq_done_fn *complete;
> ^
> include/linux/blk-mq.h: In function 'blk_mq_rq_from_pdu':
> include/linux/blk-mq.h:253:22: error: invalid application of 'sizeof' to incomplete type 'struct request'
> return pdu - sizeof(struct request);
> ^
> include/linux/blk-mq.h: In function 'blk_mq_rq_to_pdu':
> include/linux/blk-mq.h:257:2: error: invalid use of undefined type 'struct request'
> return rq + 1;
> ^
>
> Caused by commit
>
> 973c4e372c8f ("blk-mq: provide a default queue mapping for PCI device")
>
> include/linux/blk-mq.h does not include all the headers files that it
> depends on, and building block/blk-mq-pci.c should depend on CONFIG_BLOCK.
>
> I applied this fix patch (the block/blk-mq-pci.c may not be becessary):
Added, thanks Stephen.
--
Jens Axboe
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web