diff mbox series

[U-Boot] Fix misaligned buffer in env_fat_save

Message ID 1518033714-30602-1-git-send-email-alex.kiernan@gmail.com
State Accepted
Commit cda87ec5587261cc813b404f713b102afede0800
Delegated to: Tom Rini
Headers show
Series [U-Boot] Fix misaligned buffer in env_fat_save | expand

Commit Message

Alex Kiernan Feb. 7, 2018, 8:01 p.m. UTC
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 <alex.kiernan@gmail.com>
---

 env/fat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Tom Rini Feb. 12, 2018, 10:32 p.m. UTC | #1
On Wed, Feb 07, 2018 at 08:01:54PM +0000, Alex Kiernan wrote:

> 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 <alex.kiernan@gmail.com>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/env/fat.c b/env/fat.c
index 35f7ab5..e6bd1f9 100644
--- a/env/fat.c
+++ b/env/fat.c
@@ -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;