Skip to contentSkip to conversation

ext3: Use unsigned instead of int for type of blocksize in fs/ext3/namei.c

PATCH In review Wei Yongjun 2 participants 2 messages Feb 12, 2009 – Feb 15, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ext3: Use unsigned instead of int for type of blocksize in fs/ext3/namei.c

Use unsigned instead of int for paramter which means blocksize.

---
 fs/ext3/namei.c |   8 +++++-----
 1 files changed, 4 insertions(+), 4 deletions(-)
fs/ext3/namei.c +4 -4
index 4db4ffa..40d0844 100644
@@ -161,12 +161,12 @@ static struct dx_frame *dx_probe(struct qstr *entry,
 				 struct dx_frame *frame,
 				 int *err);
 static void dx_release (struct dx_frame *frames);
-static int dx_make_map (struct ext3_dir_entry_2 *de, int size,
+static int dx_make_map (struct ext3_dir_entry_2 *de, unsigned size,
 			struct dx_hash_info *hinfo, struct dx_map_entry map[]);
 static void dx_sort_map(struct dx_map_entry *map, unsigned count);
 static struct ext3_dir_entry_2 *dx_move_dirents (char *from, char *to,
 		struct dx_map_entry *offsets, int count);
-static struct ext3_dir_entry_2* dx_pack_dirents (char *base, int size);
+static struct ext3_dir_entry_2* dx_pack_dirents (char *base, unsigned size);
 static void dx_insert_block (struct dx_frame *frame, u32 hash, u32 block);
 static int ext3_htree_next_block(struct inode *dir, __u32 hash,
 				 struct dx_frame *frame,
@@ -708,7 +708,7 @@ errout:
  * Create map of hash values, offsets, and sizes, stored at end of block.
  * Returns number of entries mapped.
  */
-static int dx_make_map (struct ext3_dir_entry_2 *de, int size,
+static int dx_make_map (struct ext3_dir_entry_2 *de, unsigned size,
 			struct dx_hash_info *hinfo, struct dx_map_entry *map_tail)
 {
 	int count = 0;
@@ -1120,7 +1120,7 @@ dx_move_dirents(char *from, char *to, struct dx_map_entry *map, int count)
  * Compact each dir entry in the range to the minimal rec_len.
  * Returns pointer to last entry in range.
  */
-static struct ext3_dir_entry_2* dx_pack_dirents(char *base, int size)
+static struct ext3_dir_entry_2* dx_pack_dirents(char *base, unsigned size)
 {
 	struct ext3_dir_entry_2 *next, *to, *prev, *de = (struct ext3_dir_entry_2 *) base;
 	unsigned rec_len = 0;
Signature · 1 line
1.5.3.8
#1 lore raw
Quoted 1 line · Wei Yongjun

Use unsigned instead of int for paramter which means blocksize.

Could you please also change size to blocksize, so it's more obvious what the parameter to dx_make_map() and dx_pack_dirents(), and resubmit an updated patch to Andrew? That will make it much more obvious what is going on.

I'll make the same changes to the patch destined for the ext4 tree myself.

Thanks, regards,

- Ted