biosdevname/biosdevname-delete-unused-function.diff

51 lines
1.2 KiB
Diff

From: Bernhard Walle <bwalle@suse.de>
Subject: [PATCH] Delete unused function onboard_device_type()
References: bnc#433795
This patch deletes the unused function onboard_device_type(). That fixes
the compiler warning:
src/dmidecode/dmidecode.c:139: \
warning: no return statement in function returning non-void
Signed-off-by: Bernhard Walle <bwalle@suse.de>
---
src/dmidecode/dmidecode.c | 25 -------------------------
1 file changed, 25 deletions(-)
--- a/src/dmidecode/dmidecode.c
+++ b/src/dmidecode/dmidecode.c
@@ -113,31 +113,6 @@ static void dmi_slot_segment_bus_func(u1
}
}
-static u8 onboard_device_type(u8 code, const char *prefix)
-{
- /* 3.3.x.2 */
- u8 e = (code & 0x80)>>7;
- static const char *type[]={
- "Other", /* 1 */
- "Unknown",
- "Video",
- "SCSI Controller",
- "Ethernet",
- "Token Ring",
- "Sound",
- "PATA Controller",
- "SATA Controller",
- "SAS Controller" /* 0x0A */
- };
- code = code & 0x7F;
- if(code>=0x01 && code<=0x0A) {
- printf("%sStatus: %s\n", prefix, e?"Enabled":"Disabled");
- printf("%sDevice Type: %s\n", prefix, type[code-0x01]);
- }
- else
- printf("%sDevice Type: %s\n", prefix, out_of_spec);
-}
-
/*
* Main
*/