Commit 17c477a7 authored by Andrew Jeffery's avatar Andrew Jeffery
Browse files

windows: Rename search_windows to windows_search


Change-Id: I523851c2cb654bc7c88532f2097f9c24196f6e78
Signed-off-by: Andrew Jeffery's avatarAndrew Jeffery <andrew@aj.id.au>
parent d8c12e1b
......@@ -334,7 +334,7 @@ int mbox_handle_read_window(struct mbox_context *context,
flash_offset = get_u16(&req->msg.args[0]) << context->block_size_shift;
MSG_INFO("Host requested flash @ 0x%.8x\n", flash_offset);
/* Check if we have an existing window */
context->current = search_windows(context, flash_offset,
context->current = windows_search(context, flash_offset,
context->version == API_VERSION_1);
if (!context->current) { /* No existing window */
......
......@@ -492,7 +492,7 @@ struct window_context *windows_find_largest(struct mbox_context *context)
}
/*
* search_windows() - Search the window cache for a window containing offset
* windows_search() - Search the window cache for a window containing offset
* @context: The mbox context pointer
* @offset: Absolute flash offset to search for (bytes)
* @exact: If the window must exactly map the requested offset
......@@ -505,7 +505,7 @@ struct window_context *windows_find_largest(struct mbox_context *context)
* Return: Pointer to a window containing the requested offset otherwise
* NULL
*/
struct window_context *search_windows(struct mbox_context *context,
struct window_context *windows_search(struct mbox_context *context,
uint32_t offset, bool exact)
{
struct window_context *cur;
......@@ -562,7 +562,7 @@ int create_map_window(struct mbox_context *context,
exact ? "exactly" : "");
/* Search for an uninitialised window, use this before evicting */
cur = search_windows(context, FLASH_OFFSET_UNINIT, true);
cur = windows_search(context, FLASH_OFFSET_UNINIT, true);
/* No uninitialised window found, we need to choose one to "evict" */
if (!cur) {
......@@ -651,7 +651,7 @@ int create_map_window(struct mbox_context *context,
for (i = offset; i < (offset + cur->size); i += (cur->size - 1)) {
struct window_context *tmp = NULL;
do {
tmp = search_windows(context, i, false);
tmp = windows_search(context, i, false);
if (tmp) {
window_reset(context, tmp);
}
......
......@@ -27,7 +27,7 @@ void window_reset(struct mbox_context *context, struct window_context *window);
void windows_reset_all(struct mbox_context *context, bool set_bmc_event);
struct window_context *windows_find_oldest(struct mbox_context *context);
struct window_context *windows_find_largest(struct mbox_context *context);
struct window_context *search_windows(struct mbox_context *context,
struct window_context *windows_search(struct mbox_context *context,
uint32_t offset, bool exact);
int create_map_window(struct mbox_context *context,
struct window_context **this_window,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment