]> git.droids-corp.org - dpdk.git/commitdiff
bus/fslmc: remove unused device count
authorConor Walsh <conor.walsh@intel.com>
Mon, 15 Nov 2021 17:58:51 +0000 (17:58 +0000)
committerDavid Marchand <david.marchand@redhat.com>
Tue, 16 Nov 2021 12:01:52 +0000 (13:01 +0100)
Reported by clang 13.
This patch removes the device_count variable from the rte_fslmc_scan
function within the fslmc bus driver as it is an unused but set variable.

Bugzilla ID: 881
Fixes: 828d51d8fc3e ("bus/fslmc: refactor scan and probe functions")
Cc: stable@dpdk.org
Reported-by: Liang Longfeng <longfengx.liang@intel.com>
Signed-off-by: Conor Walsh <conor.walsh@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
drivers/bus/fslmc/fslmc_bus.c

index ac3cb4aa5a6ee752c5441567eb3594d66c29674b..a0ef24cdc8f3a066987cac145e0f79097a06bc18 100644 (file)
@@ -315,7 +315,6 @@ static int
 rte_fslmc_scan(void)
 {
        int ret;
-       int device_count = 0;
        char fslmc_dirpath[PATH_MAX];
        DIR *dir;
        struct dirent *entry;
@@ -349,7 +348,6 @@ rte_fslmc_scan(void)
                        /* Error in parsing directory - exit gracefully */
                        goto scan_fail_cleanup;
                }
-               device_count += 1;
        }
 
        closedir(dir);