The patch titled Subject: mm/zbud: fix unused function warnings when CONFIG_ZPOOL is disabled has been added to the -mm tree. Its filename is mm-zbud-dont-export-any-zbud-api-fix.patch This patch should soon appear at https://ozlabs.org/~akpm/mmots/broken-out/mm-zbud-dont-export-any-zbud-api-fix.patch and later at https://ozlabs.org/~akpm/mmotm/broken-out/mm-zbud-dont-export-any-zbud-api-fix.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Miaohe Lin <linmiaohe@xxxxxxxxxx> Subject: mm/zbud: fix unused function warnings when CONFIG_ZPOOL is disabled There are several -Wunused-function warnings when CONFIG_ZPOOL is disabled. As zbud won't do anything when CONFIG_ZPOOL is disabled, we can make zbud depends on ZPOOL and eliminate the CONFIG_ZPOOL macro in zbud.c to fix these warnings. Link: https://lkml.kernel.org/r/20210619025508.1239386-1-linmiaohe@xxxxxxxxxx Fixes: 962b7e9ad124 ("mm/zbud: don't export any zbud API") Reported-by: Nathan Chancellor <nathan@xxxxxxxxxx> Signed-off-by: Miaohe Lin <linmiaohe@xxxxxxxxxx> Cc: Dan Streetman <ddstreet@xxxxxxxx> Cc: Seth Jennings <sjenning@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/Kconfig | 1 + mm/zbud.c | 10 ---------- 2 files changed, 1 insertion(+), 10 deletions(-) --- a/mm/Kconfig~mm-zbud-dont-export-any-zbud-api-fix +++ a/mm/Kconfig @@ -674,6 +674,7 @@ config ZPOOL config ZBUD tristate "Low (Up to 2x) density storage for compressed pages" + depends on ZPOOL help A special purpose allocator for storing compressed pages. It is designed to store up to two compressed pages per physical --- a/mm/zbud.c~mm-zbud-dont-export-any-zbud-api-fix +++ a/mm/zbud.c @@ -109,10 +109,8 @@ struct zbud_pool { struct list_head lru; u64 pages_nr; const struct zbud_ops *ops; -#ifdef CONFIG_ZPOOL struct zpool *zpool; const struct zpool_ops *zpool_ops; -#endif }; /* @@ -524,8 +522,6 @@ static u64 zbud_get_pool_size(struct zbu * zpool ****************/ -#ifdef CONFIG_ZPOOL - static int zbud_zpool_evict(struct zbud_pool *pool, unsigned long handle) { if (pool->zpool && pool->zpool_ops && pool->zpool_ops->evict) @@ -616,7 +612,6 @@ static struct zpool_driver zbud_zpool_dr }; MODULE_ALIAS("zpool-zbud"); -#endif /* CONFIG_ZPOOL */ static int __init init_zbud(void) { @@ -624,19 +619,14 @@ static int __init init_zbud(void) BUILD_BUG_ON(sizeof(struct zbud_header) > ZHDR_SIZE_ALIGNED); pr_info("loaded\n"); -#ifdef CONFIG_ZPOOL zpool_register_driver(&zbud_zpool_driver); -#endif return 0; } static void __exit exit_zbud(void) { -#ifdef CONFIG_ZPOOL zpool_unregister_driver(&zbud_zpool_driver); -#endif - pr_info("unloaded\n"); } _ Patches currently in -mm which might be from linmiaohe@xxxxxxxxxx are mm-swapfile-use-percpu_ref-to-serialize-against-concurrent-swapoff.patch swap-fix-do_swap_page-race-with-swapoff.patch mm-swap-remove-confusing-checking-for-non_swap_entry-in-swap_ra_info.patch mm-shmem-fix-shmem_swapin-race-with-swapoff.patch mm-swapfile-move-get_swap_page_of_type-under-config_hibernation.patch mm-swapfile-move-get_swap_page_of_type-under-config_hibernation-fix.patch mm-swapfile-move-get_swap_page_of_type-under-config_hibernation-fix-2.patch mm-swap-remove-unused-local-variable-nr_shadows.patch mm-swap_slotsc-delete-meaningless-forward-declarations.patch mm-huge_memoryc-remove-dedicated-macro-hpage_cache_index_mask.patch mm-huge_memoryc-use-page-deferred_list.patch mm-huge_memoryc-add-missing-read-only-thp-checking-in-transparent_hugepage_enabled.patch mm-huge_memoryc-add-missing-read-only-thp-checking-in-transparent_hugepage_enabled-v4.patch mm-huge_memoryc-remove-unnecessary-tlb_remove_page_size-for-huge-zero-pmd.patch mm-huge_memoryc-dont-discard-hugepage-if-other-processes-are-mapping-it.patch mm-z3fold-define-macro-nchunks-as-total_chunks-zhdr_chunks.patch mm-z3fold-avoid-possible-underflow-in-z3fold_alloc.patch mm-z3fold-remove-magic-number-in-z3fold_create_pool.patch mm-z3fold-remove-unused-function-handle_to_z3fold_header.patch mm-z3fold-fix-potential-memory-leak-in-z3fold_destroy_pool.patch mm-z3fold-use-release_z3fold_page_locked-to-release-locked-z3fold-page.patch mm-zbud-reuse-unbuddied-as-buddied-in-zbud_pool.patch mm-zbud-dont-export-any-zbud-api.patch mm-zbud-dont-export-any-zbud-api-fix.patch mm-zswapc-remove-unused-function-zswap_debugfs_exit.patch mm-zswapc-avoid-unnecessary-copy-in-at-map-time.patch mm-zswapc-fix-two-bugs-in-zswap_writeback_entry.patch