summaryrefslogtreecommitdiffstats
path: root/lib/efi_loader/efi_device_path.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2019-11-19 17:42:46 -0500
committerTom Rini <trini@konsulko.com>2019-11-19 17:42:46 -0500
commit99f9682cae45604ed3ad923cf2caa8fdd0e273e3 (patch)
treeda06ca42bb24ad32f2b7f6afefd61db8b8a275bc /lib/efi_loader/efi_device_path.c
parentd4a31e8ee5592072d8d5208b3e950cba2d89b6bd (diff)
parent38064ee04c9b42a299f914c36a093144bd86ac50 (diff)
downloadu-boot-99f9682cae45604ed3ad923cf2caa8fdd0e273e3.tar.gz
u-boot-99f9682cae45604ed3ad923cf2caa8fdd0e273e3.tar.xz
u-boot-99f9682cae45604ed3ad923cf2caa8fdd0e273e3.zip
Merge tag 'efi-2020-01-rc4' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi
Pull request for UEFI sub-system for efi-2020-01-rc4 Fix errors due to unaligned memory access: * disable UEFI except for ARMv8, ARMv7, ARM11 * enable unaligned access support on ARM11 Remove an unused function.
Diffstat (limited to 'lib/efi_loader/efi_device_path.c')
-rw-r--r--lib/efi_loader/efi_device_path.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/lib/efi_loader/efi_device_path.c b/lib/efi_loader/efi_device_path.c
index 17a0c5bb45..73f1fe75a8 100644
--- a/lib/efi_loader/efi_device_path.c
+++ b/lib/efi_loader/efi_device_path.c
@@ -422,7 +422,7 @@ bool efi_dp_is_multi_instance(const struct efi_device_path *dp)
/* size of device-path not including END node for device and all parents
* up to the root device.
*/
-static unsigned dp_size(struct udevice *dev)
+__maybe_unused static unsigned int dp_size(struct udevice *dev)
{
if (!dev || !dev->driver)
return sizeof(ROOT);
@@ -494,7 +494,7 @@ static unsigned dp_size(struct udevice *dev)
* @dev device
* @return pointer to the end of the device path
*/
-static void *dp_fill(void *buf, struct udevice *dev)
+__maybe_unused static void *dp_fill(void *buf, struct udevice *dev)
{
if (!dev || !dev->driver)
return buf;
@@ -654,20 +654,6 @@ static void *dp_fill(void *buf, struct udevice *dev)
return dp_fill(buf, dev->parent);
}
}
-
-/* Construct a device-path from a device: */
-struct efi_device_path *efi_dp_from_dev(struct udevice *dev)
-{
- void *buf, *start;
-
- start = buf = dp_alloc(dp_size(dev) + sizeof(END));
- if (!buf)
- return NULL;
- buf = dp_fill(buf, dev);
- *((struct efi_device_path *)buf) = END;
-
- return start;
-}
#endif
static unsigned dp_part_size(struct blk_desc *desc, int part)