diff for duplicates of <1475542106.2034.7.camel@gmail.com> diff --git a/a/1.txt b/N1/1.txt index 811fed9..2c9242a 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -41,9 +41,10 @@ Comments below > + return; > + /* Sanity check for the property layout (first two bytes are > header) */ -> + assert(plen >= 8 && prop->data[1] = 0 && prop->data[0] <> plen - 2); +> + assert(plen >= 8 && prop->data[1] == 0 && prop->data[0] <= +> plen - 2); Just curious as to why you're checking "prop->data[0] *<=* plen - 2" as -isn't anything other than prop->data[0] *=* plen - 2 an error in the +isn't anything other than prop->data[0] *==* plen - 2 an error in the structure of ibm,pa-features and thus an error in the device-tree? > + > + /* @@ -59,7 +60,7 @@ structure of ibm,pa-features and thus an error in the device-tree? > 0x80) != 0) With the sanity checking you performed before isn't it sufficient to check "prop->data[0] >= 24" as this guarantees that "plen >= 26". If -you were to change the above to "prop->data[0] = plen - 2" then either +you were to change the above to "prop->data[0] == plen - 2" then either one of the two checks could be kept as sufficient to ensure the other. > + *(int *)ptr += 1; > +} @@ -72,7 +73,7 @@ one of the two checks could be kept as sufficient to ensure the other. > + > + ret = dt_for_each_cpu_node(cpu_has_tm, &available); > + -> + return ret = 0 && available = nr_cpus; +> + return ret == 0 && available == nr_cpus; > +} > > static int h_cede(void) @@ -93,6 +94,6 @@ one of the two checks could be kept as sufficient to ensure the other. > + if (!has_tm) > + return report_summary(); > + -> all = argc = 1 || !strcmp(argv[1], "all"); +> all = argc == 1 || !strcmp(argv[1], "all"); > > for (i = 0; hctests[i].name != NULL; i++) { diff --git a/a/content_digest b/N1/content_digest index 76ceec3..76ea676 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,7 +1,7 @@ "ref\01475229293-11605-1-git-send-email-thuth@redhat.com\0" "From\0Suraj Jitindar Singh <sjitindarsingh@gmail.com>\0" "Subject\0Re: [kvm-unit-tests PATCH v2] powerpc: Check whether TM is available before running other tests\0" - "Date\0Tue, 04 Oct 2016 00:48:26 +0000\0" + "Date\0Tue, 04 Oct 2016 11:48:26 +1100\0" "To\0Thomas Huth <thuth@redhat.com>" " kvm@vger.kernel.org\0" "Cc\0Radim Kr\304\215m\303\241\305\231 <rkrcmar@redhat.com>" @@ -53,9 +53,10 @@ "> +\t\treturn;\n" "> +\t/* Sanity check for the property layout (first two bytes are\n" "> header) */\n" - "> +\tassert(plen >= 8 && prop->data[1] = 0 && prop->data[0] <> plen - 2);\n" + "> +\tassert(plen >= 8 && prop->data[1] == 0 && prop->data[0] <=\n" + "> plen - 2);\n" "Just curious as to why you're checking \"prop->data[0] *<=* plen - 2\" as\n" - "isn't anything other than prop->data[0] *=* plen - 2 an error in the\n" + "isn't anything other than prop->data[0] *==* plen - 2 an error in the\n" "structure of ibm,pa-features and thus an error in the device-tree?\n" "> +\n" "> +\t/*\n" @@ -71,7 +72,7 @@ "> 0x80) != 0)\n" "With the sanity checking you performed before isn't it sufficient to\n" "check \"prop->data[0] >= 24\" as this guarantees that \"plen >= 26\". If\n" - "you were to change the above to \"prop->data[0] = plen - 2\" then either\n" + "you were to change the above to \"prop->data[0] == plen - 2\" then either\n" "one of the two checks could be kept as sufficient to ensure the other.\n" "> +\t\t*(int *)ptr += 1;\n" "> +}\n" @@ -84,7 +85,7 @@ "> +\n" "> +\tret = dt_for_each_cpu_node(cpu_has_tm, &available);\n" "> +\n" - "> +\treturn ret = 0 && available = nr_cpus;\n" + "> +\treturn ret == 0 && available == nr_cpus;\n" "> +}\n" "> \302\240\n" "> \302\240static int h_cede(void)\n" @@ -105,8 +106,8 @@ "> +\tif (!has_tm)\n" "> +\t\treturn report_summary();\n" "> +\n" - "> \302\240\tall = argc = 1 || !strcmp(argv[1], \"all\");\n" + "> \302\240\tall = argc == 1 || !strcmp(argv[1], \"all\");\n" "> \302\240\n" "> \302\240\tfor (i = 0; hctests[i].name != NULL; i++) {" -7a7b29c594bf13da9c35f9dd514f726ec034906831779762aa23ca00afb93768 +45bb62eff0a1e2d9487bd3d9c7ace08efe73a328eafa9ee1f02687a4da6225f0
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.