Page MenuHomeFreeBSD

D41310.id125677.diff
No OneTemporary

D41310.id125677.diff

diff --git a/sys/dev/nvme/nvme_qpair.c b/sys/dev/nvme/nvme_qpair.c
--- a/sys/dev/nvme/nvme_qpair.c
+++ b/sys/dev/nvme/nvme_qpair.c
@@ -99,12 +99,8 @@
};
static const char *
-get_admin_opcode_string(uint16_t opc)
+get_opcode_string(struct nvme_opcode_string *entry, uint16_t opc)
{
- struct nvme_opcode_string *entry;
-
- entry = admin_opcode;
-
while (entry->opc != 0xFFFF) {
if (entry->opc == opc)
return (entry->str);
@@ -114,18 +110,15 @@
}
static const char *
-get_io_opcode_string(uint16_t opc)
+get_admin_opcode_string(uint16_t opc)
{
- struct nvme_opcode_string *entry;
-
- entry = io_opcode;
+ return (get_opcode_string(admin_opcode, opc));
+}
- while (entry->opc != 0xFFFF) {
- if (entry->opc == opc)
- return (entry->str);
- entry++;
- }
- return (entry->str);
+static const char *
+get_io_opcode_string(uint16_t opc)
+{
+ return (get_opcode_string(io_opcode, opc));
}
static void

File Metadata

Mime Type
text/plain
Expires
Fri, Aug 7, 2:45 PM (6 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
36184237
Default Alt Text
D41310.id125677.diff (921 B)

Event Timeline