Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Jun 2024 14:12:12 GMT
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 990567788613 - stable/14 - mvs: Use device_set_desc(f)()
Message-ID:  <202406091412.459ECCM6085855@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by markj:

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

commit 990567788613657aae9beded28858e7acb3bee48
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2024-02-04 23:53:28 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-06-09 13:37:57 +0000

    mvs: Use device_set_desc(f)()
    
    No functional change intended.
    
    MFC after:      1 week
    
    (cherry picked from commit a3b460d499a995eaf5a79d1b84e22b0d4eda8f2a)
---
 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 250040898022..21e0984342d0 100644
--- a/sys/dev/mvs/mvs.c
+++ b/sys/dev/mvs/mvs.c
@@ -106,7 +106,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 9f4c835a9bce..5e5da6f35a7e 100644
--- a/sys/dev/mvs/mvs_pci.c
+++ b/sys/dev/mvs/mvs_pci.c
@@ -78,7 +78,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);
@@ -86,9 +85,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 849e1a012a53..5fccf36b5446 100644
--- a/sys/dev/mvs/mvs_soc.c
+++ b/sys/dev/mvs/mvs_soc.c
@@ -75,7 +75,6 @@ static struct {
 static int
 mvs_probe(device_t dev)
 {
-	char buf[64];
 	int i;
 	uint32_t devid, revid;
 
@@ -89,9 +88,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);
 		}
 	}



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