]> git.sur5r.net Git - u-boot/commitdiff
ahci: fix unaligned access
authorRob Herring <rob.herring@calxeda.com>
Sat, 24 Aug 2013 15:10:48 +0000 (10:10 -0500)
committerTom Rini <trini@ti.com>
Fri, 6 Sep 2013 17:09:07 +0000 (13:09 -0400)
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@calxeda.com>
Reviewed-by: Tom Rini <trini@ti.com>
drivers/block/ahci.c

index 02ba02f427a07f908dae0496ed167060cea27b70..f4d1d8174f681e3b7f39f918991326e3eb48fd0b 100644 (file)
@@ -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 */