{"id":814040,"url":"http://patchwork.ozlabs.org/api/1.2/patches/814040/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20170915035130.8354-4-david@gibson.dropbear.id.au/","project":{"id":14,"url":"http://patchwork.ozlabs.org/api/1.2/projects/14/?format=json","name":"QEMU Development","link_name":"qemu-devel","list_id":"qemu-devel.nongnu.org","list_email":"qemu-devel@nongnu.org","web_url":"","scm_url":"","webscm_url":"","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20170915035130.8354-4-david@gibson.dropbear.id.au>","list_archive_url":null,"date":"2017-09-15T03:51:15","name":"[PULL,03/18] spapr_pci: drop useless check in spapr_phb_vfio_get_loc_code()","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"04a8fd499950a3614c6047d0c733246752994b61","submitter":{"id":47,"url":"http://patchwork.ozlabs.org/api/1.2/people/47/?format=json","name":"David Gibson","email":"david@gibson.dropbear.id.au"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20170915035130.8354-4-david@gibson.dropbear.id.au/mbox/","series":[{"id":3202,"url":"http://patchwork.ozlabs.org/api/1.2/series/3202/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/list/?series=3202","date":"2017-09-15T03:51:15","name":null,"version":1,"mbox":"http://patchwork.ozlabs.org/series/3202/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/814040/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/814040/checks/","tags":{},"related":[],"headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=gibson.dropbear.id.au\n\theader.i=@gibson.dropbear.id.au header.b=\"Urwa61AZ\"; \n\tdkim-atps=neutral"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xthLX4BpKz9t2Z\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 15 Sep 2017 13:52:36 +1000 (AEST)","from localhost ([::1]:50987 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dshgA-0006n2-KL\n\tfor incoming@patchwork.ozlabs.org; Thu, 14 Sep 2017 23:52:34 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:54042)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <dgibson@ozlabs.org>) id 1dshfH-0006SD-Qj\n\tfor qemu-devel@nongnu.org; Thu, 14 Sep 2017 23:51:41 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <dgibson@ozlabs.org>) id 1dshfH-0003Jx-1K\n\tfor qemu-devel@nongnu.org; Thu, 14 Sep 2017 23:51:39 -0400","from ozlabs.org ([2401:3900:2:1::2]:60781)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <dgibson@ozlabs.org>)\n\tid 1dshfG-0003FW-J9; Thu, 14 Sep 2017 23:51:38 -0400","by ozlabs.org (Postfix, from userid 1007)\n\tid 3xthKL1xHyz9t2h; Fri, 15 Sep 2017 13:51:33 +1000 (AEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple;\n\td=gibson.dropbear.id.au; s=201602; t=1505447494;\n\tbh=Gy88A2d3QJadTuQQKIamGC1sUPsVANIAFjl8IzmlTRI=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=Urwa61AZy/9LNk0PbnSOkrHQs0LFFbg6P3aTfRemRV6wQAVtxDB4hxSR1281nEDzN\n\t4y+IFw37JLMs4t4kJrZr6GVPNGdDg/9JII+BLGovhVDPjzYKh2kgTEwncox8V8/otR\n\tgTrsZNYxGr8+422a6YN+G/YMqykjYAy9Y1wEHcTc=","From":"David Gibson <david@gibson.dropbear.id.au>","To":"peter.maydell@linaro.org","Date":"Fri, 15 Sep 2017 13:51:15 +1000","Message-Id":"<20170915035130.8354-4-david@gibson.dropbear.id.au>","X-Mailer":"git-send-email 2.13.5","In-Reply-To":"<20170915035130.8354-1-david@gibson.dropbear.id.au>","References":"<20170915035130.8354-1-david@gibson.dropbear.id.au>","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"quoted-printable","X-detected-operating-system":"by eggs.gnu.org: Genre and OS details not\n\trecognized.","X-Received-From":"2401:3900:2:1::2","Subject":"[Qemu-devel] [PULL 03/18] spapr_pci: drop useless check in\n\tspapr_phb_vfio_get_loc_code()","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"qemu-devel@nongnu.org, aik@ozlabs.ru, gkurz@kaod.org,\n\tGreg Kurz <groug@kaod.org>, agraf@suse.de, qemu-ppc@nongnu.org,\n\tDavid Gibson <david@gibson.dropbear.id.au>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"},"content":"From: Greg Kurz <groug@kaod.org>\n\ng_strdup_printf() either returns a non-null pointer, or aborts if it\nfailed to allocate memory.\n\nSigned-off-by: Greg Kurz <groug@kaod.org>\n[dwg: Grammatical fix to commit message]\nAcked-by: Philippe Mathieu-Daudé <f4bug@amsat.org>\nSigned-off-by: David Gibson <david@gibson.dropbear.id.au>\n---\n hw/ppc/spapr_pci.c | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)","diff":"diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c\nindex d7880f257a..ef982f2ef3 100644\n--- a/hw/ppc/spapr_pci.c\n+++ b/hw/ppc/spapr_pci.c\n@@ -766,7 +766,7 @@ static char *spapr_phb_vfio_get_loc_code(sPAPRPHBState *sphb,  PCIDevice *pdev)\n     /* Construct the path of the file that will give us the DT location */\n     path = g_strdup_printf(\"/sys/bus/pci/devices/%s/devspec\", host);\n     g_free(host);\n-    if (!path || !g_file_get_contents(path, &buf, NULL, NULL)) {\n+    if (!g_file_get_contents(path, &buf, NULL, NULL)) {\n         goto err_out;\n     }\n     g_free(path);\n@@ -774,7 +774,7 @@ static char *spapr_phb_vfio_get_loc_code(sPAPRPHBState *sphb,  PCIDevice *pdev)\n     /* Construct and read from host device tree the loc-code */\n     path = g_strdup_printf(\"/proc/device-tree%s/ibm,loc-code\", buf);\n     g_free(buf);\n-    if (!path || !g_file_get_contents(path, &buf, NULL, NULL)) {\n+    if (!g_file_get_contents(path, &buf, NULL, NULL)) {\n         goto err_out;\n     }\n     return buf;\n","prefixes":["PULL","03/18"]}