git: 32734eb14c5c - main - mmc_xpt: Remove dubious end of mmc_print_ident
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 01 Aug 2023 22:26:08 UTC
The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=32734eb14c5cc3aa4ad576ba746830c73fb8eb54 commit 32734eb14c5cc3aa4ad576ba746830c73fb8eb54 Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2023-08-01 22:20:53 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2023-08-01 22:20:53 +0000 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 30b1b7f867e7..8fee7b4cad58 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