# \[patch 119/192\] mm/memcontrol.c: fix kerneldoc comment for mem\_cgroup\_calculate\_protection

- From: Andrew Morton \<akpm@linux-foundation.org\>
- Date: 2021-07-01 01:53:35 
- List: linux-mm
- Page: https://ratatoskr.run/linux-mm/2021/07/6509511
- Thread: https://ratatoskr.run/linux-mm/2021/07/6509393/t/2.md

```text
From: Mel Gorman <redacted>
Subject: mm/memcontrol.c: fix kerneldoc comment for mem_cgroup_calculate_protection

make W=1 generates the following warning for mem_cgroup_calculate_protection

  mm/memcontrol.c:6468: warning: expecting prototype for mem_cgroup_protected(). Prototype was for mem_cgroup_calculate_protection() instead

Commit 45c7f7e1ef17 ("mm, memcg: decouple e{low,min} state mutations from
protection checks") changed the function definition but not the associated
kerneldoc comment.

Link: https://lkml.kernel.org/r/20210520084809.8576-7-mgorman@techsingularity.net
Fixes: 45c7f7e1ef17 ("mm, memcg: decouple e{low,min} state mutations from protection checks")
Signed-off-by: Mel Gorman <redacted>
Reviewed-by: Yang Shi <redacted>
Acked-by: Chris Down <chris@chrisdown.name>
Acked-by: Vlastimil Babka <redacted>
Cc: Dan Streetman <redacted>
Cc: David Hildenbrand <redacted>
Cc: Michal Hocko <mhocko@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/memcontrol.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/mm/memcontrol.c~mm-memcontrolc-fix-kerneldoc-comment-for-mem_cgroup_calculate_protection
+++ a/mm/memcontrol.c
@@ -6639,7 +6639,7 @@ static unsigned long effective_protectio
 }
 
 /**
- * mem_cgroup_protected - check if memory consumption is in the normal range
+ * mem_cgroup_calculate_protection - check if memory consumption is in the normal range
  * @root: the top ancestor of the sub-tree being checked
  * @memcg: the memory cgroup to check
  *
_

```
