The patch titled Subject: mm/mmap_lock: remove dead code for !CONFIG_TRACING configurations has been added to the -mm tree. Its filename is mm-mmap_lock-remove-dead-code-for-config_tracing-configurations.patch This patch should soon appear at https://ozlabs.org/~akpm/mmots/broken-out/mm-mmap_lock-remove-dead-code-for-config_tracing-configurations.patch and later at https://ozlabs.org/~akpm/mmotm/broken-out/mm-mmap_lock-remove-dead-code-for-config_tracing-configurations.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: Mel Gorman <mgorman@xxxxxxxxxxxxxxxxxxx> Subject: mm/mmap_lock: remove dead code for !CONFIG_TRACING configurations make W=1 generates the following warning in mmap_lock.c for allnoconfig mm/mmap_lock.c:213:6: warning: no previous prototype for `__mmap_lock_do_trace_start_locking' [-Wmissing-prototypes] void __mmap_lock_do_trace_start_locking(struct mm_struct *mm, bool write) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mm/mmap_lock.c:219:6: warning: no previous prototype for `__mmap_lock_do_trace_acquire_returned' [-Wmissing-prototypes] void __mmap_lock_do_trace_acquire_returned(struct mm_struct *mm, bool write, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mm/mmap_lock.c:226:6: warning: no previous prototype for `__mmap_lock_do_trace_released' [-Wmissing-prototypes] void __mmap_lock_do_trace_released(struct mm_struct *mm, bool write) On !CONFIG_TRACING configurations, the code is dead so put it behind an #ifdef. Link: https://lkml.kernel.org/r/20210520084809.8576-13-mgorman@xxxxxxxxxxxxxxxxxxx Signed-off-by: Mel Gorman <mgorman@xxxxxxxxxxxxxxxxxxx> Cc: Dan Streetman <ddstreet@xxxxxxxx> Cc: David Hildenbrand <david@xxxxxxxxxx> Cc: Michal Hocko <mhocko@xxxxxxxxxx> Cc: Vlastimil Babka <vbabka@xxxxxxx> Cc: Yang Shi <shy828301@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/mmap_lock.c | 2 ++ 1 file changed, 2 insertions(+) --- a/mm/mmap_lock.c~mm-mmap_lock-remove-dead-code-for-config_tracing-configurations +++ a/mm/mmap_lock.c @@ -205,6 +205,7 @@ void trace_mmap_lock_unreg(void) #endif /* CONFIG_MEMCG */ +#ifdef CONFIG_TRACING /* * Trace calls must be in a separate file, as otherwise there's a circular * dependency between linux/mmap_lock.h and trace/events/mmap_lock.h. @@ -228,3 +229,4 @@ void __mmap_lock_do_trace_released(struc TRACE_MMAP_LOCK_EVENT(released, mm, write); } EXPORT_SYMBOL(__mmap_lock_do_trace_released); +#endif /* CONFIG_TRACING */ _ Patches currently in -mm which might be from mgorman@xxxxxxxxxxxxxxxxxxx are mm-page_alloc-split-per-cpu-page-lists-and-zone-stats.patch mm-page_alloc-split-per-cpu-page-lists-and-zone-stats-fix.patch mm-page_alloc-split-per-cpu-page-lists-and-zone-stats-fix-fix.patch mm-page_alloc-convert-per-cpu-list-protection-to-local_lock.patch mm-vmstat-convert-numa-statistics-to-basic-numa-counters.patch mm-vmstat-inline-numa-event-counter-updates.patch mm-page_alloc-batch-the-accounting-updates-in-the-bulk-allocator.patch mm-page_alloc-reduce-duration-that-irqs-are-disabled-for-vm-counters.patch mm-page_alloc-explicitly-acquire-the-zone-lock-in-__free_pages_ok.patch mm-page_alloc-avoid-conflating-irqs-disabled-with-zone-lock.patch mm-page_alloc-update-pgfree-outside-the-zone-lock-in-__free_pages_ok.patch mm-vmscan-remove-kerneldoc-like-comment-from-isolate_lru_pages.patch mm-vmalloc-include-header-for-prototype-of-set_iounmap_nonlazy.patch mm-page_alloc-make-should_fail_alloc_page-a-static-function-should_fail_alloc_page-static.patch mm-mapping_dirty_helpers-remove-double-note-in-kerneldoc.patch mm-early_ioremap-add-prototype-for-early_memremap_pgprot_adjust.patch mm-memcontrolc-fix-kerneldoc-comment-for-mem_cgroup_calculate_protection.patch mm-memory_hotplug-fix-kerneldoc-comment-for-__try_online_node.patch mm-memory_hotplug-fix-kerneldoc-comment-for-__remove_memory.patch mm-zbud-add-kerneldoc-fields-for-zbud_pool.patch mm-z3fold-add-kerneldoc-fields-for-z3fold_pool.patch mm-swap-make-swap_address_space-an-inline-function.patch mm-mmap_lock-remove-dead-code-for-config_tracing-configurations.patch mm-page_alloc-move-prototype-for-find_suitable_fallback.patch mm-swap-make-node_data-an-inline-function-on-config_flatmem.patch