From 32734eb14c5cc3aa4ad576ba746830c73fb8eb54 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Tue, 1 Aug 2023 15:20:53 -0700 Subject: [PATCH] mmc_xpt: Remove dubious end of mmc_print_ident The end of this function finishes the passed in sbuf, calls printf manually on the contents, and then clears it. The caller then tries to print the resulting sbuf. This works currently but will not work for future callers that pass in an external sbuf to be appended to. Reviewed by: mav Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D41260 --- sys/cam/mmc/mmc_xpt.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sys/cam/mmc/mmc_xpt.c b/sys/cam/mmc/mmc_xpt.c index 30b1b7f867e..8fee7b4cad5 100644 --- a/sys/cam/mmc/mmc_xpt.c +++ b/sys/cam/mmc/mmc_xpt.c @@ -466,10 +466,6 @@ mmc_print_ident(struct mmc_params *ident_data, struct sbuf *sb) sbuf_printf(sb, "Number of functions: %u\n", ident_data->sdio_func_count); } - - sbuf_finish(sb); - printf("%s", sbuf_data(sb)); - sbuf_clear(sb); } static void