[U-Boot] [PATCH 1/1] fs: fat: unaligned buffers are not an error
Heinrich Schuchardt
xypron.glpk at gmx.de
Thu Sep 13 17:42:47 UTC 2018
The FAT driver supports unaligned reads and writes and EFI applications
will make use of these. So a misaligned buffer is only worth a debug
message.
Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
---
fs/fat/fat.c | 2 +-
fs/fat/fat_write.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/fat/fat.c b/fs/fat/fat.c
index 73ffdeae63..b08949d370 100644
--- a/fs/fat/fat.c
+++ b/fs/fat/fat.c
@@ -260,7 +260,7 @@ get_cluster(fsdata *mydata, __u32 clustnum, __u8 *buffer, unsigned long size)
if ((unsigned long)buffer & (ARCH_DMA_MINALIGN - 1)) {
ALLOC_CACHE_ALIGN_BUFFER(__u8, tmpbuf, mydata->sect_size);
- printf("FAT: Misaligned buffer address (%p)\n", buffer);
+ debug("FAT: Misaligned buffer address (%p)\n", buffer);
while (size >= mydata->sect_size) {
ret = disk_read(startsect++, 1, tmpbuf);
diff --git a/fs/fat/fat_write.c b/fs/fat/fat_write.c
index 6d3d2d1abb..fc211e74bc 100644
--- a/fs/fat/fat_write.c
+++ b/fs/fat/fat_write.c
@@ -409,7 +409,7 @@ set_cluster(fsdata *mydata, __u32 clustnum, __u8 *buffer,
if ((unsigned long)buffer & (ARCH_DMA_MINALIGN - 1)) {
ALLOC_CACHE_ALIGN_BUFFER(__u8, tmpbuf, mydata->sect_size);
- printf("FAT: Misaligned buffer address (%p)\n", buffer);
+ debug("FAT: Misaligned buffer address (%p)\n", buffer);
while (size >= mydata->sect_size) {
memcpy(tmpbuf, buffer, mydata->sect_size);
--
2.18.0
More information about the U-Boot
mailing list