diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/jffs2/nodelist.h | 9 | ||||
-rw-r--r-- | fs/jffs2/wbuf.c | 6 |
2 files changed, 12 insertions, 3 deletions
diff --git a/fs/jffs2/nodelist.h b/fs/jffs2/nodelist.h index 4178b4b55948..382662cc61e7 100644 --- a/fs/jffs2/nodelist.h +++ b/fs/jffs2/nodelist.h | |||
@@ -40,6 +40,9 @@ | |||
40 | #define cpu_to_je32(x) ((jint32_t){x}) | 40 | #define cpu_to_je32(x) ((jint32_t){x}) |
41 | #define cpu_to_jemode(x) ((jmode_t){os_to_jffs2_mode(x)}) | 41 | #define cpu_to_jemode(x) ((jmode_t){os_to_jffs2_mode(x)}) |
42 | 42 | ||
43 | #define constant_cpu_to_je16(x) ((jint16_t){x}) | ||
44 | #define constant_cpu_to_je32(x) ((jint32_t){x}) | ||
45 | |||
43 | #define je16_to_cpu(x) ((x).v16) | 46 | #define je16_to_cpu(x) ((x).v16) |
44 | #define je32_to_cpu(x) ((x).v32) | 47 | #define je32_to_cpu(x) ((x).v32) |
45 | #define jemode_to_cpu(x) (jffs2_to_os_mode((x).m)) | 48 | #define jemode_to_cpu(x) (jffs2_to_os_mode((x).m)) |
@@ -48,6 +51,9 @@ | |||
48 | #define cpu_to_je32(x) ((jint32_t){cpu_to_be32(x)}) | 51 | #define cpu_to_je32(x) ((jint32_t){cpu_to_be32(x)}) |
49 | #define cpu_to_jemode(x) ((jmode_t){cpu_to_be32(os_to_jffs2_mode(x))}) | 52 | #define cpu_to_jemode(x) ((jmode_t){cpu_to_be32(os_to_jffs2_mode(x))}) |
50 | 53 | ||
54 | #define constant_cpu_to_je16(x) ((jint16_t){__constant_cpu_to_be16(x)}) | ||
55 | #define constant_cpu_to_je32(x) ((jint32_t){__constant_cpu_to_be32(x)}) | ||
56 | |||
51 | #define je16_to_cpu(x) (be16_to_cpu(x.v16)) | 57 | #define je16_to_cpu(x) (be16_to_cpu(x.v16)) |
52 | #define je32_to_cpu(x) (be32_to_cpu(x.v32)) | 58 | #define je32_to_cpu(x) (be32_to_cpu(x.v32)) |
53 | #define jemode_to_cpu(x) (be32_to_cpu(jffs2_to_os_mode((x).m))) | 59 | #define jemode_to_cpu(x) (be32_to_cpu(jffs2_to_os_mode((x).m))) |
@@ -56,6 +62,9 @@ | |||
56 | #define cpu_to_je32(x) ((jint32_t){cpu_to_le32(x)}) | 62 | #define cpu_to_je32(x) ((jint32_t){cpu_to_le32(x)}) |
57 | #define cpu_to_jemode(x) ((jmode_t){cpu_to_le32(os_to_jffs2_mode(x))}) | 63 | #define cpu_to_jemode(x) ((jmode_t){cpu_to_le32(os_to_jffs2_mode(x))}) |
58 | 64 | ||
65 | #define constant_cpu_to_je16(x) ((jint16_t){__constant_cpu_to_le16(x)}) | ||
66 | #define constant_cpu_to_je32(x) ((jint32_t){__constant_cpu_to_le32(x)}) | ||
67 | |||
59 | #define je16_to_cpu(x) (le16_to_cpu(x.v16)) | 68 | #define je16_to_cpu(x) (le16_to_cpu(x.v16)) |
60 | #define je32_to_cpu(x) (le32_to_cpu(x.v32)) | 69 | #define je32_to_cpu(x) (le32_to_cpu(x.v32)) |
61 | #define jemode_to_cpu(x) (le32_to_cpu(jffs2_to_os_mode((x).m))) | 70 | #define jemode_to_cpu(x) (le32_to_cpu(jffs2_to_os_mode((x).m))) |
diff --git a/fs/jffs2/wbuf.c b/fs/jffs2/wbuf.c index f9da0e755a3e..f87f11af7086 100644 --- a/fs/jffs2/wbuf.c +++ b/fs/jffs2/wbuf.c | |||
@@ -970,9 +970,9 @@ exit: | |||
970 | 970 | ||
971 | static const struct jffs2_unknown_node oob_cleanmarker = | 971 | static const struct jffs2_unknown_node oob_cleanmarker = |
972 | { | 972 | { |
973 | .magic = cpu_to_je16(JFFS2_MAGIC_BITMASK), | 973 | .magic = constant_cpu_to_je16(JFFS2_MAGIC_BITMASK), |
974 | .nodetype = cpu_to_je16(JFFS2_NODETYPE_CLEANMARKER), | 974 | .nodetype = constant_cpu_to_je16(JFFS2_NODETYPE_CLEANMARKER), |
975 | .totlen = cpu_to_je32(8) | 975 | .totlen = constant_cpu_to_je32(8) |
976 | }; | 976 | }; |
977 | 977 | ||
978 | /* | 978 | /* |