# Re: \[PATCH 06/14\] mm/memcontrol.c: Fix kerneldoc comment for mem\_cgroup\_calculate\_protection

- From: Chris Down \<chris@chrisdown.name\>
- Date: 2021-05-20 23:24:30 
- List: linux-mm
- Page: https://ratatoskr.run/linux-mm/2021/05/1386771
- Thread: https://ratatoskr.run/linux-mm/2021/05/1384393/t.md

```text
Mel Gorman writes:
>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.
>
>Fixes: 45c7f7e1ef17 ("mm, memcg: decouple e{low,min} state mutations from protection checks")
>Signed-off-by: Mel Gorman <redacted>

Whoops, thanks.

Acked-by: Chris Down <chris@chrisdown.name>

>---
> mm/memcontrol.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/mm/memcontrol.c b/mm/memcontrol.c
>index 64ada9e650a5..030c1dc131ce 100644
>--- a/mm/memcontrol.c
>+++ b/mm/memcontrol.c
>@@ -6456,7 +6456,7 @@ static unsigned long effective_protection(unsigned long usage,
> }
>
> /**
>- * 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
>  *
>-- 
>2.26.2
>
>

```
