src/lib: Remove unused function parameters in imd.c
Remove const struct imd *imd and const struct imdr *imdr parameters from the prototypes of imdr_entry_size(), imd_entry_size() and imd_entry_id() functions since they are not used anywhere. Signed-off-by: Anna Karas <aka@semihalf.com> Change-Id: I6b43e9a5ae1f1d108024b4060a04c57f5d77fb55 Reviewed-on: https://review.coreboot.org/c/coreboot/+/43999 Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
93d678f8be
commit
215e7fc399
|
@ -102,13 +102,13 @@ const struct imd_entry *imd_entry_find_or_add(const struct imd *imd,
|
|||
uint32_t id, size_t size);
|
||||
|
||||
/* Returns size of entry or 0 on failure. */
|
||||
size_t imd_entry_size(const struct imd *imd, const struct imd_entry *entry);
|
||||
size_t imd_entry_size(const struct imd_entry *entry);
|
||||
|
||||
/* Returns pointer to region described by entry or NULL on failure. */
|
||||
void *imd_entry_at(const struct imd *imd, const struct imd_entry *entry);
|
||||
|
||||
/* Returns id for the imd entry. */
|
||||
uint32_t imd_entry_id(const struct imd *imd, const struct imd_entry *entry);
|
||||
uint32_t imd_entry_id(const struct imd_entry *entry);
|
||||
|
||||
/* Attempt to remove entry from imd. */
|
||||
int imd_entry_remove(const struct imd *imd, const struct imd_entry *entry);
|
||||
|
|
|
@ -111,7 +111,7 @@ void stage_cache_get_raw(int stage_id, void **base, size_t *size)
|
|||
}
|
||||
|
||||
*base = imd_entry_at(imd, e);
|
||||
*size = imd_entry_size(imd, e);
|
||||
*size = imd_entry_size(e);
|
||||
}
|
||||
|
||||
void stage_cache_load_stage(int stage_id, struct prog *stage)
|
||||
|
@ -141,7 +141,7 @@ void stage_cache_load_stage(int stage_id, struct prog *stage)
|
|||
}
|
||||
|
||||
c = imd_entry_at(imd, e);
|
||||
size = imd_entry_size(imd, e);
|
||||
size = imd_entry_size(e);
|
||||
|
||||
memcpy((void *)(uintptr_t)meta->load_addr, c, size);
|
||||
|
||||
|
|
|
@ -288,8 +288,7 @@ static int imdr_limit_size(struct imdr *imdr, size_t max_size)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static size_t imdr_entry_size(const struct imdr *imdr,
|
||||
const struct imd_entry *e)
|
||||
static size_t imdr_entry_size(const struct imd_entry *e)
|
||||
{
|
||||
return e->size;
|
||||
}
|
||||
|
@ -409,7 +408,7 @@ void imd_handle_init_partial_recovery(struct imd *imd)
|
|||
return;
|
||||
|
||||
imd->sm.limit = (uintptr_t)imdr_entry_at(imdr, e);
|
||||
imd->sm.limit += imdr_entry_size(imdr, e);
|
||||
imd->sm.limit += imdr_entry_size(e);
|
||||
imdr = &imd->sm;
|
||||
rp = imdr_get_root_pointer(imdr);
|
||||
imdr->r = relative_pointer(rp, rp->root_offset);
|
||||
|
@ -474,7 +473,7 @@ int imd_recover(struct imd *imd)
|
|||
return 0;
|
||||
|
||||
small_upper_limit = (uintptr_t)imdr_entry_at(imdr, e);
|
||||
small_upper_limit += imdr_entry_size(imdr, e);
|
||||
small_upper_limit += imdr_entry_size(e);
|
||||
|
||||
imd->sm.limit = small_upper_limit;
|
||||
|
||||
|
@ -592,9 +591,9 @@ const struct imd_entry *imd_entry_find_or_add(const struct imd *imd,
|
|||
return imd_entry_add(imd, id, size);
|
||||
}
|
||||
|
||||
size_t imd_entry_size(const struct imd *imd, const struct imd_entry *entry)
|
||||
size_t imd_entry_size(const struct imd_entry *entry)
|
||||
{
|
||||
return imdr_entry_size(NULL, entry);
|
||||
return imdr_entry_size(entry);
|
||||
}
|
||||
|
||||
void *imd_entry_at(const struct imd *imd, const struct imd_entry *entry)
|
||||
|
@ -609,7 +608,7 @@ void *imd_entry_at(const struct imd *imd, const struct imd_entry *entry)
|
|||
return imdr_entry_at(imdr, entry);
|
||||
}
|
||||
|
||||
uint32_t imd_entry_id(const struct imd *imd, const struct imd_entry *entry)
|
||||
uint32_t imd_entry_id(const struct imd_entry *entry)
|
||||
{
|
||||
return entry->id;
|
||||
}
|
||||
|
@ -671,7 +670,7 @@ static void imdr_print_entries(const struct imdr *imdr, const char *indent,
|
|||
printk(BIOS_DEBUG, "%s", name);
|
||||
printk(BIOS_DEBUG, "%2zu. ", i);
|
||||
printk(BIOS_DEBUG, "%p ", imdr_entry_at(imdr, e));
|
||||
printk(BIOS_DEBUG, "0x%08zx\n", imdr_entry_size(imdr, e));
|
||||
printk(BIOS_DEBUG, "0x%08zx\n", imdr_entry_size(e));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -178,7 +178,7 @@ int cbmem_entry_remove(const struct cbmem_entry *entry)
|
|||
|
||||
u64 cbmem_entry_size(const struct cbmem_entry *entry)
|
||||
{
|
||||
return imd_entry_size(&imd, cbmem_to_imd(entry));
|
||||
return imd_entry_size(cbmem_to_imd(entry));
|
||||
}
|
||||
|
||||
void *cbmem_entry_start(const struct cbmem_entry *entry)
|
||||
|
@ -232,7 +232,7 @@ void cbmem_add_records_to_cbtable(struct lb_header *header)
|
|||
if (e == NULL)
|
||||
break;
|
||||
|
||||
id = imd_entry_id(&imd, e);
|
||||
id = imd_entry_id(e);
|
||||
/* Don't add these metadata entries. */
|
||||
if (id == CBMEM_ID_IMD_ROOT || id == CBMEM_ID_IMD_SMALL)
|
||||
continue;
|
||||
|
@ -241,7 +241,7 @@ void cbmem_add_records_to_cbtable(struct lb_header *header)
|
|||
lbe->tag = LB_TAG_CBMEM_ENTRY;
|
||||
lbe->size = sizeof(*lbe);
|
||||
lbe->address = (uintptr_t)imd_entry_at(&imd, e);
|
||||
lbe->entry_size = imd_entry_size(&imd, e);
|
||||
lbe->entry_size = imd_entry_size(e);
|
||||
lbe->id = id;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue