From 07a6c69759eb4a99f044962c8c40c093af534351 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Thu, 18 Apr 2024 05:11:13 +0200 Subject: acpi: set creator_revision in acpi_fill_header We should have a single place where we write the default value to the creator revision field. If we ever will have any table created by another tool, we can overwrite the value afterwards. Signed-off-by: Heinrich Schuchardt --- test/dm/acpi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'test') diff --git a/test/dm/acpi.c b/test/dm/acpi.c index 4db2171a4b1..7da381f1a54 100644 --- a/test/dm/acpi.c +++ b/test/dm/acpi.c @@ -236,7 +236,6 @@ static int dm_test_acpi_fill_header(struct unit_test_state *uts) hdr.length = 0x11; hdr.revision = 0x22; hdr.checksum = 0x33; - hdr.creator_revision = 0x44; acpi_fill_header(&hdr, "ABCD"); ut_asserteq_mem("ABCD", hdr.signature, sizeof(hdr.signature)); @@ -248,7 +247,7 @@ static int dm_test_acpi_fill_header(struct unit_test_state *uts) sizeof(hdr.oem_table_id)); ut_asserteq(OEM_REVISION, hdr.oem_revision); ut_asserteq_mem(ASLC_ID, hdr.creator_id, sizeof(hdr.creator_id)); - ut_asserteq(0x44, hdr.creator_revision); + ut_asserteq(ASL_REVISION, hdr.creator_revision); return 0; } -- cgit v1.3.1 From a8729a260b53b9a2fce2607ac90744a47f96daef Mon Sep 17 00:00:00 2001 From: Rasmus Villemoes Date: Mon, 27 May 2024 22:04:17 +0200 Subject: global_data.h: drop write-only field dm_root_f The dm_root_f field seems to be entirely write-only and hence redundant, unless 'git grep' fails to find some access generated via preprocessor token concatenation or similar. Signed-off-by: Rasmus Villemoes Reviewed-by: Simon Glass --- common/board_r.c | 3 +-- include/asm-generic/global_data.h | 4 ---- test/dm/core.c | 1 - 3 files changed, 1 insertion(+), 7 deletions(-) (limited to 'test') diff --git a/common/board_r.c b/common/board_r.c index c823cd262f1..d4ba245ac69 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -230,8 +230,7 @@ static int initr_dm(void) oftree_reset(); - /* Save the pre-reloc driver model and start a new one */ - gd->dm_root_f = gd->dm_root; + /* Drop the pre-reloc driver model and start a new one */ gd->dm_root = NULL; #ifdef CONFIG_TIMER gd->timer = NULL; diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h index fcc3c6e14ca..aa336d63e3a 100644 --- a/include/asm-generic/global_data.h +++ b/include/asm-generic/global_data.h @@ -195,10 +195,6 @@ struct global_data { * @dm_root: root instance for Driver Model */ struct udevice *dm_root; - /** - * @dm_root_f: pre-relocation root instance - */ - struct udevice *dm_root_f; /** * @uclass_root_s: * head of core tree when uclasses are not in read-only memory. diff --git a/test/dm/core.c b/test/dm/core.c index 4741c81bcc1..dbad1b317db 100644 --- a/test/dm/core.c +++ b/test/dm/core.c @@ -1006,7 +1006,6 @@ static int dm_test_uclass_before_ready(struct unit_test_state *uts) ut_assertok(uclass_get(UCLASS_TEST, &uc)); gd->dm_root = NULL; - gd->dm_root_f = NULL; memset(&gd->uclass_root, '\0', sizeof(gd->uclass_root)); ut_asserteq_ptr(NULL, uclass_find(UCLASS_TEST)); -- cgit v1.3.1