linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ata: sata_mv: fix mis-conversion in mv_write_cached_reg()
@ 2016-06-07 16:49 Ben Dooks
  2016-06-17 16:15 ` Tejun Heo
  0 siblings, 1 reply; 2+ messages in thread
From: Ben Dooks @ 2016-06-07 16:49 UTC (permalink / raw)
  To: linux-arm-kernel

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>
---
Cc: Tejun Heo <tj@kernel.org>
Cc: linux-ide at vger.kernel.org
Cc: linux-arm-kernel at lists.infradead.org
---
 drivers/ata/sata_mv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index bd74ee5..745489a 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) {
-- 
2.8.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] ata: sata_mv: fix mis-conversion in mv_write_cached_reg()
  2016-06-07 16:49 [PATCH] ata: sata_mv: fix mis-conversion in mv_write_cached_reg() Ben Dooks
@ 2016-06-17 16:15 ` Tejun Heo
  0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2016-06-17 16:15 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jun 07, 2016 at 05:49:09PM +0100, Ben Dooks wrote:
> 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>

Applied to libata/for-4.7-fixes.

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-06-17 16:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-07 16:49 [PATCH] ata: sata_mv: fix mis-conversion in mv_write_cached_reg() Ben Dooks
2016-06-17 16:15 ` 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).