From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Shevchenko Date: Wed, 8 Apr 2020 20:11:16 +0300 Subject: [PATCH v3 27/29] acpi: Put table-setup code in its own function In-Reply-To: References: <20200330231305.130488-1-sjg@chromium.org> <20200330171226.v3.27.I34e9fcd28119cc2fcb87ad8679efb582a4c611df@changeid> <20200403133253.GK3676135@smile.fi.intel.com> Message-ID: <20200408171116.GO3676135@smile.fi.intel.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tue, Apr 07, 2020 at 08:57:52PM -0600, Simon Glass wrote: > On Fri, 3 Apr 2020 at 07:32, Andy Shevchenko > wrote: > > > > On Mon, Mar 30, 2020 at 05:13:03PM -0600, Simon Glass wrote: > > > We always write three basic tables to ACPI at the start. Move this into > > > its own function, along with acpi_fill_header(), so we can write a test > > > for this code. > > > > ... > > > > > /* Re-calculate checksum */ > > > rsdt->header.checksum = 0; > > > - rsdt->header.checksum = table_compute_checksum((u8 *)rsdt, > > > + rsdt->header.checksum = table_compute_checksum(rsdt, > > > rsdt->header.length); > > Please can you keep the filenames / functions in your response? > Fragments make it harder to find the code. I thought, obviously mistakenly, that git users know about git grep ... > > Why suddenly casting is not needed in this patch? > > Same question to the rest. > > > > (If it's a valid change, it should be in a separate patch) > > It was never needed. See the prototype for table_compute_checksum(). > > But I can put it back in. Depends on your preferences, but it's definitely not a material for this change. Separate one? -- With Best Regards, Andy Shevchenko