[Devel] [PATCH VZ9 12/20] fuse: minor, teach gcc to check for trace format validity

Alexey Kuznetsov kuznet at virtuozzo.com
Fri Oct 6 13:43:29 MSK 2023


Signed-off-by: Alexey Kuznetsov <kuznet at acronis.com>
---
 fs/fuse/kio/pcs/fuse_ktrace.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/fuse/kio/pcs/fuse_ktrace.h b/fs/fuse/kio/pcs/fuse_ktrace.h
index 7234234..2f3622a 100644
--- a/fs/fuse/kio/pcs/fuse_ktrace.h
+++ b/fs/fuse/kio/pcs/fuse_ktrace.h
@@ -60,7 +60,7 @@ static inline void * fuse_trace_prepare(struct fuse_ktrace * tr, int type, int l
 #define FUSE_TRACE_PREPARE(tr, type, len) fuse_trace_prepare((tr), (type), (len))
 #define FUSE_TRACE_COMMIT(tr)       preempt_enable()
 
-void __kfuse_trace(struct fuse_conn * fc, unsigned long ip, const char * fmt, ...);
+void __printf(3, 4) __kfuse_trace(struct fuse_conn * fc, unsigned long ip, const char * fmt, ...);
 
 #define FUSE_KTRACE(fc, fmt, args...) do { struct fuse_conn * __fc = (fc); if (__fc->ktrace_level >= LOG_TRACE) __kfuse_trace(__fc, _THIS_IP_, "%s: " fmt, __FUNCTION__, ## args); } while (0)
 #define FUSE_KDTRACE(fc, fmt, args...) do { struct fuse_conn * __fc = (fc); if (__fc->ktrace_level >= LOG_DTRACE) __kfuse_trace(__fc, _THIS_IP_, "%s: " fmt, __FUNCTION__, ## args); } while (0)
-- 
1.8.3.1



More information about the Devel mailing list