[PATCH] Staging: media: Fix sparse warnings for incorrect types in lirc_bt829.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch fixes following sparse warnings in lirc_bt829.c

drivers/staging/media/lirc/lirc_bt829.c:182:22: warning: incorrect type in assignment (different address spaces)
drivers/staging/media/lirc/lirc_bt829.c:182:22:    expected unsigned char *static [toplevel] pci_addr_lin
drivers/staging/media/lirc/lirc_bt829.c:182:22:    got void [noderef] <asn:2>*
drivers/staging/media/lirc/lirc_bt829.c:397:25: warning: incorrect type in argument 2 (different address spaces)
drivers/staging/media/lirc/lirc_bt829.c:397:25:    expected void volatile [noderef] <asn:2>*addr
drivers/staging/media/lirc/lirc_bt829.c:397:25:    got unsigned char *[assigned] addr
drivers/staging/media/lirc/lirc_bt829.c:389:23: warning: incorrect type in argument 1 (different address spaces)
drivers/staging/media/lirc/lirc_bt829.c:389:23:    expected void const volatile [noderef] <asn:2>*addr
drivers/staging/media/lirc/lirc_bt829.c:389:23:    got unsigned char *[assigned] addr
drivers/staging/media/lirc/lirc_bt829.c:160:17: warning: incorrect type in argument 1 (different address spaces)
drivers/staging/media/lirc/lirc_bt829.c:160:17:    expected void volatile [noderef] <asn:2>*addr
drivers/staging/media/lirc/lirc_bt829.c:160:17:    got unsigned char *static [toplevel] pci_addr_lin
drivers/staging/media/lirc/lirc_bt829.c:174:17: warning: incorrect type in argument 1 (different address spaces)
drivers/staging/media/lirc/lirc_bt829.c:174:17:    expected void volatile [noderef] <asn:2>*addr
drivers/staging/media/lirc/lirc_bt829.c:174:17:    got unsigned char *static [toplevel] pci_addr_lin

Signed-off-by: Ebru Akagunduz <ebru.akagunduz@xxxxxxxxx>
---
 drivers/staging/media/lirc/lirc_bt829.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/media/lirc/lirc_bt829.c b/drivers/staging/media/lirc/lirc_bt829.c
index 30edc74..fe01054 100644
--- a/drivers/staging/media/lirc/lirc_bt829.c
+++ b/drivers/staging/media/lirc/lirc_bt829.c
@@ -64,7 +64,7 @@ static bool debug;
 
 static int atir_minor;
 static phys_addr_t pci_addr_phys;
-static unsigned char *pci_addr_lin;
+static unsigned char __iomem *pci_addr_lin;
 
 static struct lirc_driver atir_driver;
 
@@ -382,7 +382,7 @@ static unsigned char do_get_bits(void)
 
 static unsigned int read_index(unsigned char index)
 {
-	unsigned char *addr;
+	unsigned char __iomem *addr;
 	unsigned int value;
 	/*  addr = pci_addr_lin + DATA_PCI_OFF + ((index & 0xFF) << 2); */
 	addr = pci_addr_lin + ((index & 0xFF) << 2);
@@ -392,7 +392,7 @@ static unsigned int read_index(unsigned char index)
 
 static void write_index(unsigned char index, unsigned int reg_val)
 {
-	unsigned char *addr;
+	unsigned char __iomem *addr;
 	addr = pci_addr_lin + ((index & 0xFF) << 2);
 	writel(reg_val, addr);
 }
-- 
1.8.1.2

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux