summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Jeffery <andrew@aj.id.au>2018-08-08 17:12:03 +0930
committerAndrew Jeffery <andrew@aj.id.au>2018-09-05 17:44:24 +0930
commit3200c0725c2b7e031b5664085d1baf65f248d552 (patch)
tree316e63d931d070486f721f34d77dce61709c16bc
parentf5f514287e5af241eefecc312e84806ba762adde (diff)
downloadphosphor-mboxbridge-3200c0725c2b7e031b5664085d1baf65f248d552.tar.gz
phosphor-mboxbridge-3200c0725c2b7e031b5664085d1baf65f248d552.zip
windows: Rename write_from_window* to window_flush*
Change-Id: I17b3457c1689114e76652632358faca3a5130d9d Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
-rw-r--r--mboxd_msg.c6
-rw-r--r--windows.c12
-rw-r--r--windows.h4
3 files changed, 11 insertions, 11 deletions
diff --git a/mboxd_msg.c b/mboxd_msg.c
index 5eae6d6..1fd29f7 100644
--- a/mboxd_msg.c
+++ b/mboxd_msg.c
@@ -587,7 +587,7 @@ int mbox_handle_flush_window(struct mbox_context *context,
offset = i;
count++;
} else { /* Change in streak type */
- rc = write_from_window(context, offset, count,
+ rc = window_flush(context, offset, count,
prev);
if (rc < 0) {
return rc;
@@ -597,7 +597,7 @@ int mbox_handle_flush_window(struct mbox_context *context,
}
} else {
if (prev != WINDOW_CLEAN) { /* End of a streak */
- rc = write_from_window(context, offset, count,
+ rc = window_flush(context, offset, count,
prev);
if (rc < 0) {
return rc;
@@ -610,7 +610,7 @@ int mbox_handle_flush_window(struct mbox_context *context,
}
if (prev != WINDOW_CLEAN) { /* Still the last streak to write */
- rc = write_from_window(context, offset, count, prev);
+ rc = window_flush(context, offset, count, prev);
if (rc < 0) {
return rc;
}
diff --git a/windows.c b/windows.c
index 921e06f..a9031d6 100644
--- a/windows.c
+++ b/windows.c
@@ -140,12 +140,12 @@ void windows_free(struct mbox_context *context)
/* Write from Window Functions */
/*
- * write_from_window_v1() - Handle writing when erase and block size differ
+ * window_flush_v1() - Handle writing when erase and block size differ
* @context: The mbox context pointer
* @offset_bytes: The offset in the current window to write from (bytes)
* @count_bytes: Number of bytes to write
*
- * Handle a write_from_window for dirty memory when block_size is less than the
+ * Handle a window_flush for dirty memory when block_size is less than the
* flash erase size
* This requires us to be a bit careful because we might have to erase more
* than we want to write which could result in data loss if we don't have the
@@ -154,7 +154,7 @@ void windows_free(struct mbox_context *context)
*
* Return: 0 on success otherwise negative error code
*/
-int write_from_window_v1(struct mbox_context *context,
+int window_flush_v1(struct mbox_context *context,
uint32_t offset_bytes, uint32_t count_bytes)
{
int rc;
@@ -267,7 +267,7 @@ out:
}
/*
- * write_from_window() - Write back to the flash from the current window
+ * window_flush() - Write back to the flash from the current window
* @context: The mbox context pointer
* @offset_bytes: The offset in the current window to write from (blocks)
* @count_bytes: Number of blocks to write
@@ -275,7 +275,7 @@ out:
*
* Return: 0 on success otherwise negative error code
*/
-int write_from_window(struct mbox_context *context, uint32_t offset,
+int window_flush(struct mbox_context *context, uint32_t offset,
uint32_t count, uint8_t type)
{
int rc;
@@ -299,7 +299,7 @@ int write_from_window(struct mbox_context *context, uint32_t offset,
*/
if (log_2(context->mtd_info.erasesize) !=
context->block_size_shift) {
- return write_from_window_v1(context, offset_bytes,
+ return window_flush_v1(context, offset_bytes,
count_bytes);
}
flash_offset = context->current->flash_offset + offset_bytes;
diff --git a/windows.h b/windows.h
index 002e507..dae8bd1 100644
--- a/windows.h
+++ b/windows.h
@@ -13,9 +13,9 @@
int windows_init(struct mbox_context *context);
void windows_free(struct mbox_context *context);
/* Write From Window Functions */
-int write_from_window_v1(struct mbox_context *context,
+int window_flush_v1(struct mbox_context *context,
uint32_t offset_bytes, uint32_t count_bytes);
-int write_from_window(struct mbox_context *context, uint32_t offset,
+int window_flush(struct mbox_context *context, uint32_t offset,
uint32_t count, uint8_t type);
/* Window Management Functions */
void alloc_window_dirty_bytemap(struct mbox_context *context);
OpenPOWER on IntegriCloud