[U-Boot] [PATCH v2 2/8] ahci: fix unaligned access

Rob Herring robherring2 at gmail.com
Sat Aug 24 17:10:48 CEST 2013


From: Rob Herring <rob.herring at calxeda.com>

gcc 4.7 will generate unaligned accesses to local char arrays, so make
them static to avoid that.

Signed-off-by: Rob Herring <rob.herring at calxeda.com>
Reviewed-by: Tom Rini <trini at ti.com>
---
v2: make hdr const

 drivers/block/ahci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/block/ahci.c b/drivers/block/ahci.c
index 02ba02f..f4d1d81 100644
--- a/drivers/block/ahci.c
+++ b/drivers/block/ahci.c
@@ -610,7 +610,7 @@ static void dump_ataid(hd_driveid_t *ataid)
  */
 static int ata_scsiop_inquiry(ccb *pccb)
 {
-	u8 hdr[] = {
+	static const u8 hdr[] = {
 		0,
 		0,
 		0x5,		/* claim SPC-3 version compatibility */
-- 
1.8.1.2



More information about the U-Boot mailing list