* [PATCH -next] block: add another struct gendisk to <linux/blkdev.h>
@ 2020-05-28 17:21 Randy Dunlap
2020-05-28 19:44 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Randy Dunlap @ 2020-05-28 17:21 UTC (permalink / raw)
To: LKML, linux-next, axboe, linux-block, Stephen Rothwell
From: Randy Dunlap <rdunlap@infradead.org>
Add a forward declaration for struct gendisk when CONFIG_BLOCK is
not set/enabled to prevent multiple (30 - 50) build warnings.
In file included from ../kernel/sched/sched.h:39:0,
from ../kernel/sched/core.c:9:
../include/linux/blkdev.h:1895:41: warning: 'struct gendisk' declared inside parameter list will not be visible outside of this definition or declaration
unsigned long disk_start_io_acct(struct gendisk *disk, unsigned int sectors,
^~~~~~~
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org
---
include/linux/blkdev.h | 1 +
1 file changed, 1 insertion(+)
--- linux-next-20200528.orig/include/linux/blkdev.h
+++ linux-next-20200528/include/linux/blkdev.h
@@ -1836,6 +1836,7 @@ static inline bool blk_req_can_dispatch_
#else /* CONFIG_BLOCK */
struct block_device;
+struct gendisk;
/*
* stubs for when the block layer is configured out
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH -next] block: add another struct gendisk to <linux/blkdev.h>
2020-05-28 17:21 [PATCH -next] block: add another struct gendisk to <linux/blkdev.h> Randy Dunlap
@ 2020-05-28 19:44 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2020-05-28 19:44 UTC (permalink / raw)
To: Randy Dunlap, LKML, linux-next, linux-block, Stephen Rothwell
On 5/28/20 11:21 AM, Randy Dunlap wrote:
> From: Randy Dunlap <rdunlap@infradead.org>
>
> Add a forward declaration for struct gendisk when CONFIG_BLOCK is
> not set/enabled to prevent multiple (30 - 50) build warnings.
>
> In file included from ../kernel/sched/sched.h:39:0,
> from ../kernel/sched/core.c:9:
> ../include/linux/blkdev.h:1895:41: warning: 'struct gendisk' declared inside parameter list will not be visible outside of this definition or declaration
> unsigned long disk_start_io_acct(struct gendisk *disk, unsigned int sectors,
Should be fixed already:
https://git.kernel.dk/cgit/linux-block/commit/?h=for-5.8/block&id=dc35ada4251f183137ee3a524543c9329d7a4fa2
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-28 19:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-28 17:21 [PATCH -next] block: add another struct gendisk to <linux/blkdev.h> Randy Dunlap
2020-05-28 19:44 ` Jens Axboe
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).