udf: convert byte order of constant instead of variable
convert byte order of constant instead of variable,
which can be done at compile time (vs run time)
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Acked-by: Jan Kara <jack@suse.cz>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
diff --git a/fs/udf/super.c b/fs/udf/super.c
index 12fb91d..b102958 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -1014,20 +1014,20 @@
le32_to_cpu(p->partitionLength); /* blocks */
map->s_partition_root =
le32_to_cpu(p->partitionStartingLocation);
- if (le32_to_cpu(p->accessType) ==
- PD_ACCESS_TYPE_READ_ONLY)
+ if (p->accessType ==
+ cpu_to_le32(PD_ACCESS_TYPE_READ_ONLY))
map->s_partition_flags |=
UDF_PART_FLAG_READ_ONLY;
- if (le32_to_cpu(p->accessType) ==
- PD_ACCESS_TYPE_WRITE_ONCE)
+ if (p->accessType ==
+ cpu_to_le32(PD_ACCESS_TYPE_WRITE_ONCE))
map->s_partition_flags |=
UDF_PART_FLAG_WRITE_ONCE;
- if (le32_to_cpu(p->accessType) ==
- PD_ACCESS_TYPE_REWRITABLE)
+ if (p->accessType ==
+ cpu_to_le32(PD_ACCESS_TYPE_REWRITABLE))
map->s_partition_flags |=
UDF_PART_FLAG_REWRITABLE;
- if (le32_to_cpu(p->accessType) ==
- PD_ACCESS_TYPE_OVERWRITABLE)
+ if (p->accessType ==
+ cpu_to_le32(PD_ACCESS_TYPE_OVERWRITABLE))
map->s_partition_flags |=
UDF_PART_FLAG_OVERWRITABLE;