UPSTREAM: soc/intel/common/block/acpi/pep: use acpigen_write_processor_namestring

(cherry picked from commit 5edb51855c2c8885bb1ea4fc3780728b6acd516e)

Original-Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Original-Change-Id: I43590f0f792fca1c90ee8f8b32e6be47943c59df
Original-Reviewed-on: https://review.coreboot.org/c/coreboot/+/72453
Original-Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
GitOrigin-RevId: 5edb51855c2c8885bb1ea4fc3780728b6acd516e
Change-Id: I7e2a6018af304aa0215c13b4ce2b1025fff03ea2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/coreboot/+/4199770
Tested-by: CopyBot Service Account <copybot.service@gmail.com>
Commit-Queue: Paul Fagerburg <pfagerburg@chromium.org>
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
diff --git a/src/soc/intel/common/block/acpi/pep.c b/src/soc/intel/common/block/acpi/pep.c
index 2dd0949..0ba38c1 100644
--- a/src/soc/intel/common/block/acpi/pep.c
+++ b/src/soc/intel/common/block/acpi/pep.c
@@ -93,7 +93,6 @@
  */
 static void acpi_gen_default_lpi_constraints(void)
 {
-	char path[16];
 	printk(BIOS_INFO, "Returning default LPI constraint package\n");
 
 	/*
@@ -107,8 +106,7 @@
 	{
 		acpigen_write_package(3);
 		{
-			snprintf(path, sizeof(path), CONFIG_ACPI_CPU_STRING, 0);
-			acpigen_emit_namestring(path);
+			acpigen_write_processor_namestring(0);
 			acpigen_write_integer(0); /* device disabled */
 			acpigen_write_package(2);
 			{
@@ -188,7 +186,6 @@
 
 			acpigen_write_package(3);
 			{
-				char path[32] = { 0 };
 				/* Emit the device path */
 				switch (dev->path.type) {
 				case DEVICE_PATH_PCI:
@@ -196,9 +193,7 @@
 					break;
 
 				case DEVICE_PATH_APIC:
-					snprintf(path, sizeof(path), CONFIG_ACPI_CPU_STRING,
-						cpu_index++);
-					acpigen_emit_namestring(path);
+					acpigen_write_processor_namestring(cpu_index++);
 					break;
 
 				default: