aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/nozomi.c
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2008-03-28 23:09:08 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-03-30 17:20:23 -0400
commit782a6de47b97d5c5f16c84f7868606fa25781fec (patch)
tree232f35a0d140817e402d2c27cacfce8daffce7c6 /drivers/char/nozomi.c
parent683113a33d5b9262bdf3e5cf9c60d9a2ad02cae3 (diff)
fix iomem misannotations in nozomi
aka if you see a force-cast, be very suspicious... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Acked-and-tested-by: Frank Seidel <fseidel@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char/nozomi.c')
-rw-r--r--drivers/char/nozomi.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/char/nozomi.c b/drivers/char/nozomi.c
index 6d0dc5f9b6b..6a6843a0a67 100644
--- a/drivers/char/nozomi.c
+++ b/drivers/char/nozomi.c
@@ -438,7 +438,7 @@ static void read_mem32(u32 *buf, const void __iomem *mem_addr_start,
438 u32 size_bytes) 438 u32 size_bytes)
439{ 439{
440 u32 i = 0; 440 u32 i = 0;
441 const u32 *ptr = (__force u32 *) mem_addr_start; 441 const u32 __iomem *ptr = mem_addr_start;
442 u16 *buf16; 442 u16 *buf16;
443 443
444 if (unlikely(!ptr || !buf)) 444 if (unlikely(!ptr || !buf))
@@ -448,11 +448,11 @@ static void read_mem32(u32 *buf, const void __iomem *mem_addr_start,
448 switch (size_bytes) { 448 switch (size_bytes) {
449 case 2: /* 2 bytes */ 449 case 2: /* 2 bytes */
450 buf16 = (u16 *) buf; 450 buf16 = (u16 *) buf;
451 *buf16 = __le16_to_cpu(readw((void __iomem *)ptr)); 451 *buf16 = __le16_to_cpu(readw(ptr));
452 goto out; 452 goto out;
453 break; 453 break;
454 case 4: /* 4 bytes */ 454 case 4: /* 4 bytes */
455 *(buf) = __le32_to_cpu(readl((void __iomem *)ptr)); 455 *(buf) = __le32_to_cpu(readl(ptr));
456 goto out; 456 goto out;
457 break; 457 break;
458 } 458 }
@@ -461,11 +461,11 @@ static void read_mem32(u32 *buf, const void __iomem *mem_addr_start,
461 if (size_bytes - i == 2) { 461 if (size_bytes - i == 2) {
462 /* Handle 2 bytes in the end */ 462 /* Handle 2 bytes in the end */
463 buf16 = (u16 *) buf; 463 buf16 = (u16 *) buf;
464 *(buf16) = __le16_to_cpu(readw((void __iomem *)ptr)); 464 *(buf16) = __le16_to_cpu(readw(ptr));
465 i += 2; 465 i += 2;
466 } else { 466 } else {
467 /* Read 4 bytes */ 467 /* Read 4 bytes */
468 *(buf) = __le32_to_cpu(readl((void __iomem *)ptr)); 468 *(buf) = __le32_to_cpu(readl(ptr));
469 i += 4; 469 i += 4;
470 } 470 }
471 buf++; 471 buf++;
@@ -484,7 +484,7 @@ static u32 write_mem32(void __iomem *mem_addr_start, const u32 *buf,
484 u32 size_bytes) 484 u32 size_bytes)
485{ 485{
486 u32 i = 0; 486 u32 i = 0;
487 u32 *ptr = (__force u32 *) mem_addr_start; 487 u32 __iomem *ptr = mem_addr_start;
488 const u16 *buf16; 488 const u16 *buf16;
489 489
490 if (unlikely(!ptr || !buf)) 490 if (unlikely(!ptr || !buf))
@@ -494,7 +494,7 @@ static u32 write_mem32(void __iomem *mem_addr_start, const u32 *buf,
494 switch (size_bytes) { 494 switch (size_bytes) {
495 case 2: /* 2 bytes */ 495 case 2: /* 2 bytes */
496 buf16 = (const u16 *)buf; 496 buf16 = (const u16 *)buf;
497 writew(__cpu_to_le16(*buf16), (void __iomem *)ptr); 497 writew(__cpu_to_le16(*buf16), ptr);
498 return 2; 498 return 2;
499 break; 499 break;
500 case 1: /* 500 case 1: /*
@@ -502,7 +502,7 @@ static u32 write_mem32(void __iomem *mem_addr_start, const u32 *buf,
502 * so falling through.. 502 * so falling through..
503 */ 503 */
504 case 4: /* 4 bytes */ 504 case 4: /* 4 bytes */
505 writel(__cpu_to_le32(*buf), (void __iomem *)ptr); 505 writel(__cpu_to_le32(*buf), ptr);
506 return 4; 506 return 4;
507 break; 507 break;
508 } 508 }
@@ -511,11 +511,11 @@ static u32 write_mem32(void __iomem *mem_addr_start, const u32 *buf,
511 if (size_bytes - i == 2) { 511 if (size_bytes - i == 2) {
512 /* 2 bytes */ 512 /* 2 bytes */
513 buf16 = (const u16 *)buf; 513 buf16 = (const u16 *)buf;
514 writew(__cpu_to_le16(*buf16), (void __iomem *)ptr); 514 writew(__cpu_to_le16(*buf16), ptr);
515 i += 2; 515 i += 2;
516 } else { 516 } else {
517 /* 4 bytes */ 517 /* 4 bytes */
518 writel(__cpu_to_le32(*buf), (void __iomem *)ptr); 518 writel(__cpu_to_le32(*buf), ptr);
519 i += 4; 519 i += 4;
520 } 520 }
521 buf++; 521 buf++;