All of lore.kernel.org
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@infradead.org>
To: LKML <linux-kernel@vger.kernel.org>,
	"linux-next@vger.kernel.org" <linux-next@vger.kernel.org>,
	axboe <axboe@kernel.dk>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	Stephen Rothwell <sfr@canb.auug.org.au>
Subject: [PATCH -next] block: add another struct gendisk to <linux/blkdev.h>
Date: Thu, 28 May 2020 10:21:56 -0700	[thread overview]
Message-ID: <9a8676b1-c79e-9963-3ffc-c113b11d988d@infradead.org> (raw)

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


             reply	other threads:[~2020-05-28 17:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-28 17:21 Randy Dunlap [this message]
2020-05-28 19:44 ` [PATCH -next] block: add another struct gendisk to <linux/blkdev.h> Jens Axboe

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=9a8676b1-c79e-9963-3ffc-c113b11d988d@infradead.org \
    --to=rdunlap@infradead.org \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    /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 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.