windows: Rename search_windows to windows_search
Change-Id: I523851c2cb654bc7c88532f2097f9c24196f6e78
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
diff --git a/mboxd_msg.c b/mboxd_msg.c
index ffeae0e..193166e 100644
--- a/mboxd_msg.c
+++ b/mboxd_msg.c
@@ -334,7 +334,7 @@
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 */
diff --git a/windows.c b/windows.c
index 2313e10..0111fea 100644
--- a/windows.c
+++ b/windows.c
@@ -492,7 +492,7 @@
}
/*
- * 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 @@
* 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 @@
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 @@
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);
}
diff --git a/windows.h b/windows.h
index 0c6fbb3..22db2ca 100644
--- a/windows.h
+++ b/windows.h
@@ -27,7 +27,7 @@
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,