Re: [PATCH v2] memcg: refactor mem_cgroup_resize_limit()
From: kbuild test robot
Date: Sun Jun 04 2017 - 17:01:17 EST
Hi Yu,
[auto build test ERROR on mmotm/master]
[also build test ERROR on v4.12-rc3 next-20170602]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Yu-Zhao/memcg-refactor-mem_cgroup_resize_limit/20170605-041444
base: git://git.cmpxchg.org/linux-mmotm.git master
config: x86_64-randconfig-x002-201723 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All error/warnings (new ones prefixed by >>):
In file included from arch/x86/include/asm/atomic.h:4:0,
from include/linux/atomic.h:4,
from include/linux/page_counter.h:4,
from mm/memcontrol.c:34:
mm/memcontrol.c: In function 'mem_cgroup_resize_limit':
include/linux/compiler.h:156:2: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
if (__builtin_constant_p(!!(cond)) ? !!(cond) : \
^
include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
#define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
^~~~~~~~~~
>> mm/memcontrol.c:2453:3: note: in expansion of macro 'if'
if (inverted)
^~
mm/memcontrol.c:2455:4: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
ret = -EINVAL;
^~~
In file included from arch/x86/include/asm/atomic.h:4:0,
from include/linux/atomic.h:4,
from include/linux/page_counter.h:4,
from mm/memcontrol.c:34:
>> include/linux/compiler.h:156:2: error: expected 'while' before 'if'
if (__builtin_constant_p(!!(cond)) ? !!(cond) : \
^
include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
#define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
^~~~~~~~~~
mm/memcontrol.c:2458:3: note: in expansion of macro 'if'
if (limit > counter->limit)
^~
>> include/linux/compiler.h:170:3: error: expected statement before ')' token
}))
^
include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
#define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
^~~~~~~~~~
mm/memcontrol.c:2458:3: note: in expansion of macro 'if'
if (limit > counter->limit)
^~
include/linux/compiler.h:170:4: error: expected statement before ')' token
}))
^
include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
#define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
^~~~~~~~~~
mm/memcontrol.c:2458:3: note: in expansion of macro 'if'
if (limit > counter->limit)
^~
mm/memcontrol.c:2464:4: error: break statement not within loop or switch
break;
^~~~~
mm/memcontrol.c:2474:2: warning: no return statement in function returning non-void [-Wreturn-type]
} while (retry_count);
^
mm/memcontrol.c: At top level:
mm/memcontrol.c:2474:4: error: expected identifier or '(' before 'while'
} while (retry_count);
^~~~~
In file included from arch/x86/include/asm/atomic.h:4:0,
from include/linux/atomic.h:4,
from include/linux/page_counter.h:4,
from mm/memcontrol.c:34:
>> include/linux/compiler.h:156:2: error: expected identifier or '(' before 'if'
if (__builtin_constant_p(!!(cond)) ? !!(cond) : \
^
include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
#define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
^~~~~~~~~~
mm/memcontrol.c:2476:2: note: in expansion of macro 'if'
if (!ret && enlarge)
^~
>> include/linux/compiler.h:170:3: error: expected identifier or '(' before ')' token
}))
^
include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
#define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
^~~~~~~~~~
mm/memcontrol.c:2476:2: note: in expansion of macro 'if'
if (!ret && enlarge)
^~
mm/memcontrol.c:2479:2: error: expected identifier or '(' before 'return'
return ret;
^~~~~~
mm/memcontrol.c:2480:1: error: expected identifier or '(' before '}' token
}
^
vim +/if +2453 mm/memcontrol.c
2437 * of # of children which we should visit in this loop.
2438 */
2439 retry_count = MEM_CGROUP_RECLAIM_RETRIES *
2440 mem_cgroup_count_children(memcg);
2441
2442 oldusage = page_counter_read(counter);
2443
2444 do {
2445 if (signal_pending(current)) {
2446 ret = -EINTR;
2447 break;
2448 }
2449
2450 mutex_lock(&memcg_limit_mutex);
2451 inverted = memsw ? limit < memcg->memory.limit :
2452 limit > memcg->memsw.limit;
> 2453 if (inverted)
2454 mutex_unlock(&memcg_limit_mutex);
2455 ret = -EINVAL;
2456 break;
2457 }
2458 if (limit > counter->limit)
2459 enlarge = true;
2460 ret = page_counter_limit(counter, limit);
2461 mutex_unlock(&memcg_limit_mutex);
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip