From: Nathan Chancellor <nathan@kernel.org>
To: Miaohe Lin <linmiaohe@huawei.com>
Cc: akpm@linux-foundation.org, sjenning@redhat.com,
ddstreet@ieee.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org
Subject: Re: [PATCH v2 2/2] mm/zbud: don't export any zbud API
Date: Thu, 17 Jun 2021 17:44:18 -0700 [thread overview]
Message-ID: <YMvsYm8b+yTIrqBC@archlinux-ax161> (raw)
In-Reply-To: <20210608114515.206992-3-linmiaohe@huawei.com>
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
next prev parent reply other threads:[~2021-06-18 0:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-08 11:45 [PATCH v2 0/2] Cleanups for zbud Miaohe Lin
2021-06-08 11:45 ` [PATCH v2 1/2] mm/zbud: reuse unbuddied[0] as buddied in zbud_pool Miaohe Lin
2021-06-08 11:45 ` [PATCH v2 2/2] mm/zbud: don't export any zbud API Miaohe Lin
2021-06-18 0:44 ` Nathan Chancellor [this message]
2021-06-18 2:28 ` Miaohe Lin
2021-06-18 2:42 ` Nathan Chancellor
2021-06-18 2:52 ` Miaohe Lin
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=YMvsYm8b+yTIrqBC@archlinux-ax161 \
--to=nathan@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=ddstreet@ieee.org \
--cc=linmiaohe@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=sjenning@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