yaffs: Change all hex values to lower case
authorCharles Manning <cdhmanning@gmail.com>
Thu, 3 Feb 2011 19:46:25 +0000 (08:46 +1300)
committerCharles Manning <cdhmanning@gmail.com>
Thu, 3 Feb 2011 19:46:25 +0000 (08:46 +1300)
Signed-off-by: Charles Manning <cdhmanning@gmail.com>
12 files changed:
yaffs_checkptrw.c
yaffs_guts.c
yaffs_guts.h
yaffs_mtdif1_multi.c
yaffs_mtdif1_single.c
yaffs_packedtags1.c
yaffs_packedtags2.c
yaffs_tagscompat.c
yaffs_tagsvalidity.c
yaffs_trace.h
yaffs_verify.c
yaffs_yaffs2.c

index 5f5a4758e5559f259b6d7f7ca5b1d99a265d32d2..997a618aee86c80435e722a22e87a58f7bc9b620 100644 (file)
@@ -194,7 +194,7 @@ int yaffs2_get_checkpt_sum(struct yaffs_dev *dev, u32 * sum)
 {
        u32 composite_sum;
 
 {
        u32 composite_sum;
 
-       composite_sum = (dev->checkpt_sum << 8) | (dev->checkpt_xor & 0xFF);
+       composite_sum = (dev->checkpt_sum << 8) | (dev->checkpt_xor & 0xff);
        *sum = composite_sum;
        return 1;
 }
        *sum = composite_sum;
        return 1;
 }
