Merge tag 'vfs-6.7.misc' of gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs
[linux-block.git] / tools / testing / selftests / kvm / memslot_perf_test.c
index 20eb2e730800e3a7075bc2af258ba0fafc8c9e5e..8698d1ab60d00f72399571b62b49314f3a8c401f 100644 (file)
@@ -1033,9 +1033,8 @@ static bool test_loop(const struct test_data *data,
                      struct test_result *rbestruntime)
 {
        uint64_t maxslots;
-       struct test_result result;
+       struct test_result result = {};
 
-       result.nloops = 0;
        if (!test_execute(targs->nslots, &maxslots, targs->seconds, data,
                          &result.nloops,
                          &result.slot_runtime, &result.guest_runtime)) {
@@ -1089,7 +1088,7 @@ int main(int argc, char *argv[])
                .seconds = 5,
                .runs = 1,
        };
-       struct test_result rbestslottime;
+       struct test_result rbestslottime = {};
        int tctr;
 
        if (!check_memory_sizes())
@@ -1098,11 +1097,10 @@ int main(int argc, char *argv[])
        if (!parse_args(argc, argv, &targs))
                return -1;
 
-       rbestslottime.slottimens = 0;
        for (tctr = targs.tfirst; tctr <= targs.tlast; tctr++) {
                const struct test_data *data = &tests[tctr];
                unsigned int runctr;
-               struct test_result rbestruntime;
+               struct test_result rbestruntime = {};
 
                if (tctr > targs.tfirst)
                        pr_info("\n");
@@ -1110,7 +1108,6 @@ int main(int argc, char *argv[])
                pr_info("Testing %s performance with %i runs, %d seconds each\n",
                        data->name, targs.runs, targs.seconds);
 
-               rbestruntime.runtimens = 0;
                for (runctr = 0; runctr < targs.runs; runctr++)
                        if (!test_loop(data, &targs,
                                       &rbestslottime, &rbestruntime))