Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 174BAC43334 for ; Fri, 22 Jul 2022 23:12:22 +0000 (UTC) Received: from localhost ([::1]:43826 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oF1oj-0005VA-5Z for qemu-devel@archiver.kernel.org; Fri, 22 Jul 2022 19:12:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56502) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oF1nz-0004ff-F2; Fri, 22 Jul 2022 19:11:35 -0400 Received: from zero.eik.bme.hu ([2001:738:2001:2001::2001]:57741) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oF1nx-0004wN-TV; Fri, 22 Jul 2022 19:11:35 -0400 Received: from zero.eik.bme.hu (blah.eik.bme.hu [152.66.115.182]) by localhost (Postfix) with SMTP id 7B53974637E; Sat, 23 Jul 2022 01:11:31 +0200 (CEST) Received: by zero.eik.bme.hu (Postfix, from userid 432) id 47E7574633F; Sat, 23 Jul 2022 01:11:31 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zero.eik.bme.hu (Postfix) with ESMTP id 4602E745702; Sat, 23 Jul 2022 01:11:31 +0200 (CEST) Date: Sat, 23 Jul 2022 01:11:31 +0200 (CEST) From: BALATON Zoltan To: Daniel Henrique Barboza cc: qemu-devel@nongnu.org, Alistair Francis , David Gibson , qemu-ppc@nongnu.org Subject: Re: [PATCH for-7.2 02/10] hw/ppc/pegasos2.c: set machine->fdt in machine_reset() In-Reply-To: <20220722200007.1602174-3-danielhb413@gmail.com> Message-ID: <55e98dea-d9f5-c2d4-e9e6-d01ed140b1ce@eik.bme.hu> References: <20220722200007.1602174-1-danielhb413@gmail.com> <20220722200007.1602174-3-danielhb413@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Received-SPF: pass client-ip=2001:738:2001:2001::2001; envelope-from=balaton@eik.bme.hu; helo=zero.eik.bme.hu X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Fri, 22 Jul 2022, Daniel Henrique Barboza wrote: > We'll introduce HMP commands that requires machine->fdt to be set > properly. > > Cc: BALATON Zoltan > Cc: qemu-ppc@nongnu.org > Signed-off-by: Daniel Henrique Barboza > --- > hw/ppc/pegasos2.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/hw/ppc/pegasos2.c b/hw/ppc/pegasos2.c > index 61f4263953..9827c3b4c2 100644 > --- a/hw/ppc/pegasos2.c > +++ b/hw/ppc/pegasos2.c > @@ -329,6 +329,9 @@ static void pegasos2_machine_reset(MachineState *machine) > g_free(pm->fdt_blob); > pm->fdt_blob = fdt; > > + /* Set common MachineState->fdt */ > + machine->fdt = fdt; > + Again, comment just states what the next line does but does not explain why. Either add a comment that explains why it's set or drop the trivial comment. Otherwise, Acked-by: BALATON Zoltan > vof_build_dt(fdt, pm->vof); > vof_client_open_store(fdt, pm->vof, "/chosen", "stdout", "/failsafe"); > pm->cpu->vhyp = PPC_VIRTUAL_HYPERVISOR(machine); >