diff options
author | Michael Neuling <mikey@neuling.org> | 2015-02-20 11:37:46 +1100 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2015-02-23 13:32:00 +1100 |
commit | 9e5a27f745a015408e7c15a8b37f560656fdd773 (patch) | |
tree | 31144b9775a69d9f75af523d69953b86d30c3f7b /libflash | |
parent | 8f5b8616de0b8ea92033725765c0a99db5cd84c4 (diff) | |
download | skiboot-9e5a27f745a015408e7c15a8b37f560656fdd773.zip skiboot-9e5a27f745a015408e7c15a8b37f560656fdd773.tar.gz skiboot-9e5a27f745a015408e7c15a8b37f560656fdd773.tar.bz2 |
libffs: Add comment for to clarify endian requirments
In some parts of libffs we access struct ffs_entry with endian access and in
other parts we don't. This adds a comment to clarify why we do this.
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'libflash')
-rw-r--r-- | libflash/libffs.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libflash/libffs.c b/libflash/libffs.c index ef2aa4d..abb9775 100644 --- a/libflash/libffs.c +++ b/libflash/libffs.c @@ -267,6 +267,10 @@ int ffs_update_act_size(struct ffs_handle *ffs, uint32_t part_idx, FL_DBG("FFS: part index %d at offset 0x%08x\n", part_idx, offset); + /* + * NOTE: We are accessing the unconverted ffs_entry from the PNOR here + * (since we are going to write it back) so we need to be endian safe. + */ if (ent->actual == cpu_to_be32(act_size)) { FL_DBG("FFS: ent->actual alrady matches: 0x%08x==0x%08x\n", cpu_to_be32(act_size), ent->actual); |