Prevent false positives in bch2_varint_decode_fast()
Signed-off-by: Brett Holman <bholman.devel@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
#include <linux/string.h>
#include <asm/unaligned.h>
+#ifdef CONFIG_VALGRIND
+#include <valgrind/memcheck.h>
+#endif
+
#include "varint.h"
/**
*/
int bch2_varint_decode_fast(const u8 *in, const u8 *end, u64 *out)
{
+#ifdef CONFIG_VALGRIND
+ VALGRIND_MAKE_MEM_DEFINED(in, 8);
+#endif
u64 v = get_unaligned_le64(in);
unsigned bytes = ffz(*in) + 1;