summaryrefslogtreecommitdiff
path: root/fs/lockd
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2026-02-04 21:21:51 +0100
committerChuck Lever <chuck.lever@oracle.com>2026-03-29 21:25:09 -0400
commit6f57293abb8d087de830dd3f02e66d94b3e59973 (patch)
tree19196acc297bfe829b12d7ae9d0e8b785c63f9d4 /fs/lockd
parentadcc59114ccd402259c089b0fea24da5e4974563 (diff)
downloadlwn-6f57293abb8d087de830dd3f02e66d94b3e59973.tar.gz
lwn-6f57293abb8d087de830dd3f02e66d94b3e59973.zip
sunrpc: Fix compilation error (`make W=1`) when dprintk() is no-op
Clang compiler is not happy about set but unused variables: .../flexfilelayout/flexfilelayoutdev.c:56:9: error: variable 'ret' set but not used [-Werror,-Wunused-but-set-variable] .../flexfilelayout/flexfilelayout.c:1505:6: error: variable 'err' set but not used [-Werror,-Wunused-but-set-variable] .../nfs4proc.c:9244:12: error: variable 'ptr' set but not used [-Werror,-Wunused-but-set-variable] Fix these by forwarding parameters of dprintk() to no_printk(). The positive side-effect is a format-string checker enabled even for the cases when dprintk() is no-op. Fixes: d67ae825a59d ("pnfs/flexfiles: Add the FlexFile Layout Driver") Fixes: fc931582c260 ("nfs41: create_session operation") Acked-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'fs/lockd')
-rw-r--r--fs/lockd/svclock.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/lockd/svclock.c b/fs/lockd/svclock.c
index e687103e42d1..ee23f5802af1 100644
--- a/fs/lockd/svclock.c
+++ b/fs/lockd/svclock.c
@@ -74,6 +74,11 @@ static const char *nlmdbg_cookie2a(const struct nlm_cookie *cookie)
return buf;
}
+#else
+static inline const char *nlmdbg_cookie2a(const struct nlm_cookie *cookie)
+{
+ return "???";
+}
#endif
/*