summaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorBen Dooks <ben.dooks@codethink.co.uk>2016-06-07 18:49:09 +0200
committerTejun Heo <tj@kernel.org>2016-06-17 18:15:17 +0200
commit76bf3441ad6584ddc3aea1501927f21b21ba3a3a (patch)
treeca2070d936fef9703d7339126e71c03efe259d4a /drivers/ata
parentata: fix return value check in ahci_seattle_get_port_info() (diff)
downloadlinux-76bf3441ad6584ddc3aea1501927f21b21ba3a3a.tar.xz
linux-76bf3441ad6584ddc3aea1501927f21b21ba3a3a.zip
ata: sata_mv: fix mis-conversion in mv_write_cached_reg()
Fix the signed issue in mv_write_cached_reg() where the laddr is assigned from a (long)addr instead of (unsigned long)addr. Fixes the following warnings: drivers/ata/sata_mv.c:989:26: warning: cast removes address space of expression drivers/ata/sata_mv.c:989:26: warning: cast removes address space of expression drivers/ata/sata_mv.c:989:26: warning: cast removes address space of expression drivers/ata/sata_mv.c:989:26: warning: cast removes address space of expression Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/sata_mv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index bd74ee555278..745489a1c86a 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -986,7 +986,7 @@ static inline void mv_write_cached_reg(void __iomem *addr, u32 *old, u32 new)
* Looks like a lot of fuss, but it avoids an unnecessary
* +1 usec read-after-write delay for unaffected registers.
*/
- laddr = (long)addr & 0xffff;
+ laddr = (unsigned long)addr & 0xffff;
if (laddr >= 0x300 && laddr <= 0x33c) {
laddr &= 0x000f;
if (laddr == 0x4 || laddr == 0xc) {