[PATCH] staging: kpc2000: kpc2000_i2c: Fix different address spaces warnings

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

 



This patch fixes the following sparse warnings:

kpc2000_i2c.c:137: warning: incorrect type in argument 1
                                   (different address spaces)
kpc2000_i2c.c:137:    expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:137:    got void *
kpc2000_i2c.c:146: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:146:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:146:    got void *
kpc2000_i2c.c:147: warning: incorrect type in argument 1
                                   (different address spaces)
kpc2000_i2c.c:147:    expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:147:    got void *
kpc2000_i2c.c:166: warning: incorrect type in argument 1
                                   (different address spaces)
kpc2000_i2c.c:166:    expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:166:    got void *
kpc2000_i2c.c:166: warning: incorrect type in argument 2
                                  (different address spaces)
kpc2000_i2c.c:166:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:166:    got void *
kpc2000_i2c.c:168: warning: incorrect type in argument 1
                                   (different address spaces)
kpc2000_i2c.c:168:    expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:168:    got void *
kpc2000_i2c.c:168: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:168:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:168:    got void *
kpc2000_i2c.c:171: warning: incorrect type in argument 1
                                   (different address spaces)
kpc2000_i2c.c:171:    expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:171:    got void *
kpc2000_i2c.c:174: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:174:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:174:    got void *
kpc2000_i2c.c:193: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:193:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:193:    got void *
kpc2000_i2c.c:194: warning: incorrect type in argument 1
                                   (different address spaces)
kpc2000_i2c.c:194:    expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:194:    got void *
kpc2000_i2c.c:214: warning: incorrect type in argument 2
                                  (different address spaces)
kpc2000_i2c.c:214:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:214:    got void *
kpc2000_i2c.c:219: warning: incorrect type in argument 1
                                  (different address spaces)
kpc2000_i2c.c:219:    expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:219:    got void *
kpc2000_i2c.c:226: warning: incorrect type in argument 2
                                  (different address spaces)
kpc2000_i2c.c:226:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:226:    got void *
kpc2000_i2c.c:238: warning: incorrect type in argument 1
                                   (different address spaces)
kpc2000_i2c.c:238:    expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:238:    got void *
kpc2000_i2c.c:244: warning: incorrect type in argument 2
                                  (different address spaces)
kpc2000_i2c.c:244:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:244:    got void *
kpc2000_i2c.c:252: warning: incorrect type in argument 1
                                  (different address spaces)
kpc2000_i2c.c:252:    expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:252:    got void *
kpc2000_i2c.c:257: warning: incorrect type in argument 2
                                  (different address spaces)
kpc2000_i2c.c:257:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:257:    got void *
kpc2000_i2c.c:259: warning: incorrect type in argument 2
				   (different address spaces)
kpc2000_i2c.c:259:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:259:    got void *
kpc2000_i2c.c:267: warning: incorrect type in argument 1
                                   (different address spaces)
kpc2000_i2c.c:267:    expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:267:    got void *
kpc2000_i2c.c:273: warning: incorrect type in argument 1
                                   (different address spaces)
kpc2000_i2c.c:273:    expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:273:    got void *
kpc2000_i2c.c:293: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:293:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:293:    got void *
kpc2000_i2c.c:294: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:294:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:294:    got void *
kpc2000_i2c.c:309: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:309:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:309:    got void *
kpc2000_i2c.c:312: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:312:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:312:    got void *
kpc2000_i2c.c:317: warning: incorrect type in argument 1
                                   (different address spaces)
kpc2000_i2c.c:317:    expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:317:    got void *
kpc2000_i2c.c:324: warning: incorrect type in argument 1
                                   (different address spaces)
kpc2000_i2c.c:324:    expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:324:    got void *
kpc2000_i2c.c:328: warning: incorrect type in argument 1
                                   (different address spaces)
kpc2000_i2c.c:328:    expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:328:    got void *
kpc2000_i2c.c:329: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:329:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:329:    got void *
kpc2000_i2c.c:330: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:330:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:330:    got void *
kpc2000_i2c.c:338: warning: incorrect type in argument 1
                                   (different address spaces)
