print.c: Dedup 'test_state_to_text()' logic

Change-Id: I72164323d7ff98fc50cb0c47b69741a4f047e098
Signed-off-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/36905
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
diff --git a/print.c b/print.c
index 6a7ff5d..596fc53 100644
--- a/print.c
+++ b/print.c
@@ -401,14 +401,7 @@
 		for (i = 0; i < maxboardlen - strlen(b->name); i++)
 			msg_ginfo(" ");
 
-		switch (b->working) {
-		case OK:  msg_ginfo("OK      "); break;
-		case NT:  msg_ginfo("NT      "); break;
-		case DEP: msg_ginfo("DEP     "); break;
-		case NA:  msg_ginfo("N/A     "); break;
-		case BAD:
-		default:  msg_ginfo("BAD     "); break;
-		}
+		msg_pinfo(test_state_to_text(b->working));
 
 		for (e = board_matches; e->vendor_name != NULL; e++) {
 			if (strcmp(e->vendor_name, b->vendor)