index 2fcb80b24929f825ae3f8f346a815ca2aa735c36..403ce11bb2cea2a0022ca496beec118f7fa0e1e8 100644 (file)
@@ -323,7 +323,7 @@ int yaffs_check_ff(u8 *buffer, int n_bytes)
 {
        /* Horrible, slow implementation */
        while (n_bytes--) {
 {
        /* Horrible, slow implementation */
        while (n_bytes--) {
-               if (*buffer != 0xFF)
+               if (*buffer != 0xff)
                        return 0;
                buffer++;
        }
                        return 0;
                buffer++;
        }
@@ -3316,9 +3316,9 @@ int yaffs_update_oh(struct yaffs_obj *in, const YCHAR *name, int force,
 
                yaffs_verify_oh(in, oh, &old_tags, 0);
                memcpy(old_name, oh->name, sizeof(oh->name));
 
                yaffs_verify_oh(in, oh, &old_tags, 0);
                memcpy(old_name, oh->name, sizeof(oh->name));
-               memset(buffer, 0xFF, sizeof(struct yaffs_obj_hdr));
+               memset(buffer, 0xff, sizeof(struct yaffs_obj_hdr));
        } else {
        } else {
-               memset(buffer, 0xFF, dev->data_bytes_per_chunk);
+               memset(buffer, 0xff, dev->data_bytes_per_chunk);
        }
 
        oh->type = in->variant_type;
        }
 
        oh->type = in->variant_type;
index 54b97093be3648159795bdd68990bb8cca4f4603..3a71167f08be6bdd0fa362c033d687ca7a5dafde 100644 (file)
 
 /* Give us a  Y=0x59,
  * Give us an A=0x41,
 
 /* Give us a  Y=0x59,
  * Give us an A=0x41,
- * Give us an FF=0xFF
+ * Give us an FF=0xff
  * Give us an S=0x53
  * And what have we got...
  */
  * Give us an S=0x53
  * And what have we got...
  */
-#define YAFFS_MAGIC                    0x5941FF53
+#define YAFFS_MAGIC                    0x5941ff53
 
 #define YAFFS_NTNODES_LEVEL0           16
 #define YAFFS_TNODES_LEVEL0_BITS       4
 
 #define YAFFS_NTNODES_LEVEL0           16
 #define YAFFS_TNODES_LEVEL0_BITS       4
@@ -49,7 +49,7 @@
 #define YAFFS_MIN_YAFFS2_CHUNK_SIZE    1024
 #define YAFFS_MIN_YAFFS2_SPARE_SIZE    32
 
 #define YAFFS_MIN_YAFFS2_CHUNK_SIZE    1024
 #define YAFFS_MIN_YAFFS2_SPARE_SIZE    32
 
-#define YAFFS_MAX_CHUNK_ID             0x000FFFFF
+#define YAFFS_MAX_CHUNK_ID             0x000fffff
 
 #define YAFFS_ALLOCATION_NOBJECTS      100
 #define YAFFS_ALLOCATION_NTNODES       100
 
 #define YAFFS_ALLOCATION_NOBJECTS      100
 #define YAFFS_ALLOCATION_NTNODES       100
  * and is a larger number than the lifetime of a 2GB device.
  */
 #define YAFFS_LOWEST_SEQUENCE_NUMBER   0x00001000
  * and is a larger number than the lifetime of a 2GB device.
  */
 #define YAFFS_LOWEST_SEQUENCE_NUMBER   0x00001000
-#define YAFFS_HIGHEST_SEQUENCE_NUMBER  0xEFFFFF00
+#define YAFFS_HIGHEST_SEQUENCE_NUMBER  0xefffff00
 
 /* Special sequence number for bad block that failed to be marked bad */
 
 /* Special sequence number for bad block that failed to be marked bad */
-#define YAFFS_SEQUENCE_BAD_BLOCK       0xFFFF0000
+#define YAFFS_SEQUENCE_BAD_BLOCK       0xffff0000
 
 /* ChunkCache is used for short read/write operations.*/
 struct yaffs_cache {
 
 /* ChunkCache is used for short read/write operations.*/
 struct yaffs_cache {
index 4c569ef3a2e2209c8ff38e512388531857af8cdf..cbaa326afad17e0e8c3d9341609dd9694af75397 100644 (file)
@@ -263,7 +263,7 @@ int nandmtd1_read_chunk_tags(struct yaffs_dev *dev,
        /* Unpack the tags to extended form and set ECC result.
         * [set should_be_ff just to keep yaffs_unpack_tags1 happy]
         */
        /* Unpack the tags to extended form and set ECC result.
         * [set should_be_ff just to keep yaffs_unpack_tags1 happy]
         */
-       pt1.should_be_ff = 0xFFFFFFFF;
+       pt1.should_be_ff = 0xffffffff;
        yaffs_unpack_tags1(etags, &pt1);
        etags->ecc_result = eccres;
 
        yaffs_unpack_tags1(etags, &pt1);
        etags->ecc_result = eccres;
 
index b1317b4884f93f924f4ddc5894b7022b6b08b222..03af8a88d7b13da4e7c45b08bc69425a6cfe1ad5 100644 (file)
@@ -231,7 +231,7 @@ int nandmtd1_read_chunk_tags(struct yaffs_dev *dev,
        /* Unpack the tags to extended form and set ECC result.
         * [set should_be_ff just to keep yaffs_unpack_tags1 happy]
         */
        /* Unpack the tags to extended form and set ECC result.
         * [set should_be_ff just to keep yaffs_unpack_tags1 happy]
         */
-       pt1.should_be_ff = 0xFFFFFFFF;
+       pt1.should_be_ff = 0xffffffff;
        yaffs_unpack_tags1(etags, &pt1);
        etags->ecc_result = eccres;
 
        yaffs_unpack_tags1(etags, &pt1);
        etags->ecc_result = eccres;
 
index d27450dfcded59627d93654d7771347593ef30f3..dd9a331d8fc41e3dad052e75541f17bfc786b312 100644 (file)
@@ -32,7 +32,7 @@ void yaffs_pack_tags1(struct yaffs_packed_tags1 *pt,
        pt->ecc = 0;
        pt->deleted = (t->is_deleted) ? 0 : 1;
        pt->unused_stuff = 0;
        pt->ecc = 0;
        pt->deleted = (t->is_deleted) ? 0 : 1;
        pt->unused_stuff = 0;
-       pt->should_be_ff = 0xFFFFFFFF;
+       pt->should_be_ff = 0xffffffff;
 }
 
 void yaffs_unpack_tags1(struct yaffs_ext_tags *t,
 }
 
 void yaffs_unpack_tags1(struct yaffs_ext_tags *t,
@@ -41,7 +41,7 @@ void yaffs_unpack_tags1(struct yaffs_ext_tags *t,
 
        if (memcmp(all_ff, pt, sizeof(struct yaffs_packed_tags1))) {
                t->block_bad = 0;
 
        if (memcmp(all_ff, pt, sizeof(struct yaffs_packed_tags1))) {
                t->block_bad = 0;
-               if (pt->should_be_ff != 0xFFFFFFFF)
+               if (pt->should_be_ff != 0xffffffff)
                        t->block_bad = 1;
                t->chunk_used = 1;
                t->obj_id = pt->obj_id;
                        t->block_bad = 1;
                t->chunk_used = 1;
                t->obj_id = pt->obj_id;
index ad608406a49ad51de4677b6c70e18af760c29ce9..d18f3e5cb1aa9e2e63437ade2db67fd30fdf8374 100644 (file)
 #define EXTRA_SHADOWS_FLAG     0x20000000
 #define EXTRA_SPARE_FLAGS      0x10000000
 
 #define EXTRA_SHADOWS_FLAG     0x20000000
 #define EXTRA_SPARE_FLAGS      0x10000000
 
-#define ALL_EXTRA_FLAGS                0xF0000000
+#define ALL_EXTRA_FLAGS                0xf0000000
 
 /* Also, the top 4 bits of the object Id are set to the object type. */
 #define EXTRA_OBJECT_TYPE_SHIFT (28)
 
 /* Also, the top 4 bits of the object Id are set to the object type. */
 #define EXTRA_OBJECT_TYPE_SHIFT (28)
-#define EXTRA_OBJECT_TYPE_MASK  ((0x0F) << EXTRA_OBJECT_TYPE_SHIFT)
+#define EXTRA_OBJECT_TYPE_MASK  ((0x0f) << EXTRA_OBJECT_TYPE_SHIFT)
 
 static void yaffs_dump_packed_tags2_tags_only(
                                const struct yaffs_packed_tags2_tags_only *ptt)
 
 static void yaffs_dump_packed_tags2_tags_only(
                                const struct yaffs_packed_tags2_tags_only *ptt)
@@ -110,7 +110,7 @@ void yaffs_unpack_tags2_tags_only(struct yaffs_ext_tags *t,
        memset(t, 0, sizeof(struct yaffs_ext_tags));
        yaffs_init_tags(t);
 
        memset(t, 0, sizeof(struct yaffs_ext_tags));
        yaffs_init_tags(t);
 
-       if (ptt->seq_number == 0xFFFFFFFF)
+       if (ptt->seq_number == 0xffffffff)
                return;
 
        t->block_bad = 0;
                return;
 
        t->block_bad = 0;
@@ -148,7 +148,7 @@ void yaffs_unpack_tags2(struct yaffs_ext_tags *t, struct yaffs_packed_tags2 *pt,
 {
        enum yaffs_ecc_result ecc_result = YAFFS_ECC_RESULT_NO_ERROR;
 
 {
        enum yaffs_ecc_result ecc_result = YAFFS_ECC_RESULT_NO_ERROR;
 
-       if (pt->t.seq_number != 0xFFFFFFFF && tags_ecc) {
+       if (pt->t.seq_number != 0xffffffff && tags_ecc) {
                /* Chunk is in use and we need to do ECC */
 
                struct yaffs_ecc_other ecc;
                /* Chunk is in use and we need to do ECC */
 
                struct yaffs_ecc_other ecc;
index 56ac906d6c5c8141589257e65ee7116d137cee2a..fb5495fc535f6b147f602d49e8b09b625e3c63d0 100644 (file)
@@ -120,7 +120,7 @@ static void yaffs_get_tags_from_spare(struct yaffs_dev *dev,
 
 static void yaffs_spare_init(struct yaffs_spare *spare)
 {
 
 static void yaffs_spare_init(struct yaffs_spare *spare)
 {
-       memset(spare, 0xFF, sizeof(struct yaffs_spare));
+       memset(spare, 0xff, sizeof(struct yaffs_spare));
 }
 
 static int yaffs_wr_nand(struct yaffs_dev *dev,
 }
 
 static int yaffs_wr_nand(struct yaffs_dev *dev,
@@ -292,7 +292,7 @@ int yaffs_tags_compat_wr(struct yaffs_dev *dev,
                tags.obj_id = ext_tags->obj_id;
                tags.chunk_id = ext_tags->chunk_id;
 
                tags.obj_id = ext_tags->obj_id;
                tags.chunk_id = ext_tags->chunk_id;
 
-               tags.n_bytes_lsb = ext_tags->n_bytes & 0x3ff;
+               tags.n_bytes_lsb = ext_tags->n_bytes & (1024 - 1);
 
                if (dev->data_bytes_per_chunk >= 1024)
                        tags.n_bytes_msb = (ext_tags->n_bytes >> 10) & 3;
 
                if (dev->data_bytes_per_chunk >= 1024)
                        tags.n_bytes_msb = (ext_tags->n_bytes >> 10) & 3;
@@ -321,7 +321,7 @@ int yaffs_tags_compat_rd(struct yaffs_dev *dev,
        int deleted;
 
        if (!init) {
        int deleted;
 
        if (!init) {
-               memset(&spare_ff, 0xFF, sizeof(spare_ff));
+               memset(&spare_ff, 0xff, sizeof(spare_ff));
                init = 1;
        }
 
                init = 1;
        }
 
@@ -385,7 +385,7 @@ int yaffs_tags_compat_query_block(struct yaffs_dev *dev,
        enum yaffs_ecc_result dummy;
 
        if (!init) {
        enum yaffs_ecc_result dummy;
 
        if (!init) {
-               memset(&spare_ff, 0xFF, sizeof(spare_ff));
+               memset(&spare_ff, 0xff, sizeof(spare_ff));
                init = 1;
        }
 
                init = 1;
        }
 
index def2ec958844008126b6259755c5dd7b4a90d1fd..afae3100976a1525c02be3c862a2e976deace57d 100644 (file)
@@ -13,7 +13,7 @@
 
 #include "yaffs_tagsvalidity.h"
 
 
 #include "yaffs_tagsvalidity.h"
 
-#define VALID0 0xAAAAAAAA
+#define VALID0 0xaaaaaaaa
 #define VALID1 0x55555555
 
 void yaffs_init_tags(struct yaffs_ext_tags *tags)
 #define VALID1 0x55555555
 
 void yaffs_init_tags(struct yaffs_ext_tags *tags)
index edc93cd20dbd8d1fb7b5855996ada5c1a19419df..fd26054d3912be85c704ca877540611d0ae372a3 100644 (file)
@@ -43,7 +43,7 @@ extern unsigned int yaffs_wr_attempts;
 #define YAFFS_TRACE_VERIFY             0x00010000
 #define YAFFS_TRACE_VERIFY_NAND                0x00020000
 #define YAFFS_TRACE_VERIFY_FULL                0x00040000
 #define YAFFS_TRACE_VERIFY             0x00010000
 #define YAFFS_TRACE_VERIFY_NAND                0x00020000
 #define YAFFS_TRACE_VERIFY_FULL                0x00040000
-#define YAFFS_TRACE_VERIFY_ALL         0x000F0000
+#define YAFFS_TRACE_VERIFY_ALL         0x000f0000
 
 #define YAFFS_TRACE_SYNC               0x00100000
 #define YAFFS_TRACE_BACKGROUND         0x00200000
 
 #define YAFFS_TRACE_SYNC               0x00100000
 #define YAFFS_TRACE_BACKGROUND         0x00200000
@@ -52,6 +52,6 @@ extern unsigned int yaffs_wr_attempts;
 
 #define YAFFS_TRACE_ERROR              0x40000000
 #define YAFFS_TRACE_BUG                        0x80000000
 
 #define YAFFS_TRACE_ERROR              0x40000000
 #define YAFFS_TRACE_BUG                        0x80000000
-#define YAFFS_TRACE_ALWAYS             0xF0000000
+#define YAFFS_TRACE_ALWAYS             0xf0000000
 
 #endif
 
 #endif
index bf06c6ec131acc9b46c2dc2b00c79276a151bfee..27d36953bc4b7605c1acba461496de26c9898e6d 100644 (file)
@@ -216,7 +216,7 @@ void yaffs_verify_oh(struct yaffs_obj *obj, struct yaffs_obj_hdr *oh,
 
        if (tags->obj_id > 1 && ((u8) (oh->name[0])) == 0xff)   /* Junk name */
                yaffs_trace(YAFFS_TRACE_VERIFY,
 
        if (tags->obj_id > 1 && ((u8) (oh->name[0])) == 0xff)   /* Junk name */
                yaffs_trace(YAFFS_TRACE_VERIFY,
-                       "Obj %d header name is 0xFF",
+                       "Obj %d header name is 0xff",
                        obj->obj_id);
 }
 
                        obj->obj_id);
 }
 
index 6d3b5160855053aa0e01e31400be3c99edbeab8c..961f01eba115debec905b31a858bdc19eb131732 100644 (file)
@@ -573,7 +573,7 @@ static int yaffs2_wr_checkpt_objs(struct yaffs_dev *dev)
        }
 
        /* Dump end of list */
        }
 
        /* Dump end of list */
-       memset(&cp, 0xFF, sizeof(struct yaffs_checkpt_obj));
+       memset(&cp, 0xff, sizeof(struct yaffs_checkpt_obj));
        cp.struct_type = sizeof(cp);
 
        if (ok)
        cp.struct_type = sizeof(cp);
 
        if (ok)