mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
gpu: nvgpu: add format specifiers for debug output
Add compiler attribute to gk20a_debug_output to type check the printf style arguments against the format string. Jira NVGPU-886 Change-Id: Ib0c36826bf0a05211c873dc54ad9177319354b65 Signed-off-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1929865 Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com> Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
439d3eb74f
commit
61fb57fb9c
@@ -39,6 +39,7 @@ struct gk20a_debug_output {
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
extern unsigned int gk20a_debug_trace_cmdbuf;
|
||||
|
||||
__attribute__((format (printf, 2, 3)))
|
||||
void gk20a_debug_output(struct gk20a_debug_output *o,
|
||||
const char *fmt, ...);
|
||||
|
||||
@@ -50,6 +51,7 @@ void gk20a_init_debug_ops(struct gpu_ops *gops);
|
||||
void gk20a_debug_init(struct gk20a *g, const char *debugfs_symlink);
|
||||
void gk20a_debug_deinit(struct gk20a *g);
|
||||
#else
|
||||
__attribute__((format (printf, 2, 3)))
|
||||
static inline void gk20a_debug_output(struct gk20a_debug_output *o,
|
||||
const char *fmt, ...) {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user