kpc2000_i2c.c:338:    expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:338:    got void *
kpc2000_i2c.c:340: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:340:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:340:    got void *
kpc2000_i2c.c:342: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:342:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:342:    got void *
kpc2000_i2c.c:350: warning: incorrect type in argument 1
                                  (different address spaces)
kpc2000_i2c.c:350:    expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:350:    got void *
kpc2000_i2c.c:350: warning: incorrect type in argument 2
                                  (different address spaces)
kpc2000_i2c.c:350:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:350:    got void *
kpc2000_i2c.c:351: warning: incorrect type in argument 1
                                   (different address spaces)
kpc2000_i2c.c:351:    expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:351:    got void *
kpc2000_i2c.c:414: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:414:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:414:    got void *
kpc2000_i2c.c:420: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:420:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:420:    got void *
kpc2000_i2c.c:422: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:422:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:422:    got void *
kpc2000_i2c.c:427: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:427:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:427:    got void *
kpc2000_i2c.c:428: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:428:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:428:    got void *
kpc2000_i2c.c:430: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:430:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:430:    got void *
kpc2000_i2c.c:435: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:435:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:435:    got void *
kpc2000_i2c.c:436: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:436:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:436:    got void *
kpc2000_i2c.c:438: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:438:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:438:    got void *
kpc2000_i2c.c:439: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:439:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:439:    got void *
kpc2000_i2c.c:445: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:445:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:445:    got void *
kpc2000_i2c.c:446: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:446:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:446:    got void *
kpc2000_i2c.c:454: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:454:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:454:    got void *
kpc2000_i2c.c:459: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:459:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:459:    got void *
kpc2000_i2c.c:461: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:461:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:461:    got void *
kpc2000_i2c.c:472: warning: incorrect type in argument 1
                                   (different address spaces)
kpc2000_i2c.c:472:    expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:472:    got void *
kpc2000_i2c.c:472: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:472:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:472:    got void *
kpc2000_i2c.c:475: warning: incorrect type in argument 1
                                   (different address spaces)
kpc2000_i2c.c:475:    expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:475:    got void *
kpc2000_i2c.c:475: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:475:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:475:    got void *
kpc2000_i2c.c:493: warning: incorrect type in argument 1
                                   (different address spaces)
kpc2000_i2c.c:493:    expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:493:    got void *
kpc2000_i2c.c:493: warning: incorrect type in argument 2
                                   (different address spaces)
kpc2000_i2c.c:493:    expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:493:    got void *
kpc2000_i2c.c:512: warning: incorrect type in argument 1
                                   (different address spaces)
kpc2000_i2c.c:512:    expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:512:    got void *
kpc2000_i2c.c:516: warning: incorrect type in argument 1
                                   (different address spaces)
kpc2000_i2c.c:516:    expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:516:    got void *
kpc2000_i2c.c:516: warning: incorrect type in argument 1
                                   (different address spaces)
kpc2000_i2c.c:516:    expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:516:    got void *

Signed-off-by: Eduardo Barretto <edusbarretto@xxxxxxxxx>
---
 drivers/staging/kpc2000/kpc2000_i2c.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/kpc2000/kpc2000_i2c.c b/drivers/staging/kpc2000/kpc2000_i2c.c
index b108da4ac633..bc02534d8dc3 100644
--- a/drivers/staging/kpc2000/kpc2000_i2c.c
+++ b/drivers/staging/kpc2000/kpc2000_i2c.c
@@ -123,9 +123,9 @@ struct i2c_device {
 
 // FIXME!
 #undef inb_p
-#define inb_p(a) readq((void *)a)
+#define inb_p(a) readq((void __iomem *)a)
 #undef outb_p
-#define outb_p(d, a) writeq(d, (void *)a)
+#define outb_p(d, a) writeq(d, (void __iomem *)a)
 
 /* Make sure the SMBus host is ready to start transmitting.
  * Return 0 if it is, -EBUSY if it is not.
-- 
2.22.1

_______________________________________________
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