Re: [PATCH v2 2/2] mm/zbud: don't export any zbud API

From
Nathan Chancellor <nathan@kernel.org>
Date
2021-06-18 00:44:30
Also in
lkml
Reply to
Miaohe Lin, 2021-06-08
On Tue, Jun 08, 2021 at 07:45:15PM +0800, Miaohe Lin wrote:
The zbud doesn't need to export any API and it is meant to be used via
zpool API since the commit 12d79d64bfd3 ("mm/zpool: update zswap to use
zpool"). So we can remove the unneeded zbud.h and move down zpool API
to avoid any forward declaration.

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
This patch causes several new warnings when CONFIG_ZPOOL is disabled:

mm/zbud.c:222:26: warning: unused function 'zbud_create_pool' [-Wunused-function]
mm/zbud.c:246:13: warning: unused function 'zbud_destroy_pool' [-Wunused-function]
mm/zbud.c:270:12: warning: unused function 'zbud_alloc' [-Wunused-function]
mm/zbud.c:345:13: warning: unused function 'zbud_free' [-Wunused-function]
mm/zbud.c:417:12: warning: unused function 'zbud_reclaim_page' [-Wunused-function]
mm/zbud.c:499:14: warning: unused function 'zbud_map' [-Wunused-function]
mm/zbud.c:509:13: warning: unused function 'zbud_unmap' [-Wunused-function]
mm/zbud.c:520:12: warning: unused function 'zbud_get_pool_size' [-Wunused-function]

It seems to me like all of these functions should be sunk into their
callers and eliminated entirely as part of this refactoring. I took a
whack at it but got lost with the kernel docs so someone who is familiar
with this should probably do it.

Cheers,
Nathan
Thread (7 messages) 7 messages, 2 authors, last reply 2021-06-18
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help