Add a default case in the switch, instead of the last unhandled value,
FAMILY_CONFIGURE. This solves the case when in the future other families
are not handled--they'll all fall into the default case.

Also, in the diagnostic print, print the value of the unhandled
enumeration--this could help debug easily, as opposed to having to
reproduce the issue locally.

Cc: Alex Deucher <alexander.deuc...@amd.com>
Cc: Tom StDenis <tom.stde...@amd.com>
Signed-off-by: Luben Tuikov <luben.tui...@amd.com>
Reviewed-by: Tom StDenis <tom.stde...@amd.com>
---
 src/lib/ih_decode_vectors.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/ih_decode_vectors.c b/src/lib/ih_decode_vectors.c
index ed5705059c542f..f2057df825f5c0 100644
--- a/src/lib/ih_decode_vectors.c
+++ b/src/lib/ih_decode_vectors.c
@@ -77,11 +77,11 @@ int umr_ih_decode_vectors(struct umr_asic *asic, struct 
umr_ih_decode_ui *ui, ui
                }
                return off / 8;
 
-       case FAMILY_CONFIGURE:
        case FAMILY_SI:
        case FAMILY_CIK:
        case FAMILY_NPI:
-               asic->err_msg("[BUG]: unhandled family case in 
umr_ih_decode_vectors()\n");
+       default:
+               asic->err_msg("[BUG]: unhandled family case:%d in 
umr_ih_decode_vectors()\n", asic->family);
                return -1;
        }
        return 0;
-- 
2.35.1.291.gdab1b7905d

Reply via email to