dmidecode/0037-dmioem-Drop-function-dmi_hp_203_pciinfo.patch
Lichen Liu 03b0d1462a
update to upstream fa268715
Resolves: RHEL-99252

Signed-off-by: Lichen Liu <lichliu@redhat.com>
2025-10-14 13:48:30 +08:00

52 lines
1.7 KiB
Diff

From 1dc0c678cb55a2df5b6c39184d4e589d39ae17f0 Mon Sep 17 00:00:00 2001
From: Jean Delvare <jdelvare@suse.de>
Date: Mon, 30 Jun 2025 14:36:16 +0200
Subject: [PATCH 37/45] dmioem: Drop function dmi_hp_203_pciinfo()
The presence of the device has already been tested before, so testing
it again for individual fields is redundant.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Reviewed-by: Jerry Hoemann <jerry.hoemann@hpe.com>
---
dmioem.c | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/dmioem.c b/dmioem.c
index dea752b..31efde6 100644
--- a/dmioem.c
+++ b/dmioem.c
@@ -359,14 +359,6 @@ static void dmi_hp_203_assoc_hndl(const char *fname, u16 num)
pr_attr(fname, "0x%04X", num);
}
-static void dmi_hp_203_pciinfo(const char *fname, u16 num)
-{
- if (num == 0xFFFF)
- pr_attr(fname, "Device Not Present");
- else
- pr_attr(fname, "0x%04x", num);
-}
-
static void dmi_hp_203_bayenc(const char *fname, u8 num)
{
switch (num)
@@ -1293,10 +1285,10 @@ static int dmi_decode_hp(const struct dmi_header *h)
}
else
{
- dmi_hp_203_pciinfo("PCI Vendor ID", WORD(data + 0x08));
- dmi_hp_203_pciinfo("PCI Device ID", WORD(data + 0x0A));
- dmi_hp_203_pciinfo("PCI Sub Vendor ID", WORD(data + 0x0C));
- dmi_hp_203_pciinfo("PCI Sub Device ID", WORD(data + 0x0E));
+ pr_attr("PCI Vendor ID", "0x%04x", WORD(data + 0x08));
+ pr_attr("PCI Device ID", "0x%04x", WORD(data + 0x0A));
+ pr_attr("PCI Sub Vendor ID", "0x%04x", WORD(data + 0x0C));
+ pr_attr("PCI Sub Device ID", "0x%04x", WORD(data + 0x0E));
pr_attr("PCI Class Code", "0x%02x", data[0x10]);
pr_attr("PCI Sub Class Code", "0x%02x", data[0x11]);
}
--
2.47.0