guest_snprintf() is a varargs wrapper around guest_vsnprintf() that nothing calls. Its declaration in test_util.h and its definition in lib/guest_sprintf.c are the only two mentions anywhere under tools/testing/selftests.
The rest of the family is alive: guest_vsnprintf() does the work and ucall_common.c calls it, so this deletes the wrapper and nothing else. No functional change intended. Signed-off-by: Gokul K <[email protected]> --- tools/testing/selftests/kvm/include/test_util.h | 1 - tools/testing/selftests/kvm/lib/guest_sprintf.c | 12 ------------ 2 files changed, 13 deletions(-) diff --git a/tools/testing/selftests/kvm/include/test_util.h b/tools/testing/selftests/kvm/include/test_util.h index a6a3e1657895..fbdf0e0c15d1 100644 --- a/tools/testing/selftests/kvm/include/test_util.h +++ b/tools/testing/selftests/kvm/include/test_util.h @@ -238,7 +238,6 @@ static inline u32 atoi_non_negative(const char *name, const char *num_str) } int guest_vsnprintf(char *buf, int n, const char *fmt, va_list args); -__printf(3, 4) int guest_snprintf(char *buf, int n, const char *fmt, ...); char *strdup_printf(const char *fmt, ...) __attribute__((format(printf, 1, 2), nonnull(1))); diff --git a/tools/testing/selftests/kvm/lib/guest_sprintf.c b/tools/testing/selftests/kvm/lib/guest_sprintf.c index 7a33965349a7..6caebb456f3d 100644 --- a/tools/testing/selftests/kvm/lib/guest_sprintf.c +++ b/tools/testing/selftests/kvm/lib/guest_sprintf.c @@ -300,15 +300,3 @@ int guest_vsnprintf(char *buf, int n, const char *fmt, va_list args) *str = '\0'; return str - buf; } - -int guest_snprintf(char *buf, int n, const char *fmt, ...) -{ - va_list va; - int len; - - va_start(va, fmt); - len = guest_vsnprintf(buf, n, fmt, va); - va_end(va); - - return len; -} -- 2.54.0

