Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1013983pxj; Thu, 17 Jun 2021 20:11:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwC22gY3mNtsoPhOlK08FL7ro3cPxbbgg9oFyPBVF7gB9N58vsZ4xqpSjb3D6gR+da13gFR X-Received: by 2002:a50:ccd8:: with SMTP id b24mr1982697edj.386.1623985904853; Thu, 17 Jun 2021 20:11:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623985904; cv=none; d=google.com; s=arc-20160816; b=StHAixY7IJwOnGx1GCha+tyEF4JAqhrZlc7xzy0YqNG8SfzUs9dbTGSikJrmeEFFcO qpSa0010Trny7kjQOofF7pR1Kgz0RB8QuHVa0vhjMI0Hd5LRrSuZoJP6VdMjEaKqGVRI 0tJfqZ7aNU70+IM3E+lWy9KP4Q16i59sOQ4Dc69jo5NHsOuEQ4SlJeyU8wNpVL6sH9Er 9Ql/OXC/bIcL4Lf4UxqJinias0aBs9+S0DHijAJyjIrnWHywQCCHBq9gR5HLxFgVZ+m9 wDnPjOvjiRfKXASsvN/R6KclL3aocdqhtmLe7JAVHEuPKcmlxJ7BCA1zOQJaXw5HfGbD SDXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=tTDqCQuVf7gcI7lRJstDLTyArP0OyNxKpKm+fMYFz+c=; b=QoSL4TtMknH4d03EPO7F6E7KKdRKdlfKFPFy+uxsY6XovtYDugj7qUHY6auaapxoqj NNf/RahhAB2Pc2/B4dpcl1y4ZXz27gpTezD6+mzNGDLKcLjiFwo3qx6lHhRvQn5OAJs6 uXeuaSgILrFnFFBhCJrxcU0GqftfCnaZAG284Zf1n8UJ+u6oNACFJVKwyraZ/f5Dw31/ O3U5i3ZLfWh3aXQ0012Sb1eRPQZ/sgW9XK2dmN8Ehy/BeqwpZJFWO0j/R8irnEUJejJU GKzAGMtX3U/9S5HlbcKpQDySncBPaV5ixvsmFWIyKT6aNbxuJoiH8fy263G6tOFwqZ1w Kr5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qQQ0T7IB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r15si7888969edo.442.2021.06.17.20.11.22; Thu, 17 Jun 2021 20:11:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qQQ0T7IB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233000AbhFRAqb (ORCPT + 99 others); Thu, 17 Jun 2021 20:46:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:44356 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232027AbhFRAqa (ORCPT ); Thu, 17 Jun 2021 20:46:30 -0400 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> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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