From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 50D92C2B9F4 for ; Fri, 18 Jun 2021 00:44:25 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C6BB9613BA for ; Fri, 18 Jun 2021 00:44:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C6BB9613BA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 4CE626B0070; Thu, 17 Jun 2021 20:44:24 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 47E176B0071; Thu, 17 Jun 2021 20:44:24 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3458C6B0072; Thu, 17 Jun 2021 20:44:24 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0009.hostedemail.com [216.40.44.9]) by kanga.kvack.org (Postfix) with ESMTP id 04C396B0070 for ; Thu, 17 Jun 2021 20:44:23 -0400 (EDT) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 8F899BEE1 for ; Fri, 18 Jun 2021 00:44:23 +0000 (UTC) X-FDA: 78264998406.08.9A360B9 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf27.hostedemail.com (Postfix) with ESMTP id 2C0CD8019111 for ; Fri, 18 Jun 2021 00:44:23 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 20C266120A; Fri, 18 Jun 2021 00:44:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623977062; bh=BH7cSMvCFZpOajnaEX4oiTYblz1wH8Z8rmAGTo9a48w=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qQQ0T7IBaWitPyRQjZYnlby+ZwKf5HcKpIHgAYIk09sqan6DvLyb45STAmdNxyOg9 7FZ9YqB8oN6NB5HfLkUQvDCqSeCoWlJyvz8fAy1k2IlGBbs6uwcGsWM0Xr7GUZuXlR PMlRIUmKWVfYw2TOUY1E7I7mmSgG6NP4p7sah5X/z1Xb1qTAQnxWCO2STcfHw1Z024 /EoPSZD6eTHQOdmYZOFLTMLDlHJbV7nSZYWacNx6MhnbLE/C9kYBK/wAYdNL4ncQec lH+zRBHiaulqXmbdt85IeqKBIOQdRy/YcDgeu5fATKfq9A7/+yCCy8qUW8lazzWA0/ NPjrTCzuc9SSg== Date: Thu, 17 Jun 2021 17:44:18 -0700 From: Nathan Chancellor To: Miaohe Lin 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 Message-ID: References: <20210608114515.206992-1-linmiaohe@huawei.com> <20210608114515.206992-3-linmiaohe@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210608114515.206992-3-linmiaohe@huawei.com> X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 2C0CD8019111 Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=qQQ0T7IB; spf=pass (imf27.hostedemail.com: domain of nathan@kernel.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=nathan@kernel.org; dmarc=pass (policy=none) header.from=kernel.org X-Stat-Signature: 5xkix51ft7soay6qezdgk5ukew1u9ay6 X-HE-Tag: 1623977063-875651 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 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