* [PATCH] blk-mq: kill warning when building block/blk-mq-debugfs-zoned.c
@ 2022-03-01 9:10 Ming Lei
2022-03-01 13:22 ` Christoph Hellwig
0 siblings, 1 reply; 2+ messages in thread
From: Ming Lei @ 2022-03-01 9:10 UTC (permalink / raw)
To: Jens Axboe; +Cc: linux-block, Ming Lei, kernel test robot
Fix the following warning when building block/blk-mq-debugfs-zoned.c:
In file included from block/blk-mq-debugfs-zoned.c:7:
block/blk-mq-debugfs.h:24:14: warning: ‘struct blk_mq_hw_ctx’ declared inside parameter list will not be visible outside of this definition or declaration
24 | struct blk_mq_hw_ctx *hctx);
| ^~~~~~~~~~~~~
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
---
block/blk-mq-debugfs.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/block/blk-mq-debugfs.h b/block/blk-mq-debugfs.h
index a68aa6041a10..37fe2716e96e 100644
--- a/block/blk-mq-debugfs.h
+++ b/block/blk-mq-debugfs.h
@@ -5,6 +5,7 @@
#ifdef CONFIG_BLK_DEBUG_FS
#include <linux/seq_file.h>
+#include <linux/blk-mq.h>
struct blk_mq_debugfs_attr {
const char *name;
--
2.31.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] blk-mq: kill warning when building block/blk-mq-debugfs-zoned.c
2022-03-01 9:10 [PATCH] blk-mq: kill warning when building block/blk-mq-debugfs-zoned.c Ming Lei
@ 2022-03-01 13:22 ` Christoph Hellwig
0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2022-03-01 13:22 UTC (permalink / raw)
To: Ming Lei; +Cc: Jens Axboe, linux-block, kernel test robot
On Tue, Mar 01, 2022 at 05:10:55PM +0800, Ming Lei wrote:
> Fix the following warning when building block/blk-mq-debugfs-zoned.c:
>
> In file included from block/blk-mq-debugfs-zoned.c:7:
> block/blk-mq-debugfs.h:24:14: warning: ‘struct blk_mq_hw_ctx’ declared inside parameter list will not be visible outside of this definition or declaration
> 24 | struct blk_mq_hw_ctx *hctx);
> | ^~~~~~~~~~~~~
I think a forard eclaration of struct blk_mq_hw_ctx is all we need here,
no need to pull the full header in.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-03-01 13:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-01 9:10 [PATCH] blk-mq: kill warning when building block/blk-mq-debugfs-zoned.c Ming Lei
2022-03-01 13:22 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).