[lkml]   [2019]   [Dec]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] mm: memcontrol.c: move mem_cgroup_id_get_many under CONFIG_MMU
Qian Cai writes:
>__maybe_unused should only be used in the last resort as it mark the compiler
>to catch the real issues in the future. In this case, it might be better just
>ignore it as only non-realistic compiling test would use !CONFIG_MMU in this

While that's true, I'd rather not end up with getting more patches based on
tests like these. On balance the risk of adding __maybe_unused here with a note
to remove it later seems better than having to reply to every patch removing
warnings :-)

I struggle to imagine a real issue this would catch that wouldn't already be
caught by other means. If it's just the risks of dead code, that seems equally
risky as taking time away from reviewers.

We should probably also review the coding style doc again, since this looks

>If you have a function or variable which may potentially go unused in a
>particular configuration, and the compiler would warn about its definition
>going unused, mark the definition as __maybe_unused rather than wrapping it in
>a preprocessor conditional. (However, if a function or variable *always* goes
>unused, delete it.)

 \ /
  Last update: 2019-12-17 15:37    [W:0.091 / U:1.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site