summaryrefslogtreecommitdiff
path: root/fs/bcachefs/util.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2022-02-20 04:52:44 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:09:24 -0400
commitd4b691522c4b60220087a01c276f3fa9781405b0 (patch)
tree9d0f71f559183ce1f2f3c025d365152020b5856d /fs/bcachefs/util.c
parent3117db99f30b26ebf09ecc323cbefcd51d83467b (diff)
bcachefs: Kill bch_scnmemcpy()
bch_scnmemcpy was for printing length-limited strings that might not have a terminating null - turns out sprintf & pr_buf can do this with %.*s. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/util.c')
-rw-r--r--fs/bcachefs/util.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/fs/bcachefs/util.c b/fs/bcachefs/util.c
index e7675b4597db..971f404a01e3 100644
--- a/fs/bcachefs/util.c
+++ b/fs/bcachefs/util.c
@@ -581,19 +581,6 @@ void memcpy_from_bio(void *dst, struct bio *src, struct bvec_iter src_iter)
}
}
-void bch_scnmemcpy(struct printbuf *out,
- const char *src, size_t len)
-{
- size_t n = printbuf_remaining(out);
-
- if (n) {
- n = min(n - 1, len);
- memcpy(out->pos, src, n);
- out->pos += n;
- *out->pos = '\0';
- }
-}
-
#include "eytzinger.h"
static int alignment_ok(const void *base, size_t align)