From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Enzo Matsumiya <ematsumiya@suse.de>
Cc: linux-leds@vger.kernel.org, linux-block@vger.kernel.org,
u.kleine-koenig@pengutronix.de, Jens Axboe <axboe@kernel.dk>,
Pavel Machek <pavel@ucw.cz>,
linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 1/2] block: export block_class and disk_type symbols
Date: Mon, 3 May 2021 06:48:21 +0200 [thread overview]
Message-ID: <YI+AlTtCl7KMyR6G@kroah.com> (raw)
In-Reply-To: <20210503023649.a437epxpd7tkgkwx@hyori>
On Sun, May 02, 2021 at 11:37:35PM -0300, Enzo Matsumiya wrote:
> On 05/01, Greg Kroah-Hartman wrote:
> > On Fri, Apr 30, 2021 at 03:32:10PM -0300, Enzo Matsumiya wrote:
> > > Export symbols to be used by _for_each_blk() helper in LED block
> > > trigger.
> > >
> > > Signed-off-by: Enzo Matsumiya <ematsumiya@suse.de>
> > > ---
> > > block/genhd.c | 2 ++
> > > 1 file changed, 2 insertions(+)
> > >
> > > diff --git a/block/genhd.c b/block/genhd.c
> > > index 8c8f543572e6..516495179230 100644
> > > --- a/block/genhd.c
> > > +++ b/block/genhd.c
> > > @@ -1218,6 +1218,7 @@ static void disk_release(struct device *dev)
> > > struct class block_class = {
> > > .name = "block",
> > > };
> > > +EXPORT_SYMBOL(block_class);
> > >
> > > static char *block_devnode(struct device *dev, umode_t *mode,
> > > kuid_t *uid, kgid_t *gid)
> > > @@ -1235,6 +1236,7 @@ const struct device_type disk_type = {
> > > .release = disk_release,
> > > .devnode = block_devnode,
> > > };
> > > +EXPORT_SYMBOL(disk_type);
> > >
> > > #ifdef CONFIG_PROC_FS
> > > /*
> >
> > Please please no. These should not be needed by anything.
> >
> > And if they really do, they must be EXPORT_SYMBOL_GPL().
> >
> > thanks,
> >
> > greg k-h
>
> Thanks. I was indeed skeptical about submitting this particular change.
>
> Do you think it's more acceptable if I implement a for_each_blk() helper
> (cf. patch 2 on this series) on block code?
>
> I couldn't find any other way to do this (get all block devices on the
> system), so please let me know if I missed something.
Why would you want a list of all block devices in the system? What are
you going to do with such a thing? How does the block core handle other
random drivers getting references to the things it thinks it controls?
thanks,
greg k-h
next prev parent reply other threads:[~2021-05-03 4:48 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-30 18:32 [RFC PATCH 0/2] leds: trigger: introduce block trigger Enzo Matsumiya
2021-04-30 18:32 ` [RFC PATCH 1/2] block: export block_class and disk_type symbols Enzo Matsumiya
2021-05-01 6:24 ` Greg Kroah-Hartman
2021-05-03 2:37 ` Enzo Matsumiya
2021-05-03 4:48 ` Greg Kroah-Hartman [this message]
2021-05-03 7:04 ` Christoph Hellwig
2021-05-03 16:50 ` Enzo Matsumiya
2021-04-30 18:32 ` [RFC PATCH 2/2] leds: trigger: implement block trigger Enzo Matsumiya
2021-04-30 18:52 ` Randy Dunlap
2021-05-03 2:38 ` Enzo Matsumiya
2021-04-30 20:11 ` Marek Behun
2021-05-03 2:46 ` Enzo Matsumiya
2021-05-03 5:53 ` Hannes Reinecke
2021-05-03 10:11 ` Pavel Machek
2021-05-03 16:56 ` Enzo Matsumiya
2021-05-04 15:43 ` Pavel Machek
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=YI+AlTtCl7KMyR6G@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=axboe@kernel.dk \
--cc=ematsumiya@suse.de \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=u.kleine-koenig@pengutronix.de \
/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.