All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] block: fix a warning when blkdev.h is included for !CONFIG_BLOCK builds
@ 2020-05-28 13:41 Christoph Hellwig
  2020-05-28 14:47 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Christoph Hellwig @ 2020-05-28 13:41 UTC (permalink / raw)
  To: axboe; +Cc: linux-block, Stephen Rothwell

disk_start_io_acct and disk_end_io_acct need at least a struct gendisk
forward declaration, but for weird historic reasons much of blkdev.h
is stubbed out for CONFIG_BLOCK=n.  Fix this by stubbing more out for
now, but eventually this header will need a massive cleanup.

Fixes: 956d510ee78 ("block: add disk/bio-based accounting helpers")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 include/linux/blkdev.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 6f7ff0fa8fcf8..8fd900998b4e2 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -1892,12 +1892,12 @@ static inline void blk_wake_io_task(struct task_struct *waiter)
 		wake_up_process(waiter);
 }
 
+#ifdef CONFIG_BLOCK
 unsigned long disk_start_io_acct(struct gendisk *disk, unsigned int sectors,
 		unsigned int op);
 void disk_end_io_acct(struct gendisk *disk, unsigned int op,
 		unsigned long start_time);
 
-#ifdef CONFIG_BLOCK
 /**
  * bio_start_io_acct - start I/O accounting for bio based drivers
  * @bio:	bio to start account for
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] block: fix a warning when blkdev.h is included for !CONFIG_BLOCK builds
  2020-05-28 13:41 [PATCH] block: fix a warning when blkdev.h is included for !CONFIG_BLOCK builds Christoph Hellwig
@ 2020-05-28 14:47 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2020-05-28 14:47 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linux-block, Stephen Rothwell

On 5/28/20 7:41 AM, Christoph Hellwig wrote:
> disk_start_io_acct and disk_end_io_acct need at least a struct gendisk
> forward declaration, but for weird historic reasons much of blkdev.h
> is stubbed out for CONFIG_BLOCK=n.  Fix this by stubbing more out for
> now, but eventually this header will need a massive cleanup.

Applied, thanks.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-05-28 14:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-28 13:41 [PATCH] block: fix a warning when blkdev.h is included for !CONFIG_BLOCK builds Christoph Hellwig
2020-05-28 14:47 ` Jens Axboe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.