The patch titled Subject: mm/zsmalloc.c: make several functions and a struct static has been added to the -mm tree. Its filename is mm-zsmalloc-make-several-functions-and-a-struct-static.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/mm-zsmalloc-make-several-functions-and-a-struct-static.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/mm-zsmalloc-make-several-functions-and-a-struct-static.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: Colin Ian King <colin.king@xxxxxxxxxxxxx> Subject: mm/zsmalloc.c: make several functions and a struct static The functions zs_page_isolate, zs_page_migrate, zs_page_putback, lock_zspage, trylock_zspage and structure zsmalloc_aops are local to source and do not need to be in global scope, so make them static. Cleans up sparse warnings: symbol 'zs_page_isolate' was not declared. Should it be static? symbol 'zs_page_migrate' was not declared. Should it be static? symbol 'zs_page_putback' was not declared. Should it be static? symbol 'zsmalloc_aops' was not declared. Should it be static? symbol 'lock_zspage' was not declared. Should it be static? symbol 'trylock_zspage' was not declared. Should it be static? Link: http://lkml.kernel.org/r/20180624213322.13776-1-colin.king@xxxxxxxxxxxxx Signed-off-by: Colin Ian King <colin.king@xxxxxxxxxxxxx> Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@xxxxxxxxx> Cc: Minchan Kim <minchan@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- diff -puN mm/zsmalloc.c~mm-zsmalloc-make-several-functions-and-a-struct-static mm/zsmalloc.c --- a/mm/zsmalloc.c~mm-zsmalloc-make-several-functions-and-a-struct-static +++ a/mm/zsmalloc.c @@ -928,7 +928,7 @@ static void reset_page(struct page *page * To prevent zspage destroy during migration, zspage freeing should * hold locks of all pages in the zspage. */ -void lock_zspage(struct zspage *zspage) +static void lock_zspage(struct zspage *zspage) { struct page *page = get_first_page(zspage); @@ -937,7 +937,7 @@ void lock_zspage(struct zspage *zspage) } while ((page = get_next_page(page)) != NULL); } -int trylock_zspage(struct zspage *zspage) +static int trylock_zspage(struct zspage *zspage) { struct page *cursor, *fail; @@ -1905,7 +1905,7 @@ static void replace_sub_page(struct size __SetPageMovable(newpage, page_mapping(oldpage)); } -bool zs_page_isolate(struct page *page, isolate_mode_t mode) +static bool zs_page_isolate(struct page *page, isolate_mode_t mode) { struct zs_pool *pool; struct size_class *class; @@ -1960,7 +1960,7 @@ bool zs_page_isolate(struct page *page, return true; } -int zs_page_migrate(struct address_space *mapping, struct page *newpage, +static int zs_page_migrate(struct address_space *mapping, struct page *newpage, struct page *page, enum migrate_mode mode) { struct zs_pool *pool; @@ -2076,7 +2076,7 @@ unpin_objects: return ret; } -void zs_page_putback(struct page *page) +static void zs_page_putback(struct page *page) { struct zs_pool *pool; struct size_class *class; @@ -2108,7 +2108,7 @@ void zs_page_putback(struct page *page) spin_unlock(&class->lock); } -const struct address_space_operations zsmalloc_aops = { +static const struct address_space_operations zsmalloc_aops = { .isolate_page = zs_page_isolate, .migratepage = zs_page_migrate, .putback_page = zs_page_putback, _ Patches currently in -mm which might be from colin.king@xxxxxxxxxxxxx are mm-zsmalloc-make-several-functions-and-a-struct-static.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html