[{"id":1764486,"web_url":"http://patchwork.ozlabs.org/comment/1764486/","msgid":"<22c96c28-6dc2-25be-b3ae-60bcf23846dd@linux.vnet.ibm.com>","list_archive_url":null,"date":"2017-09-07T03:15:55","subject":"Re: [Qemu-devel] [PATCH v2 14/19] target/s390x: rename next_cpu_id\n\tto next_core_id","submitter":{"id":26065,"url":"http://patchwork.ozlabs.org/api/people/26065/","name":"Matthew Rosato","email":"mjrosato@linux.vnet.ibm.com"},"content":"On 09/04/2017 11:43 AM, David Hildenbrand wrote:\n> Adapt to the new term \"core_id\". While at it, fix the type and drop the\n> initialization to 0 (which is superfluous).\n> \n> Signed-off-by: David Hildenbrand <david@redhat.com>\n\nGiven the prior patch, this rename makes sense.\n\nReviewed-by: Matthew Rosato <mjrosato@linux.vnet.ibm.com>\n\n> ---\n>  target/s390x/cpu-qom.h |  2 +-\n>  target/s390x/cpu.c     | 11 +++++------\n>  2 files changed, 6 insertions(+), 7 deletions(-)\n> \n> diff --git a/target/s390x/cpu-qom.h b/target/s390x/cpu-qom.h\n> index c8fbf8ae03..21ea15e642 100644\n> --- a/target/s390x/cpu-qom.h\n> +++ b/target/s390x/cpu-qom.h\n> @@ -52,7 +52,7 @@ typedef struct S390CPUClass {\n>      bool is_migration_safe;\n>      const char *desc;\n> \n> -    int64_t next_cpu_id;\n> +    uint32_t next_core_id;\n> \n>      DeviceRealize parent_realize;\n>      void (*parent_reset)(CPUState *cpu);\n> diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c\n> index a2570bbc6b..105ff13034 100644\n> --- a/target/s390x/cpu.c\n> +++ b/target/s390x/cpu.c\n> @@ -197,7 +197,7 @@ static void s390_cpu_realizefn(DeviceState *dev, Error **errp)\n>      }\n>  #else\n>      /* implicitly set for linux-user only */\n> -    cpu->env.core_id = scc->next_cpu_id;\n> +    cpu->env.core_id = scc->next_core_id;\n>  #endif\n> \n>      if (cpu_exists(cpu->env.core_id)) {\n> @@ -205,10 +205,10 @@ static void s390_cpu_realizefn(DeviceState *dev, Error **errp)\n>                     cpu->env.core_id);\n>          goto out;\n>      }\n> -    if (cpu->env.core_id != scc->next_cpu_id) {\n> +    if (cpu->env.core_id != scc->next_core_id) {\n>          error_setg(&err, \"Unable to add CPU: %\" PRIu32\n> -                   \", the next available nr is %\" PRIi64, cpu->env.core_id,\n> -                   scc->next_cpu_id);\n> +                   \", the next available id is %\" PRIu32, cpu->env.core_id,\n> +                   scc->next_core_id);\n>          goto out;\n>      }\n> \n> @@ -218,7 +218,7 @@ static void s390_cpu_realizefn(DeviceState *dev, Error **errp)\n>      if (err != NULL) {\n>          goto out;\n>      }\n> -    scc->next_cpu_id++;\n> +    scc->next_core_id++;\n> \n>  #if !defined(CONFIG_USER_ONLY)\n>      qemu_register_reset(s390_cpu_machine_reset_cb, cpu);\n> @@ -463,7 +463,6 @@ static void s390_cpu_class_init(ObjectClass *oc, void *data)\n>      CPUClass *cc = CPU_CLASS(scc);\n>      DeviceClass *dc = DEVICE_CLASS(oc);\n> \n> -    scc->next_cpu_id = 0;\n>      scc->parent_realize = dc->realize;\n>      dc->realize = s390_cpu_realizefn;\n>      dc->props = s390x_cpu_properties;\n>","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>)","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 3xnlxQ56qHz9s7c\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu,  7 Sep 2017 13:17:14 +1000 (AEST)","from localhost ([::1]:38664 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 1dpnJY-0006eo-QE\n\tfor incoming@patchwork.ozlabs.org; Wed, 06 Sep 2017 23:17:12 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:51729)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <mjrosato@linux.vnet.ibm.com>) id 1dpnIS-00069e-QK\n\tfor qemu-devel@nongnu.org; Wed, 06 Sep 2017 23:16:09 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <mjrosato@linux.vnet.ibm.com>) id 1dpnIO-0004ft-OF\n\tfor qemu-devel@nongnu.org; Wed, 06 Sep 2017 23:16:04 -0400","from mx0b-001b2d01.pphosted.com ([148.163.158.5]:56201\n\thelo=mx0a-001b2d01.pphosted.com)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <mjrosato@linux.vnet.ibm.com>)\n\tid 1dpnIO-0004fV-Hy\n\tfor qemu-devel@nongnu.org; Wed, 06 Sep 2017 23:16:00 -0400","from pps.filterd (m0098417.ppops.net [127.0.0.1])\n\tby mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id\n\tv873DegW094957\n\tfor <qemu-devel@nongnu.org>; Wed, 6 Sep 2017 23:16:00 -0400","from e12.ny.us.ibm.com (e12.ny.us.ibm.com [129.33.205.202])\n\tby mx0a-001b2d01.pphosted.com with ESMTP id 2ctq57tnyu-1\n\t(version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT)\n\tfor <qemu-devel@nongnu.org>; Wed, 06 Sep 2017 23:15:59 -0400","from localhost\n\tby e12.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use\n\tOnly! Violators will be prosecuted\n\tfor <qemu-devel@nongnu.org> from <mjrosato@linux.vnet.ibm.com>;\n\tWed, 6 Sep 2017 23:15:59 -0400","from b01cxnp23034.gho.pok.ibm.com (9.57.198.29)\n\tby e12.ny.us.ibm.com (146.89.104.199) with IBM ESMTP SMTP Gateway:\n\tAuthorized Use Only! Violators will be prosecuted; \n\tWed, 6 Sep 2017 23:15:57 -0400","from b01ledav001.gho.pok.ibm.com (b01ledav001.gho.pok.ibm.com\n\t[9.57.199.106])\n\tby b01cxnp23034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP\n\tid v873Funr17891462; Thu, 7 Sep 2017 03:15:56 GMT","from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id EB7CB2803E;\n\tWed,  6 Sep 2017 23:15:49 -0400 (EDT)","from [9.85.195.170] (unknown [9.85.195.170])\n\tby b01ledav001.gho.pok.ibm.com (Postfix) with ESMTP id 7CF772803F;\n\tWed,  6 Sep 2017 23:15:49 -0400 (EDT)"],"To":"David Hildenbrand <david@redhat.com>, qemu-devel@nongnu.org","References":"<20170904154316.4148-1-david@redhat.com>\n\t<20170904154316.4148-15-david@redhat.com>","From":"Matthew Rosato <mjrosato@linux.vnet.ibm.com>","Date":"Wed, 6 Sep 2017 23:15:55 -0400","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<20170904154316.4148-15-david@redhat.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","Content-Transfer-Encoding":"8bit","X-TM-AS-GCONF":"00","x-cbid":"17090703-0048-0000-0000-000001E07815","X-IBM-SpamModules-Scores":"","X-IBM-SpamModules-Versions":"BY=3.00007680; HX=3.00000241; KW=3.00000007;\n\tPH=3.00000004; SC=3.00000226; SDB=6.00913362; UDB=6.00458407;\n\tIPR=6.00693625; \n\tBA=6.00005574; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009;\n\tZB=6.00000000; \n\tZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00017043;\n\tXFM=3.00000015; UTC=2017-09-07 03:15:59","X-IBM-AV-DETECTION":"SAVI=unused REMOTE=unused XFE=unused","x-cbparentid":"17090703-0049-0000-0000-000042799B4A","Message-Id":"<22c96c28-6dc2-25be-b3ae-60bcf23846dd@linux.vnet.ibm.com>","X-Proofpoint-Virus-Version":"vendor=fsecure engine=2.50.10432:, ,\n\tdefinitions=2017-09-07_03:, , signatures=0","X-Proofpoint-Spam-Details":"rule=outbound_notspam policy=outbound score=0\n\tspamscore=0 suspectscore=0\n\tmalwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam\n\tadjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000\n\tdefinitions=main-1709070046","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy]","X-Received-From":"148.163.158.5","Subject":"Re: [Qemu-devel] [PATCH v2 14/19] target/s390x: rename next_cpu_id\n\tto next_core_id","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":"thuth@redhat.com, Eduardo Habkost <ehabkost@redhat.com>,\n\tcohuck@redhat.com, Richard Henderson <richard.henderson@linaro.org>,\n\tAlexander Graf <agraf@suse.de>, borntraeger@de.ibm.com","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>"}}]