The branch stable/14 has been updated by markj:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=d73f9fc2641eeff30a904d5901c926cec3e3ef5c

commit d73f9fc2641eeff30a904d5901c926cec3e3ef5c
Author:     Mark Johnston <[email protected]>
AuthorDate: 2024-02-04 23:55:00 +0000
Commit:     Mark Johnston <[email protected]>
CommitDate: 2024-06-09 13:37:58 +0000

    uart: Use device_set_descf()
    
    No functional change intended.
    
    MFC after:      1 week
    
    (cherry picked from commit 66d2d42a1f26a6ef868d7d46f87d6fad0bc099aa)
---
 sys/dev/uart/uart_dev_quicc.c | 4 +---
 sys/dev/uart/uart_dev_z8530.c | 4 +---
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/sys/dev/uart/uart_dev_quicc.c b/sys/dev/uart/uart_dev_quicc.c
index bc9134d5c676..3481154f7da6 100644
--- a/sys/dev/uart/uart_dev_quicc.c
+++ b/sys/dev/uart/uart_dev_quicc.c
@@ -412,7 +412,6 @@ quicc_bus_param(struct uart_softc *sc, int baudrate, int 
databits,
 static int
 quicc_bus_probe(struct uart_softc *sc)
 {
-       char buf[80];
        int error;
 
        error = quicc_probe(&sc->sc_bas);
@@ -422,8 +421,7 @@ quicc_bus_probe(struct uart_softc *sc)
        sc->sc_rxfifosz = 1;
        sc->sc_txfifosz = 1;
 
-       snprintf(buf, sizeof(buf), "quicc, channel %d", sc->sc_bas.chan);
-       device_set_desc_copy(sc->sc_dev, buf);
+       device_set_descf(sc->sc_dev, "quicc, channel %d", sc->sc_bas.chan);
        return (0);
 }
 
diff --git a/sys/dev/uart/uart_dev_z8530.c b/sys/dev/uart/uart_dev_z8530.c
index 53d70b5f42a5..a2f4580d2b5b 100644
--- a/sys/dev/uart/uart_dev_z8530.c
+++ b/sys/dev/uart/uart_dev_z8530.c
@@ -509,7 +509,6 @@ z8530_bus_param(struct uart_softc *sc, int baudrate, int 
databits,
 static int
 z8530_bus_probe(struct uart_softc *sc)
 {
-       char buf[80];
        int error;
        char ch;
 
@@ -522,8 +521,7 @@ z8530_bus_probe(struct uart_softc *sc)
 
        ch = sc->sc_bas.chan - 1 + 'A';
 
-       snprintf(buf, sizeof(buf), "z8530, channel %c", ch);
-       device_set_desc_copy(sc->sc_dev, buf);
+       device_set_descf(sc->sc_dev, "z8530, channel %c", ch);
        return (0);
 }
 

Reply via email to