Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1p8B4K-0003tv-6t for mharc-grub-devel@gnu.org; Wed, 21 Dec 2022 21:12:24 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p8B4H-0003tf-4C for grub-devel@gnu.org; Wed, 21 Dec 2022 21:12:21 -0500 Received: from gate.crashing.org ([63.228.1.57]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p8B4E-0005yO-MP for grub-devel@gnu.org; Wed, 21 Dec 2022 21:12:20 -0500 Received: from [IPv6:::1] (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 2BM2BDcu015204; Wed, 21 Dec 2022 20:11:15 -0600 Message-ID: <99bb95645543027de9feb8ceb8227b294cf650ab.camel@kernel.crashing.org> Subject: Re: [PATCH 3/7] ns8250: Add base support for MMIO UARTs From: Benjamin Herrenschmidt To: Daniel Kiper Cc: grub-devel@gnu.org Date: Thu, 22 Dec 2022 13:11:13 +1100 In-Reply-To: <20221221132539.5if4zyjnlwxrv656@tomti.i.net-space.pl> References: <20221201230526.881378-1-benh@kernel.crashing.org> <20221201230526.881378-4-benh@kernel.crashing.org> <20221221132539.5if4zyjnlwxrv656@tomti.i.net-space.pl> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4-0ubuntu1 MIME-Version: 1.0 Received-SPF: pass client-ip=63.228.1.57; envelope-from=benh@kernel.crashing.org; helo=gate.crashing.org 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_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2022 02:12:22 -0000 Thanks for your review ! I'll address everything. Small "nits": On Wed, 2022-12-21 at 14:25 +0100, Daniel Kiper wrote: > > + > > +char * > > +grub_serial_ns8250_add_mmio(grub_addr_t addr) > > +{ > > +=C2=A0 struct grub_serial_port *p; > > +=C2=A0 unsigned i; >=20 > Please add en empty line here. Ack. I copied grub_serial_ns8250_add_port() :-) I'll fix that one as well > > +=C2=A0 for (i =3D 0; i < GRUB_SERIAL_PORT_NUM; i++) > > +=C2=A0=C2=A0=C2=A0 if (com_ports[i].mmio &&=C2=A0 com_ports[i].mmio_ba= se =3D=3D addr) > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0return com_names[i]; > > + > > +=C2=A0 p =3D grub_malloc (sizeof (*p)); > > +=C2=A0 if (!p) >=20 > I prefer "p =3D=3D NULL" instead of "!p". If you could fix that here and = in > the other places/patches that will be nice. Ditto (pre-existing construct). I'll fix them in the other code too, holler if you object. Cheers, Ben.