Skip to contentSkip to conversation

sfpid: fix redundant print of Active Cu cmplnce.

PATCH New Jakub Ramaseuski 1 participant 1 message Mar 24

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sfpid: fix redundant print of Active Cu cmplnce.

When ethtool -m is run on a module with an SFP active optical cable, a redundant printf statement is being called before
the sff_print_any_hex_field is executed, causing multiple "Active Cu cmplnce." labels to be printed to stdout.

Remove the excess printf statement from the sff8079_show_wavelength_or_copper_compliance function.

---
 sfpid.c | 1 -
 1 file changed, 1 deletion(-)
sfpid.c +0 -1
index 9d09256..228b3ee 100644
@@ -362,7 +362,6 @@ static void sff8079_show_wavelength_or_copper_compliance(const __u8 *id)
 					"passive_cu_cmplnce.",
 					id[60], description);
 	} else if (id[8] & (1 << 3)) {
-		printf("\t%-41s : 0x%02x", "Active Cu cmplnce.", id[60]);
 		switch (id[60]) {
 		case 0x00:
 			strncpy(description, "unspecified",
Signature · 1 line
2.51.0