Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1nOx5l-0008Vm-DI for mharc-grub-devel@gnu.org; Tue, 01 Mar 2022 02:38:41 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40508) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOx5k-0008Vd-5x for grub-devel@gnu.org; Tue, 01 Mar 2022 02:38:40 -0500 Received: from [2607:f8b0:4864:20::f2c] (port=36681 helo=mail-qv1-xf2c.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nOx5h-0002Qe-Vh for grub-devel@gnu.org; Tue, 01 Mar 2022 02:38:39 -0500 Received: by mail-qv1-xf2c.google.com with SMTP id w7so16083479qvr.3 for ; Mon, 28 Feb 2022 23:38:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficientek-com.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; bh=VBi5bZzqx8HJtFXtL8lH2oTgMdYSjXCxRa2ALck+8Pc=; b=QlKzN0M7pauTQINOKSWT6v5NsL7t14P5B6+vXaTvsu7zdGVNAEgFtmAVlZ9WkdSfia PGgu5sCvva9GyXTjzJKcbxCHEPQcTo+j35uN4M2GQg+6Q7Zy9TJYSFS8D1DxxUbFWYjW HHc5PtNs9+GDNt2C6woi9LlzV+h8cr2wYKh+zDzG4TrIdTLTjCnJNIZfUogkoIICrgWk erNCjsDoRBRFoABl16RzG9ZQeB1r4ttB8iikc8Kmv6Dc8lB+iEVlDLjLQXvzbrvCQuCh Aokc1kn6q+W9tmhUCbmDvd7kH/EJirRcQk3KlHRPSAqi3qH2x+XjZkEOg4A62s67p7Wf A8Pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:reply-to:mime-version:content-transfer-encoding; bh=VBi5bZzqx8HJtFXtL8lH2oTgMdYSjXCxRa2ALck+8Pc=; b=hrgpPNaobDUtWdmB9H7U7Efex/btydvZxXny6eNyIUjmfnfV9U8jko0oiZg5kpcACw 2rSkyKH/iX6bUNttVx4nbWz74awwq8byJPFqhhJndgyueEXK6GaYsGV0V/ws7p0GJVEF cmhlzhb4uDCQnfLvZSv7ApMAtqS7E25Tcl/s1lF76lP0HzYZtvLZojZjTPGTvOV+huJ+ LfSbtJGX09Re4vtTAjsspO9ddPrHwQq8KDoxbSExwYUWNWODgInqz7eVOTIydKg9Yu08 zVH16GbDJqHCdVd46l74XxYI3q/R+YAkYOFGq2AMlXqJiNLM7D4FnpWl2InEpJN+YTP3 YNkw== X-Gm-Message-State: AOAM5329tZDZ1+VX9UajLVisXsski5ijyCuRiwjQjg/9OUn4Ox14+zW6 uxePDQSJ18JO7CP/eV+F8IPo5jVl0mLB2Q== X-Google-Smtp-Source: ABdhPJwJ/CeC1I0/I2li/uOTIeLIt31MMt3Sepa8F+stkYyk2sR3Q9qaBKrjqCHqVD31iLuCIx9ZDA== X-Received: by 2002:a05:6214:401e:b0:432:cf83:ffe4 with SMTP id kd30-20020a056214401e00b00432cf83ffe4mr12265934qvb.4.1646120316658; Mon, 28 Feb 2022 23:38:36 -0800 (PST) Received: from crass-HP-ZBook-15-G2 (garza.riseup.net. [198.252.153.109]) by smtp.gmail.com with ESMTPSA id g202-20020a379dd3000000b0047d87ec72bbsm6322141qke.28.2022.02.28.23.38.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Feb 2022 23:38:36 -0800 (PST) Date: Tue, 1 Mar 2022 01:38:17 -0600 From: Glenn Washburn To: Elyes Haouas Cc: The development of GNU GRUB Subject: Re: [PATCH 2/2] grub-core/loader/i386/multiboot_mbi.c: Remove dead increment Message-ID: <20220301013817.13879110@crass-HP-ZBook-15-G2> In-Reply-To: <20220228204835.66182-2-ehaouas@noos.fr> References: <20220228204835.66182-1-ehaouas@noos.fr> <20220228204835.66182-2-ehaouas@noos.fr> Reply-To: development@efficientek.com X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::f2c (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::f2c; envelope-from=development@efficientek.com; helo=mail-qv1-xf2c.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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: Tue, 01 Mar 2022 07:38:40 -0000 On Mon, 28 Feb 2022 21:48:35 +0100 Elyes Haouas wrote: > The value stored to 'ptrdest' is never read > > Signed-off-by: Elyes Haouas > --- > grub-core/loader/i386/multiboot_mbi.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/grub-core/loader/i386/multiboot_mbi.c b/grub-core/loader/i386/multiboot_mbi.c > index a67d9d0a8..663b25cc5 100644 > --- a/grub-core/loader/i386/multiboot_mbi.c > +++ b/grub-core/loader/i386/multiboot_mbi.c > @@ -609,7 +609,6 @@ grub_multiboot_make_mbi (grub_uint32_t *target) > ptrorig += sizeof (struct grub_vbe_info_block); > ptrdest += sizeof (struct grub_vbe_info_block); > ptrorig += sizeof (struct grub_vbe_mode_info_block); > - ptrdest += sizeof (struct grub_vbe_mode_info_block); I'm not familiar with this code and just did a cursory glance, but it looks to me like none of these above 4 lines are used nor in the "if" block above them. This begs for more investigation. It looks to me like either there's code missing after this or this apparently useless code wasn't removed during a refactor. Both ptrdest and ptrorig are stack variables, so I don't think there's any magic in writing to them. What am I missing? Until this is clarified, I don't think we should be removing this code. Glenn > #endif > > #ifdef GRUB_MACHINE_EFI