net/liquidio: Delete non-working LIQUIDIO_PACKAGE check
authorLeon Romanovsky <leonro@mellanox.com>
Sun, 1 Mar 2020 14:44:38 +0000 (16:44 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 4 Mar 2020 01:54:54 +0000 (17:54 -0800)
Size of LIQUIDIO_PACKAGE is 0 and it means that checks of package
version never worked, delete dead code.

Fixes: 3258124534f6 ("liquidio: Consolidate common functionality")
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cavium/liquidio/liquidio_common.h
drivers/net/ethernet/cavium/liquidio/octeon_console.c

index 2d61790c2e51ca15a864a2c6ba0231dec2a4486a..4da90757cd3f13166ece47415762f8b5f19652b0 100644 (file)
@@ -25,7 +25,6 @@
 
 #include "octeon_config.h"
 
-#define LIQUIDIO_PACKAGE ""
 #define LIQUIDIO_BASE_MAJOR_VERSION 1
 #define LIQUIDIO_BASE_MINOR_VERSION 7
 #define LIQUIDIO_BASE_MICRO_VERSION 2
index d0d581e98734ce3639039867b58e6813e9c6266d..0d2831d10f6595fbc4f37e176713ec09c9c79748 100644 (file)
@@ -840,17 +840,11 @@ int octeon_download_firmware(struct octeon_device *oct, const u8 *data,
                return -EINVAL;
        }
 
-       if (strncmp(LIQUIDIO_PACKAGE, h->version, strlen(LIQUIDIO_PACKAGE))) {
-               dev_err(&oct->pci_dev->dev, "Unmatched firmware package type. Expected %s, got %s.\n",
-                       LIQUIDIO_PACKAGE, h->version);
-               return -EINVAL;
-       }
-
-       if (memcmp(LIQUIDIO_BASE_VERSION, h->version + strlen(LIQUIDIO_PACKAGE),
+       if (memcmp(LIQUIDIO_BASE_VERSION, h->version,
                   strlen(LIQUIDIO_BASE_VERSION))) {
                dev_err(&oct->pci_dev->dev, "Unmatched firmware version. Expected %s.x, got %s.\n",
                        LIQUIDIO_BASE_VERSION,
-                       h->version + strlen(LIQUIDIO_PACKAGE));
+                       h->version);
                return -EINVAL;
        }