projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a0f7437
)
bcachefs: CLASS(printbuf)
author
Kent Overstreet
<kent.overstreet@linux.dev>
Sun, 25 May 2025 06:59:35 +0000
(
02:59
-0400)
committer
Kent Overstreet
<kent.overstreet@linux.dev>
Sun, 1 Jun 2025 02:03:17 +0000
(22:03 -0400)
Add a DEFINE_CLASS() for printbufs.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/printbuf.h
patch
|
blob
|
history
diff --git
a/fs/bcachefs/printbuf.h
b/fs/bcachefs/printbuf.h
index
1ca476a
..
8f4e28d
100644
(file)
--- a/
fs/bcachefs/printbuf.h
+++ b/
fs/bcachefs/printbuf.h
@@
-140,6
+140,14
@@
void bch2_prt_bitflags_vector(struct printbuf *, const char * const[],
.size = _size, \
})
+static inline struct printbuf bch2_printbuf_init(void)
+{
+ return PRINTBUF;
+}
+
+DEFINE_CLASS(printbuf, struct printbuf,
+ bch2_printbuf_exit(&_T), bch2_printbuf_init(), void)
+
/*
* Returns size remaining of output buffer:
*/