]> Pileus Git - ~andy/linux/commitdiff
sata_rcar: fix compilation warning in sata_rcar_thaw()
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Mon, 3 Jun 2013 20:16:05 +0000 (13:16 -0700)
committerTejun Heo <tj@kernel.org>
Tue, 4 Jun 2013 01:49:45 +0000 (18:49 -0700)
When compiling the driver with gcc 4.8, it gives the following warning:

 drivers/ata/sata_rcar.c: In function `sata_rcar_thaw':
 drivers/ata/sata_rcar.c:183:2: warning: large integer implicitly truncated to unsigned type [-Woverflow]

Fix the warning by explicit cast of the 'unsigned long' value to 'u32'.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
drivers/ata/sata_rcar.c

index 249c8a289bfd5dbb97f25fbcbd99ff241ac40c21..d51423463479f883cd819ca50b9a1ecd05dc0fc6 100644 (file)
@@ -180,7 +180,7 @@ static void sata_rcar_thaw(struct ata_port *ap)
        struct sata_rcar_priv *priv = ap->host->private_data;
 
        /* ack */
-       iowrite32(~SATA_RCAR_INT_MASK, priv->base + SATAINTSTAT_REG);
+       iowrite32(~(u32)SATA_RCAR_INT_MASK, priv->base + SATAINTSTAT_REG);
 
        ata_sff_thaw(ap);