Fix misaligned buffer in env_fat_save
PATCH 1/1 Fix misaligned buffer in env_fat_save
When saving the environment on a platform which has DMA alignment larger than the natural alignment, env_fat_save triggers a debug message in file_fat_write:
Saving Environment to FAT... writing uboot.env
FAT: Misaligned buffer address (9df1c8e0)
OK
Signed-off-by Alex Kiernan <[email protected]>
---
env/fat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
env/fat.c +1 -1
@@ -36,7 +36,7 @@ DECLARE_GLOBAL_DATA_PTR;#ifdef CMD_SAVEENV static int env_fat_save (void ) { -env_t env_new; +env_t __aligned(ARCH_DMA_MINALIGN) env_new;struct blk_desc *dev_desc =NULL ;disk_partition_t info;int dev, part;
Signature · 1 line
2.7.4
Quoted 9 lines · Alex Kiernan
When saving the environment on a platform which has DMA alignment larger than the natural alignment,
env_fat_savetriggers a debug message infile_fat_write:Saving Environment to FAT... writing uboot.env
FAT: Misaligned buffer address (9df1c8e0)
OKSigned-off-by Alex Kiernan <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180212/eada4f54/attachment.sig>