[PATCH V2] blk-mq: kill warning when building block/blk-mq-debugfs-zoned.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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);
      |              ^~~~~~~~~~~~~

Cc: Christoph Hellwig <hch@xxxxxx>
Reported-by: kernel test robot <lkp@xxxxxxxxx>
Signed-off-by: Ming Lei <ming.lei@xxxxxxxxxx>
---
V2:
	- forward declaration of struct blk_mq_hw_ctx instead of including
	  header, as suggested by Christoph

 block/blk-mq-debugfs.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/block/blk-mq-debugfs.h b/block/blk-mq-debugfs.h
index a68aa6041a10..361d759c6fad 100644
--- a/block/blk-mq-debugfs.h
+++ b/block/blk-mq-debugfs.h
@@ -2,6 +2,8 @@
 #ifndef INT_BLK_MQ_DEBUGFS_H
 #define INT_BLK_MQ_DEBUGFS_H
 
+struct blk_mq_hw_ctx;
+
 #ifdef CONFIG_BLK_DEBUG_FS
 
 #include <linux/seq_file.h>
-- 
2.31.1




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux