From: Andrew Morton <akpm@linux-foundation.org>
To: Huang Shijie <sjhuang@iluvatar.ai>
Cc: <sfr@canb.auug.org.au>, <alexey.skidanov@intel.com>,
<linux-kernel@vger.kernel.org>, <shijie8@gmail.com>
Subject: Re: [PATCH 2/2] lib/genalloc.c: export symbol addr_in_gen_pool
Date: Thu, 27 Dec 2018 21:49:29 -0800 [thread overview]
Message-ID: <20181227214929.713f8421d1991806e8f6fe7f@linux-foundation.org> (raw)
In-Reply-To: <20181224070622.22197-2-sjhuang@iluvatar.ai>
On Mon, 24 Dec 2018 15:06:22 +0800 Huang Shijie <sjhuang@iluvatar.ai> wrote:
> We may use the addr_in_gen_pool() in the driver module.
> So export the addr_in_gen_pool for the compiling.
>
> ...
>
> --- a/lib/genalloc.c
> +++ b/lib/genalloc.c
> @@ -450,6 +450,7 @@ bool addr_in_gen_pool(struct gen_pool *pool, unsigned long start,
> rcu_read_unlock();
> return found;
> }
> +EXPORT_SYMBOL(addr_in_gen_pool);
>
> /**
> * gen_pool_avail - get available free space of the pool
OK, but... The name is poor.
q:/usr/src/25> grep EXPORT_SYMBOL lib/genalloc.c
EXPORT_SYMBOL(gen_pool_create);
EXPORT_SYMBOL(gen_pool_add_virt);
EXPORT_SYMBOL(gen_pool_virt_to_phys);
EXPORT_SYMBOL(gen_pool_destroy);
EXPORT_SYMBOL(gen_pool_alloc);
EXPORT_SYMBOL(gen_pool_alloc_algo);
EXPORT_SYMBOL(gen_pool_dma_alloc);
EXPORT_SYMBOL(gen_pool_free);
EXPORT_SYMBOL(gen_pool_for_each_chunk);
EXPORT_SYMBOL_GPL(gen_pool_avail);
EXPORT_SYMBOL_GPL(gen_pool_size);
EXPORT_SYMBOL(gen_pool_set_algo);
EXPORT_SYMBOL(gen_pool_first_fit);
EXPORT_SYMBOL(gen_pool_first_fit_align);
EXPORT_SYMBOL(gen_pool_fixed_alloc);
EXPORT_SYMBOL(gen_pool_first_fit_order_align);
EXPORT_SYMBOL(gen_pool_best_fit);
EXPORT_SYMBOL_GPL(gen_pool_get);
EXPORT_SYMBOL(devm_gen_pool_create);
EXPORT_SYMBOL_GPL(of_gen_pool_get);
See? Almost everything is called gen_pool_foo. Which is correct as
per kernel conventions. We should globally rename this to
gen_pool_has_addr or similar.
next prev parent reply other threads:[~2018-12-28 5:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-24 7:06 [PATCH 1/2] lib/genalloc.c: Use the vzalloc_node to allocate the bitmap Huang Shijie
2018-12-24 7:06 ` [PATCH 2/2] lib/genalloc.c: export symbol addr_in_gen_pool Huang Shijie
2018-12-28 5:49 ` Andrew Morton [this message]
2018-12-28 7:45 ` Huang Shijie
2019-01-03 7:55 ` Christoph Hellwig
2019-01-03 10:11 ` Huang Shijie
2019-01-03 15:37 ` Christoph Hellwig
2018-12-25 1:57 ` [PATCH 1/2 fix] lib/genalloc.c: Use the vzalloc_node to allocate the bitmap Huang Shijie
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=20181227214929.713f8421d1991806e8f6fe7f@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=alexey.skidanov@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
--cc=shijie8@gmail.com \
--cc=sjhuang@iluvatar.ai \
/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).