summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-08-14 19:56:15 -0600
committerBin Meng <bmeng.cn@gmail.com>2019-08-18 21:54:10 +0800
commitad79d603aa68a7a523005ce694ee4b43efdf7382 (patch)
treea4cf25bf6e97f8170bfc7303ec66099d9c07cc38
parent630b2f39ddabd43a27a98f0356b948df18e97d88 (diff)
downloadu-boot-ad79d603aa68a7a523005ce694ee4b43efdf7382.tar.gz
cbfs: Rename camel-case variables
Rename some camel-case variables to match U-Boot style. Camel case is not generally allowed in U-Boot. Rename this variable to fit in with the style. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
-rw-r--r--fs/cbfs/cbfs.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/fs/cbfs/cbfs.c b/fs/cbfs/cbfs.c
index 35f919afee..1aa6f8ee84 100644
--- a/fs/cbfs/cbfs.c
+++ b/fs/cbfs/cbfs.c
@@ -73,14 +73,14 @@ static void swap_file_header(struct cbfs_fileheader *dest,
* @param start The location in memory to start from.
* @param size The size of the memory region to search.
* @param align The alignment boundaries to check on.
- * @param newNode A pointer to the file structure to load.
+ * @param new_node A pointer to the file structure to load.
* @param used A pointer to the count of of bytes scanned through,
* including the file if one is found.
*
* @return 1 if a file is found, 0 if one isn't.
*/
static int file_cbfs_next_file(struct cbfs_priv *priv, u8 *start, u32 size,
- u32 align, struct cbfs_cachenode *newNode,
+ u32 align, struct cbfs_cachenode *new_node,
u32 *used)
{
struct cbfs_fileheader header;
@@ -88,34 +88,34 @@ static int file_cbfs_next_file(struct cbfs_priv *priv, u8 *start, u32 size,
*used = 0;
while (size >= align) {
- const struct cbfs_fileheader *fileHeader =
+ const struct cbfs_fileheader *file_header =
(const struct cbfs_fileheader *)start;
u32 name_len;
u32 step;
/* Check if there's a file here. */
- if (memcmp(good_file_magic, &(fileHeader->magic),
- sizeof(fileHeader->magic))) {
+ if (memcmp(good_file_magic, &file_header->magic,
+ sizeof(file_header->magic))) {
*used += align;
size -= align;
start += align;
continue;
}
- swap_file_header(&header, fileHeader);
+ swap_file_header(&header, file_header);
if (header.offset < sizeof(struct cbfs_fileheader)) {
priv->result = CBFS_BAD_FILE;
return -1;
}
- newNode->next = NULL;
- newNode->type = header.type;
- newNode->data = start + header.offset;
- newNode->data_length = header.len;
+ new_node->next = NULL;
+ new_node->type = header.type;
+ new_node->data = start + header.offset;
+ new_node->data_length = header.len;
name_len = header.offset - sizeof(struct cbfs_fileheader);
- newNode->name = (char *)fileHeader +
+ new_node->name = (char *)file_header +
sizeof(struct cbfs_fileheader);
- newNode->name_length = name_len;
- newNode->attributes_offset = header.attributes_offset;
+ new_node->name_length = name_len;
+ new_node->attributes_offset = header.attributes_offset;
step = header.len;
if (step % align)
@@ -132,15 +132,15 @@ static void file_cbfs_fill_cache(struct cbfs_priv *priv, u8 *start, u32 size,
u32 align)
{
struct cbfs_cachenode *cache_node;
- struct cbfs_cachenode *newNode;
+ struct cbfs_cachenode *new_node;
struct cbfs_cachenode **cache_tail = &priv->file_cache;
/* Clear out old information. */
cache_node = priv->file_cache;
while (cache_node) {
- struct cbfs_cachenode *oldNode = cache_node;
+ struct cbfs_cachenode *old_node = cache_node;
cache_node = cache_node->next;
- free(oldNode);
+ free(old_node);
}
priv->file_cache = NULL;
@@ -148,20 +148,20 @@ static void file_cbfs_fill_cache(struct cbfs_priv *priv, u8 *start, u32 size,
int result;
u32 used;
- newNode = (struct cbfs_cachenode *)
+ new_node = (struct cbfs_cachenode *)
malloc(sizeof(struct cbfs_cachenode));
- result = file_cbfs_next_file(priv, start, size, align, newNode,
+ result = file_cbfs_next_file(priv, start, size, align, new_node,
&used);
if (result < 0) {
- free(newNode);
+ free(new_node);
return;
} else if (result == 0) {
- free(newNode);
+ free(new_node);
break;
}
- *cache_tail = newNode;
- cache_tail = &newNode->next;
+ *cache_tail = new_node;
+ cache_tail = &new_node->next;
size -= used;
start += used;