From: Arnd Bergmann <arnd@arndb.de>
To: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>,
Jens Axboe <axboe@kernel.dk>
Cc: Arnd Bergmann <arnd@arndb.de>, Christoph Hellwig <hch@lst.de>,
Damien Le Moal <damien.lemoal@wdc.com>,
Bart Van Assche <bvanassche@acm.org>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
Ming Lei <ming.lei@redhat.com>, Ajay Joshi <ajay.joshi@wdc.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH] block: add 'struct gendisk' declaration
Date: Fri, 29 May 2020 22:14:28 +0200 [thread overview]
Message-ID: <20200529201443.429167-1-arnd@arndb.de> (raw)
The added disk_start_io_acct() function declaration causes a warning
when CONFIG_BLOCK is disabled:
include/linux/blkdev.h:1895:41: error: declaration of 'struct gendisk' will not be visible outside of this function [-Werror,-Wvisibility]
Declare the struct tag before the function to suppress that warning.
Fixes: 956d510ee78c ("block: add disk/bio-based accounting helpers")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
include/linux/blkdev.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 36568c9d030a..96cf7af86b73 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -1892,6 +1892,7 @@ static inline void blk_wake_io_task(struct task_struct *waiter)
wake_up_process(waiter);
}
+struct gendisk;
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,
--
2.26.2
reply other threads:[~2020-05-29 20:15 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200529201443.429167-1-arnd@arndb.de \
--to=arnd@arndb.de \
--cc=ajay.joshi@wdc.com \
--cc=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--cc=damien.lemoal@wdc.com \
--cc=hch@lst.de \
--cc=khlebnikov@yandex-team.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=ming.lei@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).