* [PATCH] sata_rcar: fix compilation warning in sata_rcar_thaw()
@ 2013-06-03 18:19 Sergei Shtylyov
2013-06-03 20:17 ` Tejun Heo
0 siblings, 1 reply; 2+ messages in thread
From: Sergei Shtylyov @ 2013-06-03 18:19 UTC (permalink / raw)
To: linux-ide, tj
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>
---
This patch is against 'for-3.10-fixes' branch of Tejun Heo's 'libata.git' repo.
Tejun, does it fix the warning for you?
drivers/ata/sata_rcar.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: libata/drivers/ata/sata_rcar.c
===================================================================
--- libata.orig/drivers/ata/sata_rcar.c
+++ libata/drivers/ata/sata_rcar.c
@@ -180,7 +180,7 @@ static void sata_rcar_thaw(struct ata_po
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);
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] sata_rcar: fix compilation warning in sata_rcar_thaw()
2013-06-03 18:19 [PATCH] sata_rcar: fix compilation warning in sata_rcar_thaw() Sergei Shtylyov
@ 2013-06-03 20:17 ` Tejun Heo
0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2013-06-03 20:17 UTC (permalink / raw)
To: Sergei Shtylyov; +Cc: linux-ide
On Mon, Jun 03, 2013 at 10:19:58PM +0400, Sergei Shtylyov wrote:
> 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>
Applied to libata/for-3.11. Thanks.
--
tejun
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-06-03 20:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-03 18:19 [PATCH] sata_rcar: fix compilation warning in sata_rcar_thaw() Sergei Shtylyov
2013-06-03 20:17 ` Tejun Heo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).