summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2019-11-10 02:16:33 +0100
committerHeinrich Schuchardt <xypron.glpk@gmx.de>2019-11-19 12:10:22 +0100
commit246e60184604a59312a4f8d66d83e155ace847c2 (patch)
treed1b9ed7933a683075779191056dc759479cea3cd
parentd4a31e8ee5592072d8d5208b3e950cba2d89b6bd (diff)
efi_loader: remove unused function efi_dp_from_dev()
Function efi_dp_from_dev() is not used anywhere. Remove it. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
-rw-r--r--include/efi_loader.h1
-rw-r--r--lib/efi_loader/efi_device_path.c18
2 files changed, 2 insertions, 17 deletions
diff --git a/include/efi_loader.h b/include/efi_loader.h
index 381da80cdc..16a1b258b1 100644
--- a/include/efi_loader.h
+++ b/include/efi_loader.h
@@ -543,7 +543,6 @@ struct efi_device_path *efi_dp_get_next_instance(struct efi_device_path **dp,
/* Check if a device path contains muliple instances */
bool efi_dp_is_multi_instance(const struct efi_device_path *dp);
-struct efi_device_path *efi_dp_from_dev(struct udevice *dev);
struct efi_device_path *efi_dp_from_part(struct blk_desc *desc, int part);
/* Create a device node for a block device partition. */
struct efi_device_path *efi_dp_part_node(struct blk_desc *desc, int part);
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)