aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin/export-to-postgresql-report
diff options
context:
space:
mode:
authorArnd Bergmann <[email protected]>2016-03-22 14:27:11 -0700
committerLinus Torvalds <[email protected]>2016-03-22 15:36:02 -0700
commit0335695dfa4df01edff5bb102b9a82a0668ee51e (patch)
tree10ce3b97e625726387e5b4f46fe3d34104bafdaf /tools/perf/scripts/python/bin/export-to-postgresql-report
parente8de370188d098bb49483c287b44925957c3c9b6 (diff)
cred/userns: define current_user_ns() as a function
The current_user_ns() macro currently returns &init_user_ns when user namespaces are disabled, and that causes several warnings when building with gcc-6.0 in code that compares the result of the macro to &init_user_ns itself: fs/xfs/xfs_ioctl.c: In function 'xfs_ioctl_setattr_check_projid': fs/xfs/xfs_ioctl.c:1249:22: error: self-comparison always evaluates to true [-Werror=tautological-compare] if (current_user_ns() == &init_user_ns) This is a legitimate warning in principle, but here it isn't really helpful, so I'm reprasing the definition in a way that shuts up the warning. Apparently gcc only warns when comparing identical literals, but it can figure out that the result of an inline function can be identical to a constant expression in order to optimize a condition yet not warn about the fact that the condition is known at compile time. This is exactly what we want here, and it looks reasonable because we generally prefer inline functions over macros anyway. Signed-off-by: Arnd Bergmann <[email protected]> Acked-by: Serge Hallyn <[email protected]> Cc: David Howells <[email protected]> Cc: Yaowei Bai <[email protected]> Cc: James Morris <[email protected]> Cc: "Paul E. McKenney" <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin/export-to-postgresql-report')
0 files changed, 0 insertions, 0 deletions