Subject: + checkpatch-add-warning-of-future-__gfp_nofail-use.patch added to -mm tree To: rientjes@xxxxxxxxxx,joe@xxxxxxxxxxx From: akpm@xxxxxxxxxxxxxxxxxxxx Date: Wed, 11 Dec 2013 15:58:26 -0800 The patch titled Subject: checkpatch: add warning of future __GFP_NOFAIL use has been added to the -mm tree. Its filename is checkpatch-add-warning-of-future-__gfp_nofail-use.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/checkpatch-add-warning-of-future-__gfp_nofail-use.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/checkpatch-add-warning-of-future-__gfp_nofail-use.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/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: David Rientjes <rientjes@xxxxxxxxxx> Subject: checkpatch: add warning of future __GFP_NOFAIL use gfp.h and page_alloc.c already specify that __GFP_NOFAIL is deprecated and no new users should be added. Add a warning to checkpatch to catch this. Signed-off-by: David Rientjes <rientjes@xxxxxxxxxx> Cc: Joe Perches <joe@xxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- scripts/checkpatch.pl | 6 ++++++ 1 file changed, 6 insertions(+) diff -puN scripts/checkpatch.pl~checkpatch-add-warning-of-future-__gfp_nofail-use scripts/checkpatch.pl --- a/scripts/checkpatch.pl~checkpatch-add-warning-of-future-__gfp_nofail-use +++ a/scripts/checkpatch.pl @@ -4119,6 +4119,12 @@ sub process { "$1 uses number as first arg, sizeof is generally wrong\n" . $herecurr); } +# check for GFP_NOWAIT use + if ($line =~ /\b__GFP_NOFAIL\b/) { + WARN("__GFP_NOFAIL", + "Use of __GFP_NOFAIL is deprecated, no new users should be added\n" . $herecurr); + } + # check for multiple semicolons if ($line =~ /;\s*;\s*$/) { if (WARN("ONE_SEMICOLON", _ Patches currently in -mm which might be from rientjes@xxxxxxxxxx are include-linux-hugetlbh-make-isolate_huge_page-an-inline.patch mm-memcg-do-not-declare-oom-from-__gfp_nofail-allocations.patch mm-memcg-fix-race-condition-between-memcg-teardown-and-swapin.patch mm-memcg-do-not-allow-task-about-to-oom-kill-to-bypass-the-limit.patch arch-x86-mm-sratc-skip-numa_no_node-while-parsing-slit.patch arch-x86-mm-sratc-skip-numa_no_node-while-parsing-slit-fix.patch mm-memcg-avoid-oom-notification-when-current-needs-access-to-memory-reserves.patch mm-mempolicy-remove-unneeded-functions-for-uma-configs.patch mm-show_mem-remove-show_mem_filter_page_count.patch introduce-for_each_thread-to-replace-the-buggy-while_each_thread.patch oom_kill-change-oom_killc-to-use-for_each_thread.patch oom_kill-has_intersects_mems_allowed-needs-rcu_read_lock.patch oom_kill-add-rcu_read_lock-into-find_lock_task_mm.patch mm-page_alloc-allow-__gfp_nofail-to-allocate-below-watermarks-after-reclaim.patch lib-show_memc-show-num_poisoned_pages-when-oom.patch memcg-oom-lock-mem_cgroup_print_oom_info.patch checkpatch-add-warning-of-future-__gfp_nofail-use.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