aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKexin(Casey) Chen <Casey.Chen@windriver.com>2018-02-28 20:44:52 -0500
committerBruce Ashfield <bruce.ashfield@windriver.com>2018-03-05 14:56:06 -0500
commit2fc9913a485c37429f9c2b55a870d91dc6fa0031 (patch)
treee46a428551bd76d4b71bd59813e50a6ab1d59f8a
parent3247d5a26cab529bd4acc137c119bcdf71c3d5ae (diff)
downloadlinux-yocto-2fc9913a485c37429f9c2b55a870d91dc6fa0031.tar.gz
linux-yocto-2fc9913a485c37429f9c2b55a870d91dc6fa0031.tar.bz2
linux-yocto-2fc9913a485c37429f9c2b55a870d91dc6fa0031.zip
aufs: fix compile warning
Forward port linux-yocto-4.8's patch to fix the build warning. http://git.yoctoproject.org/cgit/cgit.cgi/linux-yocto-4.8/commit/?h=standard/base&id=7e0dd2f2b0971f0e3191e1ddc088e09eb9855567 fs/aufs/debug.h:95:19: warning: comparison of constant '0' with boolean expression is always false [-Wbool-compare] if (unlikely((e) < 0)) \ ^ fs/aufs/vdir.c:852:2: note: in expansion of macro 'AuTraceErr' AuTraceErr(!valid); ^~~~~~~~~~ In expansion of AuTraceErr(!valid), comparison of (!valid) and constant '0' always passes unlikely(x) false. function 'static int seek_vdir(struct file *file, struct dir_context *ctx)' is to find whether there is a valid vd_deblk following ctx->pos. return 1 means valid, 0 for not. Change to AuTraceErr(valid - 1) makes more sense. Signed-off-by: Kexin(Casey) Chen <Casey.Chen@windriver.com> Signed-off-by: Dengke Du <dengke.du@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
-rw-r--r--fs/aufs/vdir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/aufs/vdir.c b/fs/aufs/vdir.c
index b7583e9f0d36..15f0106e43d7 100644
--- a/fs/aufs/vdir.c
+++ b/fs/aufs/vdir.c
@@ -841,7 +841,7 @@ static int seek_vdir(struct file *file, struct dir_context *ctx)
out:
/* smp_mb(); */
- AuTraceErr(!valid);
+ AuTraceErr(valid - 1);
return valid;
}