Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Aug 2023 22:26:08 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 32734eb14c5c - main - mmc_xpt: Remove dubious end of mmc_print_ident
Message-ID:  <202308012226.371MQ8oa045584@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202308012226.371MQ8oa045584>