ソースを参照

msm: ipa: Add default cases for gsi and ipa hw version

Add default cases to avoid compilation error for unsupported
or new hw version

Change-Id: I37d8c753225a71ef6f1f28261e5938e40435fe50
Signed-off-by: Armaan Siddiqui <[email protected]>
Armaan Siddiqui 4 年 前
コミット
85c85ac455

+ 6 - 0
drivers/platform/msm/gsi/gsi.c

@@ -886,6 +886,9 @@ static uint32_t gsi_get_max_channels(enum gsi_ver ver)
 			GSI_V2_9_EE_n_GSI_HW_PARAM_2_GSI_NUM_CH_PER_EE_BMSK) >>
 			GSI_V2_9_EE_n_GSI_HW_PARAM_2_GSI_NUM_CH_PER_EE_SHFT;
 		break;
+	default:
+		GSIERR("GSI version is not supported %d\n", ver);
+		break;
 	}
 
 	GSIDBG("max channels %d\n", reg);
@@ -957,6 +960,9 @@ static uint32_t gsi_get_max_event_rings(enum gsi_ver ver)
 			GSI_V2_9_EE_n_GSI_HW_PARAM_2_GSI_NUM_EV_PER_EE_BMSK) >>
 			GSI_V2_9_EE_n_GSI_HW_PARAM_2_GSI_NUM_EV_PER_EE_SHFT;
 		break;
+	default:
+		GSIERR("GSI version is not supported %d\n", ver);
+		break;
 	}
 
 	GSIDBG("max event rings %d\n", reg);

+ 1 - 0
drivers/platform/msm/ipa/ipa_v3/ipa_utils.c

@@ -5934,6 +5934,7 @@ int ipa3_init_mem_partition(enum ipa_hw_type type)
 	case IPA_HW_v3_5:
 	case IPA_HW_v3_5_1:
 	case IPA_HW_v4_0:
+	default:
 		IPAERR("unsupported version %d\n", type);
 		return -EPERM;
 	}