diff options
| author | Jeff Layton <jlayton@kernel.org> | 2025-06-18 10:24:16 -0400 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2025-06-19 17:02:03 -0700 |
| commit | 49c94af071fc6c9f5e1db52b3031dec28daa90c3 (patch) | |
| tree | 49cf6bcec90a520283a10ddb3acc451aba4a24f0 /include/linux | |
| parent | e209f9193a4724c1d4bc0b155c7beb78aa5d2928 (diff) | |
ref_tracker: have callers pass output function to pr_ostream()
In a later patch, we'll be adding a 3rd mechanism for outputting
ref_tracker info via seq_file. Instead of a conditional, have the caller
set a pointer to an output function in struct ostream. As part of this,
the log prefix must be explicitly passed in, as it's too late for the
pr_fmt macro.
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Link: https://patch.msgid.link/20250618-reftrack-dbgfs-v15-3-24fc37ead144@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/ref_tracker.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/ref_tracker.h b/include/linux/ref_tracker.h index 8eac4f3d5254..a0a1ee43724f 100644 --- a/include/linux/ref_tracker.h +++ b/include/linux/ref_tracker.h @@ -6,6 +6,8 @@ #include <linux/spinlock.h> #include <linux/stackdepot.h> +#define __ostream_printf __printf(2, 3) + struct ref_tracker; struct ref_tracker_dir { |
