net: ipa: kill ipa_version_supported()
authorAlex Elder <elder@linaro.org>
Fri, 19 Apr 2024 15:18:00 +0000 (10:18 -0500)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 23 Apr 2024 11:08:08 +0000 (13:08 +0200)
The only place ipa_version_supported() is called is in the probe
function.  The version comes from the match data.  Rather than
checking the version validity separately, just consider anything
that has match data to be supported.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ipa/ipa_main.c
drivers/net/ipa/ipa_version.h

index 6a0fec873cddf2e39154188e9f4d0f9c5d40c9d8..5f3dd5a2dcf46cb6734b04792ca164ff847cff07 100644 (file)
@@ -810,11 +810,6 @@ static int ipa_probe(struct platform_device *pdev)
                return -ENODEV;
        }
 
-       if (!ipa_version_supported(data->version)) {
-               dev_err(dev, "unsupported IPA version %u\n", data->version);
-               return -EINVAL;
-       }
-
        if (!data->modem_route_count) {
                dev_err(dev, "modem_route_count cannot be zero\n");
                return -EINVAL;
index 156388e90a1410c400a4422267c1bc759b6fe0ee..38c47f51a50c9f7643501b47bf49ed7f32eb8096 100644 (file)
@@ -47,24 +47,6 @@ enum ipa_version {
        IPA_VERSION_COUNT,                      /* Last; not a version */
 };
 
-static inline bool ipa_version_supported(enum ipa_version version)
-{
-       switch (version) {
-       case IPA_VERSION_3_1:
-       case IPA_VERSION_3_5_1:
-       case IPA_VERSION_4_2:
-       case IPA_VERSION_4_5:
-       case IPA_VERSION_4_7:
-       case IPA_VERSION_4_9:
-       case IPA_VERSION_4_11:
-       case IPA_VERSION_5_0:
-       case IPA_VERSION_5_5:
-               return true;
-       default:
-               return false;
-       }
-}
-
 /* Execution environment IDs */
 enum gsi_ee_id {
        GSI_EE_AP               = 0x0,