Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CgSzm-0005lr-1T for mharc-grub-devel@gnu.org; Mon, 20 Dec 2004 14:15:02 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CgSzf-0005jQ-1I for grub-devel@gnu.org; Mon, 20 Dec 2004 14:14:56 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CgSzb-0005hC-Mg for grub-devel@gnu.org; Mon, 20 Dec 2004 14:14:51 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CgSzb-0005h5-DR for grub-devel@gnu.org; Mon, 20 Dec 2004 14:14:51 -0500 Received: from [145.74.66.11] (helo=mail-cn.han.nl) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CgSYz-000606-Ta for grub-devel@gnu.org; Mon, 20 Dec 2004 13:47:22 -0500 Received: from vscan-ca.han.nl (mars.han.nl [145.74.129.116]) by mail-cn.han.nl (Postfix) with ESMTP id BD767A13E for ; Mon, 20 Dec 2004 19:47:18 +0100 (CET) Received: from mail-cn.han.nl ([145.74.66.51]) by vscan-ca.han.nl (mars.han.nl [145.74.129.116]) (amavisd-new, port 10024) with LMTP id 23318-01-92 for ; Mon, 20 Dec 2004 19:47:15 +0100 (CET) Received: from mail1.han.nl (mail1.han.nl [145.74.103.11]) by mail-cn.han.nl (Postfix) with ESMTP id D1EDFA15A for ; Mon, 20 Dec 2004 19:47:15 +0100 (CET) Received: from marco.marco-g.com (mgerards.xs4all.nl [82.92.27.129]) by mail1.han.nl (Postfix) with ESMTP id 90E61C05C for ; Mon, 20 Dec 2004 19:47:15 +0100 (CET) Mail-Copies-To: metgerards@student.han.nl To: The development of GRUB 2 References: <87r7lm0yzk.fsf@marco.marco-g.com> <45EF81AC-52A3-11D9-9076-000A95A0560C@penguinppc.org> From: Marco Gerards Date: Mon, 20 Dec 2004 18:46:26 +0000 In-Reply-To: <45EF81AC-52A3-11D9-9076-000A95A0560C@penguinppc.org> (Hollis Blanchard's message of "Mon, 20 Dec 2004 10:21:59 -0600") Message-ID: <87y8fsg64d.fsf@marco.marco-g.com> User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new (2.2.0) at vscan-ca.han.nl Subject: Re: Module support for the PPC X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Dec 2004 19:14:58 -0000 Hollis Blanchard writes: >> + for (seg = mod->segment; seg; seg = segn) >> + { >> + segn = seg->next; >> + grub_free (seg->addr); >> + grub_arch_dl_sync_caches (seg->addr, seg->size); >> + } >> +} >> + > > That for loop confuses me. Couldn't it be written as > for (seg = mod->segment; seg; seg = seg->next) > ? > > Also, I'm not sure why grub_free is here. Is that intentional? Right! Nice catch! That caused the problem I had. I feel so stupid now... When I added this function I copied it from the function to free a module and quickly added the cache flush there. > Unrelated, I don't like naming the function > "grub_arch_dl_sync_caches", since it has nothing to do dl code really; > that's just the only user right now. I'd prefer > "grub_arch_sync_caches". Ok. > Other than that, looks fine to me, and I hope we can get this checked > in soon for some holiday hacking. :) Same here. :) If I hear no objections before friday I will check in this patch with the changes I described. Thanks, Marco