The branch main has been updated by markj:

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

commit a3b460d499a995eaf5a79d1b84e22b0d4eda8f2a
Author:     Mark Johnston <ma...@freebsd.org>
AuthorDate: 2024-02-04 23:53:28 +0000
Commit:     Mark Johnston <ma...@freebsd.org>
CommitDate: 2024-06-02 23:38:41 +0000

    mvs: Use device_set_desc(f)()
    
    No functional change intended.
    
    MFC after:      1 week
---
 sys/dev/mvs/mvs.c     | 2 +-
 sys/dev/mvs/mvs_pci.c | 4 +---
 sys/dev/mvs/mvs_soc.c | 4 +---
 3 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/sys/dev/mvs/mvs.c b/sys/dev/mvs/mvs.c
index a98a59259581..253fdc096475 100644
--- a/sys/dev/mvs/mvs.c
+++ b/sys/dev/mvs/mvs.c
@@ -105,7 +105,7 @@ static int
 mvs_ch_probe(device_t dev)
 {
 
-       device_set_desc_copy(dev, "Marvell SATA channel");
+       device_set_desc(dev, "Marvell SATA channel");
        return (BUS_PROBE_DEFAULT);
 }
 
diff --git a/sys/dev/mvs/mvs_pci.c b/sys/dev/mvs/mvs_pci.c
index be9351403a0d..1dfd43ae6b1e 100644
--- a/sys/dev/mvs/mvs_pci.c
+++ b/sys/dev/mvs/mvs_pci.c
@@ -77,7 +77,6 @@ static struct {
 static int
 mvs_probe(device_t dev)
 {
-       char buf[64];
        int i;
        uint32_t devid = pci_get_devid(dev);
        uint8_t revid = pci_get_revid(dev);
@@ -85,9 +84,8 @@ mvs_probe(device_t dev)
        for (i = 0; mvs_ids[i].id != 0; i++) {
                if (mvs_ids[i].id == devid &&
                    mvs_ids[i].rev <= revid) {
-                       snprintf(buf, sizeof(buf), "%s SATA controller",
+                       device_set_descf(dev, "%s SATA controller",
                            mvs_ids[i].name);
-                       device_set_desc_copy(dev, buf);
                        return (BUS_PROBE_DEFAULT);
                }
        }
diff --git a/sys/dev/mvs/mvs_soc.c b/sys/dev/mvs/mvs_soc.c
index 696b65d54359..00a868140a0e 100644
--- a/sys/dev/mvs/mvs_soc.c
+++ b/sys/dev/mvs/mvs_soc.c
@@ -74,7 +74,6 @@ static struct {
 static int
 mvs_probe(device_t dev)
 {
-       char buf[64];
        int i;
        uint32_t devid, revid;
 
@@ -88,9 +87,8 @@ mvs_probe(device_t dev)
        for (i = 0; mvs_ids[i].id != 0; i++) {
                if (mvs_ids[i].id == devid &&
                    mvs_ids[i].rev <= revid) {
-                       snprintf(buf, sizeof(buf), "%s SATA controller",
+                       device_set_descf(dev, "%s SATA controller",
                            mvs_ids[i].name);
-                       device_set_desc_copy(dev, buf);
                        return (BUS_PROBE_DEFAULT);
                }
        }

Reply via email to